ZenMagick 0.9.8


org.zenmagick.store.services.ZMTaxRates
\store\services\ZMTaxRates.php at line 36

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
Version:
$Id: ZMTaxRates.php 2694 2009-12-03 22:32:18Z dermanomann $

Field Summary
final str

TAX_BASE_BILLING

final str

TAX_BASE_SHIPPING

final str

TAX_BASE_STORE

Fields inherited from org.zenmagick.core.ZMObject
properties_
Constructor Summary

ZMTaxRates()

Create new instance.

Method Summary
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
attachMethod, get, getAttachedMethods, getPropertyNames, set, singleton

Field Detail

\store\services\ZMTaxRates.php at line 39

TAX_BASE_BILLING

public final str TAX_BASE_BILLING = 'Billing'

\store\services\ZMTaxRates.php at line 38

TAX_BASE_SHIPPING

public final str TAX_BASE_SHIPPING = 'Shipping'

\store\services\ZMTaxRates.php at line 37

TAX_BASE_STORE

public final str TAX_BASE_STORE = 'Store'

Constructor Detail

\store\services\ZMTaxRates.php at line 47

ZMTaxRates

public ZMTaxRates()

Create new instance.


Method Detail

\store\services\ZMTaxRates.php at line 160

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.

\store\services\ZMTaxRates.php at line 78

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.

\store\services\ZMTaxRates.php at line 184

getTaxRateForDescription

public float getTaxRateForDescription(string description)

Get the tax rate for the given description.

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

\store\services\ZMTaxRates.php at line 62

instance

public static void instance()

Get instance.


ZenMagick 0.9.8