|
eZ Publish
[trunk]
|
eZVatType handles different VAT types More...
Inheritance diagram for eZVatType:
Collaboration diagram for eZVatType:Public Member Functions | |
| eZVatType ($row) | |
| getPercentage ($object, $country) | |
| isDynamic () | |
| VATTypeList () | |
Static Public Member Functions | |
| static | create () |
| static | definition () |
| Returns the definition for the object, the default implementation is to return an empty array. | |
| static | dynamicVatType ($asObject=true) |
| static | fetch ($id, $asObject=true) |
| static | fetchDependentClassesCount ($vatID) |
| Fetches number of product classes having given VAT type set as default. | |
| static | fetchDependentProductsCount ($vatID) |
| Fetches number of products using given VAT type. | |
| static | fetchList ($asObject=true, $skipDynamic=false) |
| removeThis () | |
| Remove given VAT type and all references to it. | |
Public Attributes | |
| $VatTypeList | |
Static Private Member Functions | |
| static | dynamicVatTypeName () |
| Return name of the "fake" dynamic VAT type. | |
| static | resetToDefaultInProducts ($oldVAT) |
| Change VAT type in all products from $oldVAT to the default VAT of a product class. | |
eZVatType handles different VAT types
Definition at line 18 of file ezvattype.php.
| static eZVatType::create | ( | ) | [static] |
Definition at line 177 of file ezvattype.php.
Referenced by eZSimplePrice\setVATType(), eZSimplePrice\unserializeContentClassAttribute(), and eZSimplePrice\VATType().
| static eZVatType::definition | ( | ) | [static] |
Returns the definition for the object, the default implementation is to return an empty array.
It's upto each inheriting class to return a proper definition array.
The definition array is an associative array consists of these keys:
Example: public static function definition() { return array( "fields" => array( "id" => "ID", "version" => "Version", "name" => "Name" ), "keys" => array( "id", "version" ), "function_attributes" => array( "current" => "currentVersion", "class_name" => "className" ), "increment_key" => "id", "class_name" => "eZContentClass", "sort" => array( "id" => "asc" ), "name" => "ezcontentclass" ); }
Reimplemented from eZPersistentObject.
Definition at line 25 of file ezvattype.php.
Referenced by fetch(), fetchList(), and removeThis().
| static eZVatType::dynamicVatType | ( | $ | asObject = true | ) | [static] |
Definition at line 60 of file ezvattype.php.
Referenced by fetch(), and fetchList().
| static eZVatType::dynamicVatTypeName | ( | ) | [static, private] |
Return name of the "fake" dynamic VAT type.
Definition at line 78 of file ezvattype.php.
Referenced by dynamicVatType().
| eZVatType::eZVatType | ( | $ | row | ) |
Definition at line 20 of file ezvattype.php.
Referenced by create(), and dynamicVatType().
| static eZVatType::fetch | ( | $ | id, |
| $ | asObject = true |
||
| ) | [static] |
Definition at line 90 of file ezvattype.php.
Referenced by eZDefaultVATHandler\chooseVatType(), findDependencies(), and eZSimplePrice\setVATType().
| static eZVatType::fetchDependentClassesCount | ( | $ | vatID | ) | [static] |
Fetches number of product classes having given VAT type set as default.
Definition at line 162 of file ezvattype.php.
Referenced by findDependencies().
| static eZVatType::fetchDependentProductsCount | ( | $ | vatID | ) | [static] |
Fetches number of products using given VAT type.
| $vatID | id of VAT type to count dependent products for. |
Definition at line 136 of file ezvattype.php.
Referenced by findDependencies().
| static eZVatType::fetchList | ( | $ | asObject = true, |
| $ | skipDynamic = false |
||
| ) | [static] |
| $skipDynamic | if false, include dynamic VAT type to the list being returned. |
Definition at line 109 of file ezvattype.php.
Referenced by applyChanges(), eZPriceType\unserializeContentClassAttribute(), eZSimplePrice\unserializeContentClassAttribute(), eZMultiPriceType\unserializeContentClassAttribute(), and VATTypeList().
| eZVatType::getPercentage | ( | $ | object, |
| $ | country | ||
| ) |
Definition at line 46 of file ezvattype.php.
Definition at line 101 of file ezvattype.php.
| eZVatType::removeThis | ( | ) | [static] |
Remove given VAT type and all references to it.
Drops VAT charging rules referencing the VAT type. Resets VAT type in associated products to its default value for a product class.
| $vatID | id of VAT type to remove. |
Definition at line 243 of file ezvattype.php.
| static eZVatType::resetToDefaultInProducts | ( | $ | oldVAT | ) | [static, private] |
Change VAT type in all products from $oldVAT to the default VAT of a product class.
| $oldVAT | old VAT type id. |
| $newVAT | new VAT type id. |
Definition at line 194 of file ezvattype.php.
Referenced by removeThis().
Definition at line 266 of file ezvattype.php.
| eZVatType::$VatTypeList |
Definition at line 278 of file ezvattype.php.