- Class name: TaxCalculatorCore
- Source: classes/tax/TaxCalculator.php line 33
const COMBINE_METHOD = 1
COMBINE_METHOD sum taxes eg: 100€ * (10% + 15%)
const ONE_AFTER_ANOTHER_METHOD = 2
ONE_AFTER_ANOTHER_METHOD apply taxes one after another eg: (100€ * 10%) * 15%
public integer $computation_method
- Visibility: public
- Source: classes/tax/TaxCalculator.php line 55.
public array $taxes
- Visibility: public
- Source: classes/tax/TaxCalculator.php line 50.
mixed TaxCalculatorCore::__construct(array $taxes, integer $computation_method)
- Visibility: public
- Source: classes/tax/TaxCalculator.php line 62
- $taxes array
- $computation_method integer - (COMBINE_METHOD | ONE_AFTER_ANOTHER_METHOD)
float TaxCalculatorCore::addTaxes($price_te)
Compute and add the taxes to the specified price
- Visibility: public
- Source: classes/tax/TaxCalculator.php line 79
- $price_te mixed
array TaxCalculatorCore::getTaxesAmount(float $price_te)
Return the tax amount associated to each taxes of the TaxCalculator
- Visibility: public
- Source: classes/tax/TaxCalculator.php line 126
- $price_te float
float TaxCalculatorCore::getTotalRate()
- Visibility: public
- Source: classes/tax/TaxCalculator.php line 99
\price TaxCalculatorCore::removeTaxes($price_ti)
Compute and remove the taxes to the specified price
- Visibility: public
- Source: classes/tax/TaxCalculator.php line 91
- $price_ti mixed