Package DE_EPAGES::Tax::API::Object::TaxMatrixDigital
object interface for TaxMatrixDigital.
Base |
DE_EPAGES::Shop::API::Object::ShopObject |
Functions
- className
- clone
- dbPackage
- defaultTaxAreaDigital
- defaultTaxClassDigital
- gross2net
- net2gross
- taxAreaDigitalByCountry
- taxRateDigital
className
Returns the class name, used for DAL access.
Syntax |
$ClassName = $TaxMatrixDigital->className; |
Return |
|
clone
Inserts a new object into the database as copy from old object. This function copies also tax rates of the matrix, which are no objects.
Syntax |
$Clone = $Object->clone( $hInfo ); $Clone = $Object->clone( $hInfo, $Recursive ); |
Input |
|
Return |
|
dbPackage
Returns the database package, used for DAL access.
Syntax |
$DbPackage = $TaxMatrixDigital->dbPackage; |
Return |
|
defaultTaxAreaDigital
Gets the default tax area digital of the matrix digital
Syntax |
$TaxAreaDigital = $TaxMatrix->defaultTaxAreaDigital; |
Return |
|
defaultTaxClassDigital
Gets the default tax class digital of the matrix digital
Syntax |
$TaxClassDigital = $TaxMatrix->defaultTaxClassDigital; |
Return |
|
gross2net
Calculates the net price from the gross price if required by the given tax model. Uses the tax rate for the given tax class from the default tax area if no area is given. Adds one extra digit of precision for example: 16.798 EUR (unless Precision is passed as parameter).
Syntax |
$NetPrice = $TaxMatrix->gross2net($CurrencyID, $GrossPrice, $hTaxParams); |
Example |
$NetPrice = $TaxMatrix->gross2net('EUR', 19.99, { 'TaxModel' => $TaxModel, 'TaxArea' => $TaxAreaDigital, 'TaxClass' => $TaxMatrix->defaultTaxClassDigital }); |
Input |
|
Return |
|
net2gross
Calculates the gross price from the net price if required by the given tax model. Uses the tax rate for the given tax class from the default tax area if no tax area is given. Rounds the result to the standard precision of the currency, for example: 19.99 EUR.
Syntax |
$GrossPrice = $TaxMatrixDigital->net2gross($CurrencyID, $NetPrice,$hTaxParams,$ExtraPrecision); |
Example |
$GrossPrice = $TaxMatrixDigital->net2gross('EUR', 16.798, 'TaxModel' => $TaxModel, 'TaxArea' => $TaxAreaDigital, 'TaxClass' => $TaxMatrix->defaultTaxClassDigital }); |
Input |
|
Return |
|
taxAreaDigitalByCountry
Returns the TaxAreaDigital by country id .
Syntax |
$TaxArea = $TaxMatrixDigital->taxAreaDigitalByCountry($CountryID); |
Input |
|
Return |
|
taxRateDigital
Tax rate digital of matrix digital defined by tax area digital and class.
Syntax |
$TaxRateDigital = $TaxMatrixDigital->taxRateDigital($Area, $Class); |
Input |
|
Return |
|