class FixAmountTaxType extends BaseTaxType

Methods

number
pricePercentRetriever()

For a price percent tax type, return the percentage (e.g. 20 for 20%) of the product price to use in tax calculation.

number
fixAmountRetriever( Product $product)

For constant amount tax type, return the absolute amount to use in tax calculation.

array
getRequirementsDefinition()

Returns the requirements definition of this tax type. This is an array of TaxTypeRequirementDefinition, which defines the name and the type of the requirements. Example :

the
getTitle()

No description

calculate( Product $product, $untaxedPrice)

No description

array
getRequirements()

No description

loadRequirements($requirementsValues)

No description

setRequirement($key, $value)

No description

getRequirement($key)

No description

setAmount($amount)

No description

Details

in BaseTaxType at line 40
number pricePercentRetriever()

For a price percent tax type, return the percentage (e.g. 20 for 20%) of the product price to use in tax calculation.

For other tax types, this method shoud return 0.

Return Value

number

at line 34
number fixAmountRetriever( Product $product)

For constant amount tax type, return the absolute amount to use in tax calculation.

For other tax types, this method shoud return 0.

Parameters

Product $product

Return Value

number

at line 39
array getRequirementsDefinition()

Returns the requirements definition of this tax type. This is an array of TaxTypeRequirementDefinition, which defines the name and the type of the requirements. Example :

array( 'percent' => new FloatType() );

Return Value

array of TaxTypeRequirementDefinition

at line 50
the getTitle()

Return Value

the name of this tax type.

in BaseTaxType at line 78
calculate( Product $product, $untaxedPrice)

Parameters

Product $product
$untaxedPrice

in BaseTaxType at line 87
array getRequirements()

Return Value

array Return the requirements array.

Exceptions

TaxEngineException

in BaseTaxType at line 92
loadRequirements($requirementsValues)

Parameters

$requirementsValues

in BaseTaxType at line 115
setRequirement($key, $value)

Parameters

$key
$value

in BaseTaxType at line 122
getRequirement($key)

Parameters

$key

at line 27
setAmount($amount)

Parameters

$amount