/** * Grab the tax amount from the line item based on the taxSource input * @param Mage_Sales_Model_Order_Item $item * @param string $taxSource * @return array represents the tax price with currency code */ protected function _getTaxesCharged($item, $qty, $taxSource = self::LINE_ITEM_TYPE_DEFAULT) { $store = Mage::app()->getStore($item->getStoreId()); $tax = 0; switch ($taxSource) { case self::LINE_ITEM_TYPE_DEFAULT: $tax = $item->getTaxAmount() / $qty; break; case self::LINE_ITEM_TYPE_REFUNDED: $tax = $store->roundPrice($item->getTaxRefunded() / $qty); break; case self::LINE_ITEM_TYPE_INVOICED: $tax = $item->getTaxInvoiced() / $qty; break; } return $this->_createCurrencyAmount($tax); }