Example #1
0
 /**
  * Initialize order totals array
  *
  * @return Mage_Sales_Block_Order_Totals
  */
 protected function _initTotals()
 {
     parent::_initTotals();
     $source = $this->getSource();
     if ($this->getSource()->getMundipaggInterest() > 0) {
         $this->addTotalBefore(new Varien_Object(array('code' => 'mundipagg_interest', 'field' => 'interest', 'value' => $this->getSource()->getMundipaggInterest(), 'label' => $this->__('Interest'))), 'grand_total');
     }
     return $this;
 }
Example #2
0
 protected function _initTotals()
 {
     parent::_initTotals();
     $amt = $this->getSource()->getFeeAmount();
     $baseAmt = $this->getSource()->getBaseFeeAmount();
     if ($amt != 0) {
         $this->addTotal(new Varien_Object(array('code' => 'codpayment', 'value' => $amt, 'base_value' => $baseAmt, 'label' => 'Cash On Delivery Charges')), 'fee_amount');
     }
     return $this;
 }
Example #3
0
 protected function _initTotals()
 {
     parent::_initTotals();
     if (Mage::helper('customfee')->canApply()) {
         $subtotal = $this->getSource()->getSubtotal();
         $amount = $this->getFeeAmount($subtotal);
         $this->addTotalBefore(new Varien_Object(array('code' => 'customfee', 'value' => $amount, 'base_value' => $amount, 'label' => $this->getLabel()), array('shipping', 'tax')));
     }
     return $this;
 }
Example #4
0
 protected function _initTotals()
 {
     parent::_initTotals();
     if (Mage::getStoreConfig('vc_giftwrap/general/enable')) {
         $this->getRequest()->setParam('creditmemo_id', $this->getCreditmemo()->getId());
         $price = Mage::helper('vc_giftwrap')->getAmountCreditmemoByOrderId($this->getOrder()->getId());
         $giftwrap = new Varien_Object(array('code' => 'giftcard', 'value' => $price, 'base_value' => $price, 'label' => $this->helper('vc_giftwrap')->__('Gift Wrap')));
         $this->addTotalBefore($giftwrap, 'grand_total');
     }
     return $this;
 }
Example #5
0
 /**
  * Initialize order totals array
  *
  * @return Mage_Sales_Block_Order_Creditmemo_Totals
  */
 protected function _initTotals()
 {
     parent::_initTotals();
     $payment = $this->getOrder()->getPayment();
     if (substr($payment->getMethod(), 0, 6) != "sisow_") {
         return $this;
     }
     $info = $payment->getMethodInstance()->getInfoInstance();
     if (!$info->getAdditionalInformation("invoice_fee")) {
         return $this;
     }
     return Mage::helper('sisow/paymentfee')->addToBlock($this);
 }
Example #6
0
 protected function _initTotals()
 {
     parent::_initTotals();
     $order = $this->getOrder();
     $payment = $order->getPayment();
     if ($payment->getMethod() != "billmateinvoice") {
         return $this;
     }
     $info = $order->getPayment()->getMethodInstance()->getInfoInstance();
     if (!$info->getAdditionalInformation("billmateinvoice_fee")) {
         return $this;
     }
     return Mage::helper('billmateinvoice/total')->addToBlock($this);
 }
Example #7
0
 protected function _initTotals()
 {
     parent::_initTotals();
     $add_giftwrap = false;
     $items = $this->getSource()->getAllItems();
     foreach ($items as $item) {
         if ($item->getData('gomage_gift_wrap')) {
             $add_giftwrap = true;
             break;
         }
     }
     if ($add_giftwrap) {
         $gift_wrap_totals = new Varien_Object(array('code' => 'gomage_gift_wrap', 'value' => $this->getSource()->getGomageGiftWrapAmount(), 'base_value' => $this->getSource()->getBaseGomageGiftWrapAmount(), 'label' => Mage::helper('gomage_checkout')->getConfigData('gift_wrapping/title')));
         $this->addTotalBefore($gift_wrap_totals, 'grand_total');
     }
     return $this;
 }
Example #8
0
 protected function _initTotals()
 {
     parent::_initTotals();
     $affiliate_credit = Mage::getModel('credit/creditorder')->load($this->getOrder()->getIncrementId());
     //$affiliate = $affiliate_credit->getAffiliate();
     $affiliate = 0;
     //$credit = $affiliate_credit ->getCredit();
     $credit = 0;
     if ($affiliate > 0) {
         //$this->_totals['affiliate_discount'] = new Varien_Object(array(
         $total = new Varien_Object(array('code' => 'affiliate_discount', 'value' => -$affiliate, 'base_value' => -$affiliate, 'label' => 'Affiliate Discount'));
         $this->addTotal($total);
     }
     if ($credit > 0) {
         //$this->_totals['credit_discount'] = new Varien_Object(array(
         $total = new Varien_Object(array('code' => 'credit_discount', 'value' => -$credit, 'base_value' => -$credit, 'label' => 'Credit Discount'));
         $this->addTotal($total);
     }
     return $this;
 }
 protected function _prepareLayout()
 {
     parent::__construct();
     $taxBlock = $this->getLayout()->createBlock('pdfinvoiceplus/totals_tax')->setTemplate('pdfinvoiceplus/tax/order/tax.phtml');
     $this->setChild('tax', $taxBlock);
 }