Public Member Functions | |
collect (Mage_Sales_Model_Order_Creditmemo $creditmemo) |
Definition at line 28 of file Grand.php.
collect | ( | Mage_Sales_Model_Order_Creditmemo $ | creditmemo | ) |
Reimplemented from Mage_Sales_Model_Order_Creditmemo_Total_Abstract.
Definition at line 30 of file Grand.php.
00031 { 00032 $grandTotal = $creditmemo->getGrandTotal(); 00033 $baseGrandTotal = $creditmemo->getBaseGrandTotal(); 00034 00035 $grandTotal+= $creditmemo->getShippingAmount(); 00036 $baseGrandTotal+= $creditmemo->getBaseShippingAmount(); 00037 00038 $grandTotal+= $creditmemo->getAdjustmentPositive(); 00039 $baseGrandTotal+= $creditmemo->getBaseAdjustmentPositive(); 00040 00041 $grandTotal-= $creditmemo->getAdjustmentNegative(); 00042 $baseGrandTotal-= $creditmemo->getBaseAdjustmentNegative(); 00043 00044 $creditmemo->setGrandTotal($grandTotal); 00045 $creditmemo->setBaseGrandTotal($baseGrandTotal); 00046 00047 $creditmemo->setAdjustment($creditmemo->getAdjustmentPositive()-$creditmemo->getAdjustmentNegative()); 00048 $creditmemo->setBaseAdjustment($creditmemo->getBaseAdjustmentPositive()-$creditmemo->getBaseAdjustmentNegative()); 00049 00050 return $this; 00051 }