_invoice === null) { if ($this->hasData('invoice')) { $this->_invoice = $this->_getData('invoice'); } elseif (Mage::registry('current_invoice')) { $this->_invoice = Mage::registry('current_invoice'); } elseif ($this->getParentBlock()->getInvoice()) { $this->_invoice = $this->getParentBlock()->getInvoice(); } } return $this->_invoice; } public function setInvoice($invoice) { $this->_invoice = $invoice; return $this; } /** * Get totals source object * * @return Mage_Sales_Model_Order */ public function getSource() { return $this->getInvoice(); } /** * Initialize order totals array * * @return Mage_Sales_Block_Order_Totals */ protected function _initTotals() { parent::_initTotals(); $this->removeTotal('base_grandtotal'); return $this; } }