Magento 1.9 – Apply Custom Discount in Grand Total in Admin Order

adminhtmlgrand-totalmagento-1.9order-gridsales-order

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.

Best Answer

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