Question

i want to apply custom discount on grand total (without coupons) in create order section in magento admin.

i have added 2 lines code for check in this file app\code\core\Mage\Adminhtml\Block\Sales\Order\Create\Items\Grid.php

in function

public function getSubtotal()
    {


        if ($this->displayTotalsIncludeTax()) {
            if ($address->getSubtotalInclTax()) {

                return $address->getSubtotalInclTax();

            }

            return $address->getSubtotal()+$address->getTaxAmount();
        } else {
             $address->setDiscountAmount(-(400));
     $address->setDiscountDescription('Custom Discount');




     $address->save();
     return $address->getSubtotal();
        }
        return false;
    }

but it is not only applied on subtotal of products not on grand total

see here output of applied code

Need help to find correct function.

Was it helpful?

Solution

I have fixed. issue was in get price with tax.

Licensed under: CC-BY-SA with attribution
Not affiliated with magento.stackexchange
scroll top