Mage_Sales_Model_Order_Creditmemo_Total_Grand Class Reference

Inheritance diagram for Mage_Sales_Model_Order_Creditmemo_Total_Grand:

Mage_Sales_Model_Order_Creditmemo_Total_Abstract

List of all members.

Public Member Functions

 collect (Mage_Sales_Model_Order_Creditmemo $creditmemo)


Detailed Description

Definition at line 28 of file Grand.php.


Member Function Documentation

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     }


The documentation for this class was generated from the following file:

Generated on Sat Jul 4 17:24:46 2009 for Magento by  doxygen 1.5.8