ZenMagick 0.9.10


zenmagick.store.shared.services\ZMTaxRates
services\ZMTaxRates.php at line 35

Class ZMTaxRates

ZMObject
└─ZMTaxRates

public class ZMTaxRates
extends ZMObject

Tax rates.

Rate values will have a precision that is 2 digits more than ZMSettings::get('calculationDecimals').

Author:
DerManoMann

Constant Summary
final static str

TAX_BASE_BILLING

final static str

TAX_BASE_SHIPPING

final static str

TAX_BASE_STORE

Fields inherited from org.zenmagick.core\ZMObject
properties_
Method Summary
void

__construct()

Create new instance.

string

getTaxDescription(int taxClassId, int countryId, int zoneId)

Get the tax description for the give tax details.

ZMTaxRate

getTaxRateForClassId(int taxClassId, int countryId, int zoneId)

Get tax for the given parameter.

float

getTaxRateForDescription(string description)

Get the tax rate for the given description.

static void

instance()

Get instance.

Methods inherited from org.zenmagick.core\ZMObject
__construct, attachMethod, get, getAttachedMethods, getProperties, getPropertyNames, set, singleton

Constant Detail

services\ZMTaxRates.php at line 38

TAX_BASE_BILLING

public final static str TAX_BASE_BILLING = 'Billing'

services\ZMTaxRates.php at line 37

TAX_BASE_SHIPPING

public final static str TAX_BASE_SHIPPING = 'Shipping'

services\ZMTaxRates.php at line 36

TAX_BASE_STORE

public final static str TAX_BASE_STORE = 'Store'

Method Detail

services\ZMTaxRates.php at line 46

__construct

public void __construct()

Create new instance.


services\ZMTaxRates.php at line 159

getTaxDescription

public string getTaxDescription(int taxClassId, int countryId, int zoneId)

Get the tax description for the give tax details.

Parameters:
taxClassId - The tax class id.
countryId - The country id.
zoneId - The zoneId.
Returns:
The decription or null.

services\ZMTaxRates.php at line 77

getTaxRateForClassId

public ZMTaxRate getTaxRateForClassId(int taxClassId, int countryId, int zoneId)

Get tax for the given parameter.

If neither countryId nor zoneId are specified, the customers default address details will be used, or, if not available, the store defaults.

Parameters:
taxClassId - The tax class id.
countryId - Optional country id; default is 0.
zoneId - Optional zoneId; default is 0.
Returns:
The tax rate.

services\ZMTaxRates.php at line 183

getTaxRateForDescription

public float getTaxRateForDescription(string description)

Get the tax rate for the given description.

Parameters:
description - The tax description.
Returns:
The tax rate.

services\ZMTaxRates.php at line 61

instance

public static void instance()

Get instance.


ZenMagick 0.9.10