ePages 6.17.35 - DE_EPAGES/Shop/API/Constants.pm

Package DE_EPAGES::Shop::API::Constants

Constants of cartridge Shop

@EXPORT_OK
TAX_MODEL_GROSS
TAX_MODEL_NET
BASKETACTION_ADDQUANTITY
BASKETACTION_REPLACEQUANTITY
BASKETACTION_DONTCHANGEQUANTITY
BASKETACTION_ADDNEWPOSITION
Text2TaxModel
TaxModel2Text
$TAX_MODEL_GROSS_WITH_VATID
$NUMBER_FORMAT_INFIX_PATTERNS
$COUNTRIES_WITH_SAME_TAX
$EU_COUNTRY_AREA_EXCEPTIONS

Functions

TaxModel2Text
Text2TaxModel

TAX_MODEL_NET (integer)

Product prices include tax. Tax is calculated from the sum of product prices.

TAX_MODEL_GROSS (integer)

Product prices don't include tax. Tax is added to the sum of product prices.

BASKETACTION_ADDQUANTITY (integer)

Shop basket action if lineitem exists: Increases quantity in existing line item.

BASKETACTION_REPLACEQUANTITY (integer)

Shop basket action if lineitem exists: Replaces the quantity at line item.

BASKETACTION_DONTCHANGEQUANTITY (integer)

Shop basket action if lineitem exists: Does not change line item.

BASKETACTION_ADDNEWPOSITION (integer)

Shop basket action if lineitem exists: Creates a new line item.

$TAX_MODEL_GROSS_WITH_VATID (ref.array.string)

VATID starts with one of these values than
use taxmodel gross

$NUMBER_FORMAT_INFIX_PATTERNS (ref.hash.string)

Infix of numbers will be formatted with
one of these patterns

$COUNTRIES_WITH_SAME_TAX (ref.hash.array.string)

use same tax handling for country codes
use taxmodel gross

$EU_COUNTRY_AREA_EXCEPTIONS (ref.hash.array.hash)

eu countries with no eu tax handling areas

TaxModel2Text

Returns the tax model name by id. Returns undef if $TaxModel is undef. Throws an error if $TaxModel is neither TAX_MODEL_NET nor TAX_MODEL_GROSS.

Syntax
$TaxModelName = TaxModel2Text( $TaxModel )
Input
$TaxModel (int)
tax model id (TAX_MODEL_NET or TAX_MODEL_GROSS)
Return
$TaxModelName (string)
tax model name ('gross' or 'net')

Text2TaxModel

Returns the tax model id by name. Returns undef if $TaxModelName is undef. Throws an error if $TaxModelName is neither 'gross' nor 'net'.

Syntax
$TaxModel = Text2TaxModel( $TaxModelName )
Input
$TaxModelName (string)
tax model name ('gross' or 'net')
Return
$TaxModel (int)
tax model id (TAX_MODEL_NET or TAX_MODEL_GROSS)