/**
  * Add totals for collected taxes to the parent block. Totals added to the
  * parent will be displayed with order totals.
  *
  * @return self
  */
 public function initTotals()
 {
     $parent = $this->getParentBlock();
     $taxAmount = $this->totalTaxAmount();
     $parent->addTotal(new Varien_Object(['code' => self::TOTAL_CODE, 'value' => $taxAmount, 'base_value' => $taxAmount, 'label' => $this->helper->__(self::TAX_LABEL)]), 'discount');
     return $this;
 }
 /**
  * Update the address with totals data used for display in a total line,
  * e.g. a total line in the cart.
  *
  * @param Mage_Sales_Model_Quote_Address
  * @return self
  */
 public function fetch(Mage_Sales_Model_Quote_Address $address)
 {
     $total = $address->getTotalAmount($this->getCode());
     if ($total) {
         $address->addTotal(['code' => $this->getCode(), 'title' => $this->_helper->__(self::TAX_TOTAL_TITLE), 'value' => $total]);
     }
     return $this;
 }
 /**
  * Create a fairly generic exception for the tax module indicating
  * that tax collection via the SDK has failed.
  *
  * @return EbayEnterprise_Tax_Exception_Collector_Exception
  */
 protected function _failTaxCollection()
 {
     return Mage::exception('EbayEnterprise_Tax_Exception_Collector', $this->_taxHelper->__(self::TAX_FAILED_MESSAGE));
 }