Class Mage_Tax_Model_Sales_Total_Quote_Subtotal

Description

Calculate items and address amounts including/excluding tax

Located in /Tax/Model/Sales/Total/Quote/Subtotal.php (line 30)

Mage_Sales_Model_Quote_Address_Total_Abstract
   |
   --Mage_Tax_Model_Sales_Total_Quote_Subtotal
Direct descendents
Class Description
Mage_Tax_Model_Sales_Total_Quote_Nominal_Subtotal Nominal subtotal tax total
Variable Summary
Method Summary
Mage_Tax_Model_Sales_Total_Quote_Subtotal __construct ()
float _deltaRound (float $price, string $rate, bool $direction, [string $type = 'regular'])
bool _sameRateAsStore (Varien_Object $request)
Variables
bool $_areTaxRequestsSimilar = false (line 58)

Flag which is initialized when collect method is started and catalog prices include tax.

Is used for checking if store tax and customer tax requests are similar

  • access: protected
mixed $_baseSubtotal = 0 (line 50)
  • access: protected
mixed $_baseSubtotalInclTax = 0 (line 48)
  • access: protected
Mage_Tax_Model_Calculation $_calculator = null (line 37)

Tax calculation model

  • access: protected
Mage_Tax_Model_Config $_config = null (line 44)

Tax configuration object

  • access: protected
mixed $_helper = null (line 45)
  • access: protected
mixed $_roundingDeltas = array() (line 69)
  • access: protected
mixed $_store (line 67)
  • access: protected
Varien_Object $_storeTaxRequest = null (line 65)

Request which can be used for tax rate calculation

  • access: protected
mixed $_subtotal = 0 (line 49)
  • access: protected
mixed $_subtotalInclTax = 0 (line 47)
  • access: protected

Inherited Variables

Inherited from Mage_Sales_Model_Quote_Address_Total_Abstract

Mage_Sales_Model_Quote_Address_Total_Abstract::$_address
Mage_Sales_Model_Quote_Address_Total_Abstract::$_canAddAmountToAddress
Mage_Sales_Model_Quote_Address_Total_Abstract::$_canSetAddressAmount
Mage_Sales_Model_Quote_Address_Total_Abstract::$_code
Mage_Sales_Model_Quote_Address_Total_Abstract::$_itemRowTotalKey
Methods
Constructor __construct (line 74)

Class constructor

  • access: public
Mage_Tax_Model_Sales_Total_Quote_Subtotal __construct ()
collect (line 90)

Calculate item price including/excluding tax, row total including/excluding tax and subotal including/excluding tax.

Determine discount price if needed

  • access: public

Redefinition of:
Mage_Sales_Model_Quote_Address_Total_Abstract::collect()
Collect totals process.
_addSubtotalAmount (line 638)

Add row total item amount to subtotal

  • access: protected
_deltaRound (line 550)

Round price based on previous rounding operation delta

  • access: protected
float _deltaRound (float $price, string $rate, bool $direction, [string $type = 'regular'])
  • float $price
  • string $rate
  • bool $direction
  • string $type
_getAddressTaxRequest (line 620)

Get request for fetching address tax rate

  • access: protected
Varien_Object _getAddressTaxRequest (Mage_Sales_Model_Quote_Address $address)
_getStoreTaxRequest (line 606)

Get request for fetching store tax rate

  • access: protected
Varien_Object _getStoreTaxRequest (Mage_Sales_Model_Quote_Address $address)
_needSubtractShippingTax (line 788)
  • deprecated: after 1.4.0.1
  • access: protected
bool _needSubtractShippingTax (Mage_Sales_Model_Quote_Address $address)
_needSubtractTax (line 773)

Check if we need subtract store tax amount from item prices

  • deprecated: after 1.4.1
  • access: protected
bool _needSubtractTax (Mage_Sales_Model_Quote_Address $address)
_processItem (line 155)

Caclulate item price and row total with configured rounding level

  • access: protected
_processShippingAmount (line 683)
  • deprecated: after 1.4.0.1
  • access: protected
_recalculateParent (line 569)

Recalculate row information for item based on children calculation

  • access: protected
Mage_Tax_Model_Sales_Total_Quote_Subtotal _recalculateParent ( $item)
_recollectItem (line 695)

Recollect item price and row total using after taxes subtract.

Declare item price including tax attributes

  • deprecated: after 1.4.1
  • access: protected
Mage_Tax_Model_Sales_Total_Quote_Subtotal _recollectItem ( $address,  $item)
_resetItemPriceInclTax (line 668)

Unset item prices/totals with price include tax.

Operation is necessary for reset item state in case if configuration was changed

  • deprecated: after 1.4.1
  • access: protected
Mage_Tax_Model_Sales_Total_Quote_Subtotal _resetItemPriceInclTax ( $item)
_rowBaseCalculation (line 294)

Calculate item price and row total including/excluding tax based on row total price rounding level

  • access: protected
Mage_Tax_Model_Sales_Total_Quote_Subtotal _rowBaseCalculation (Mage_Sales_Model_Quote_Item_Abstract $item, Varien_Object $request)
_sameRateAsStore (line 528)

Checks whether request for an item has same rate as store one Used only after collect() started, as far as uses optimized $_areTaxRequestsSimilar property Used only in case of prices including tax

  • access: protected
bool _sameRateAsStore (Varien_Object $request)
  • Varien_Object $request
_totalBaseCalculation (line 411)

Calculate item price and row total including/excluding tax based on total price rounding level

  • access: protected
Mage_Tax_Model_Sales_Total_Quote_Subtotal _totalBaseCalculation (Mage_Sales_Model_Quote_Item_Abstract $item, Varien_Object $request)
_unitBaseCalculation (line 180)

Calculate item price and row total including/excluding tax based on unit price rounding level

  • access: protected
Mage_Tax_Model_Sales_Total_Quote_Subtotal _unitBaseCalculation (Mage_Sales_Model_Quote_Item_Abstract $item, Varien_Object $request)

Inherited Methods

Inherited From Mage_Sales_Model_Quote_Address_Total_Abstract

Mage_Sales_Model_Quote_Address_Total_Abstract::collect()
Mage_Sales_Model_Quote_Address_Total_Abstract::fetch()
Mage_Sales_Model_Quote_Address_Total_Abstract::getCode()
Mage_Sales_Model_Quote_Address_Total_Abstract::getIsItemRowTotalCompoundable()
Mage_Sales_Model_Quote_Address_Total_Abstract::getItemBaseRowTotal()
Mage_Sales_Model_Quote_Address_Total_Abstract::getItemRowTotal()
Mage_Sales_Model_Quote_Address_Total_Abstract::getLabel()
Mage_Sales_Model_Quote_Address_Total_Abstract::processConfigArray()
Mage_Sales_Model_Quote_Address_Total_Abstract::setCode()
Mage_Sales_Model_Quote_Address_Total_Abstract::_addAmount()
Mage_Sales_Model_Quote_Address_Total_Abstract::_addBaseAmount()
Mage_Sales_Model_Quote_Address_Total_Abstract::_getAddress()
Mage_Sales_Model_Quote_Address_Total_Abstract::_getAddressItems()
Mage_Sales_Model_Quote_Address_Total_Abstract::_setAddress()
Mage_Sales_Model_Quote_Address_Total_Abstract::_setAmount()
Mage_Sales_Model_Quote_Address_Total_Abstract::_setBaseAmount()

Documentation generated on Fri, 11 Feb 2011 17:13:38 +0200 by phpDocumentor 1.4.3