Class Mage_Tax_Model_Calculation
Tax Calculation Model
- Varien_Object
- Mage_Core_Model_Abstract
- Mage_Tax_Model_Calculation
Copyright: Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
License: Open Software License (OSL 3.0)
Author: Magento Core Team <core@magentocommerce.com>
Located at code/core/Mage/Tax/Model/Calculation.php
protected
|
|
public
|
#
setCustomer(
Specify customer object which can be used for rate calculation |
public
|
|
public
|
|
public
|
|
public
array
|
|
public
array
|
|
public
array
|
|
protected
array
|
|
public
float
|
|
protected
string
|
|
public
float
|
#
getStoreRate( Varien_Object $request, mixed $store = null )
Get tax rate based on store shipping origin address settings This rate can be used for conversion store price including tax to store price excluding tax |
public
Varien_Object
|
#
getRateOriginRequest( null|store $store = null )
Get request object for getting tax rate based on store shippig original address |
public
Varien_Object
|
#
getRateRequest( null|false|Varien_Object $shippingAddress = null, null|false|Varien_Object $billingAddress = null, null|integer $customerTaxClass = null, null|integer $store = null )
Get request object with information necessary for getting tax rate Request
object contain: |
public
boolean
|
#
compareRequests( Varien_Object $first, Varien_Object $second )
Compare data and rates for two tax rate requests for same products (product tax class ids). Returns true if requests are similar (i.e. equal taxes rates will be applied to them) |
protected
|
|
public
|
|
public
|
|
public
array
|
|
public
|
|
public
|
|
public
|
|
public
float
|
#
calcTaxAmount( float $price, float $taxRate, boolean $priceIncludeTax = false, mixed $round = true )
Calculate rated tax abount based on price and tax rate. If you are using price including tax $priceIncludeTax should be true. |
public
float
|
|
public
float
|
|
public
float
|
string |
CALC_TAX_BEFORE_DISCOUNT_ON_EXCL
|
'0_0' |
|
string |
CALC_TAX_BEFORE_DISCOUNT_ON_INCL
|
'0_1' |
|
string |
CALC_TAX_AFTER_DISCOUNT_ON_EXCL
|
'1_0' |
|
string |
CALC_TAX_AFTER_DISCOUNT_ON_INCL
|
'1_1' |
|
string |
CALC_UNIT_BASE
|
'UNIT_BASE_CALCULATION' |
|
string |
CALC_ROW_BASE
|
'ROW_BASE_CALCULATION' |
|
string |
CALC_TOTAL_BASE
|
'TOTAL_BASE_CALCULATION' |
protected
array
|
$_rates | array() |
|
protected
array
|
$_ctc | array() |
|
protected
array
|
$_ptc | array() |
|
protected
array
|
$_rateCache | array() |
|
protected
array
|
$_rateCalculationProcess | array() |
|
protected
mixed
|
$_customer | null |
|
protected
mixed
|
$_defaultCustomerTaxClass | null |
$_cacheTag,
$_dataSaveAllowed,
$_eventObject,
$_eventPrefix,
$_isObjectNew,
$_resource,
$_resourceCollectionName,
$_resourceName
|