getGrandTotal(); $baseGrandTotal = $creditmemo->getBaseGrandTotal(); $grandTotal+= $creditmemo->getAdjustmentPositive(); $baseGrandTotal+= $creditmemo->getBaseAdjustmentPositive(); $grandTotal-= $creditmemo->getAdjustmentNegative(); $baseGrandTotal-= $creditmemo->getBaseAdjustmentNegative(); $creditmemo->setGrandTotal($grandTotal); $creditmemo->setBaseGrandTotal($baseGrandTotal); $creditmemo->setAdjustment($creditmemo->getAdjustmentPositive()-$creditmemo->getAdjustmentNegative()); $creditmemo->setBaseAdjustment($creditmemo->getBaseAdjustmentPositive()-$creditmemo->getBaseAdjustmentNegative()); return $this; } }