Package DE_EPAGES::Tax::API::Object::TaxMatrix
object interface for TaxMatrix.
Base |
DE_EPAGES::Object::API::Object::Object |
Functions
- className
- clone
- dbPackage
- defaultTaxArea
- defaultTaxClass
- exportXMLElements
- fallbackTaxArea
- gross2net
- net2gross
- removeTaxAreaCountry
- taxAreaByCountry
- taxAreaCountries
- taxRate
- updateTaxAreaCountry
className
Returns the class name, used for DAL access.
Syntax |
$ClassName = $TaxMatrix->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 = $TaxMatrix->dbPackage; |
Return |
|
defaultTaxArea
Gets the default tax area of the matrix
Syntax |
$TaxArea = $TaxMatrix->defaultTaxArea; |
Return |
|
defaultTaxClass
Gets the default tax class of the matrix
Syntax |
$TaxClass = $TaxMatrix->defaultTaxClass; |
Return |
|
exportXMLElements
add tax rates elements of tax class
Syntax |
$Object->exportXMLElements($Driver, $allAttributes); |
fallbackTaxArea
Gets the default tax area of the matrix for undefined countries
Syntax |
$TaxArea = $TaxMatrix->fallbackTaxArea; |
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' => $TaxArea, 'TaxClass' => $TaxMatrix->defaultTaxClass, }); |
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 = $TaxMatrix->net2gross($CurrencyID, $NetPrice,$hTaxParams,$ExtraPrecision); |
Example |
$GrossPrice = $TaxMatrix->net2gross('EUR', 16.798, {'TaxModel' => $TaxModel, 'TaxArea' => $TaxArea, 'TaxClass' => $TaxMatrix->defaultTaxClass, },1); |
Input |
|
Return |
|
removeTaxAreaCountry
Removes a TaxAreaCountryID.
Syntax |
$TaxMatrix->removeCountry($TaxAreaCountryID); |
Input |
|
taxAreaByCountry
Returns the TaxArea by identifier.
Syntax |
$TaxArea = $TaxMatrix->taxAreaByCountry($CountryID); |
Input |
|
Return |
|
taxAreaCountries
Returns objects of TaxAreaCountry by TaxMatrix.
Syntax |
$TaxArea = $TaxMatrix->taxAreaCountries(); |
Input |
|
Return |
|
taxRate
Tax rate of matrix defined by tax area and class.
Syntax |
$TaxRate = $TaxMatrix->taxRate($Area, $Class); |
Input |
|
Return |
|
updateTaxAreaCountry
Updates TaxAreaCountry.
Syntax |
$TaxMatrix->updateTaxAreaCountry($TaxAreaCountryID, $hTaxAreaCountry); |
Input |
|