ePages 7.1.0 - DE_EPAGES/Tax/API/TLE/TaxMatrixHandler.pm

Package DE_EPAGES::Tax::API::TLE::TaxMatrixHandler

Implements TLE functions for tax matrix

Functions

DisplayTaxAreaAndRate
IsMethodDirectlyUsable
TaxAreaByCountryID
TaxRateForDefaultTaxArea
ZipcodesForCountry

DisplayTaxAreaAndRate

Returns true if taxarea and taxrate should be displayed.

Syntax
#DisplayTaxAreaAndRate(#Shop)
Example
#DisplayTaxAreaAndRate(#Shop.Object)
Input
#Shop (object)
Shop object
Return
$displayed (boolean)
true if should be displayed false otherwise

IsMethodDirectlyUsable

Returns true if tax method by this tax type is usable without further configuration.

Syntax
#IsMethodDirectlyUsable(#Shop, #TaxType)
Example
#IsMethodDirectlyUsable(#Shop.Object, #TaxType.Object)
Input
#Shop (object)
Shop object
#TaxType (int)
TaxType id

TaxAreaByCountryID

Returns the TaxArea for a given country or region

Syntax
#TaxAreaByCountryID(#TaxMatrix, #CountryID, #ZipcodeFrom, $ZipcodeTo)
Example
#TaxAreaByCountryID(#Shop.TaxMatrix.Object, #CountryID, #ZipcodeFrom, $ZipcodeTo)
Input
#TaxMatrix (object)
taxmatrix object
#CountryID (int)
country id
#ZipcodeFrom (string)
min zipcode (optional)
#ZipcodeTo (string)
max zipcode (optional)

TaxRateForDefaultTaxArea

Returns the tax rate for the tax class in default tax area of shop

Syntax
#TaxRateForDefaultTaxArea(#Shop, #TaxClass)
Example
#TaxRateForDefaultTaxArea(#Shop.Object, #TaxClass.Object)
Input
#Shop (object)
shop
#TaxClass (object)
tax class

ZipcodesForCountry

Returns the Zipcodes with TaxArea for a country.

Syntax
#ZipcodesForCountry(#TaxMatrix, #CountryID)
Example
#ZipcodesForCountry(#Shop.TaxMatrix.Object, #CountryID)
Input
#TaxMatrix (object)
taxmatrix object
#CountryID (int)
country id