cancel
Showing results for 
Search instead for 
Did you mean: 

Credit memo refund does not include tips

Credit memo refund does not include tips

Hello,

I am trying to issue a refund on an order. When I do any type of refund(full/partial), the refund amount does not include the tips amount. Using the following code to refund: 

$serviceOrder = Mage::getModel('sales/service_order', $order);
$order stores correct values for grand total, subtotal, tips, tax etc.
$creditmemo = $serviceOrder->prepareInvoiceCreditmemo($invoice);
$creditmemo->setRefundRequested(true)
                    ->setOfflineRequested(false)
                    ->register();
            
$transaction = Mage::getModel('core/resource_transaction');
$transaction->addObject($creditmemo)
                    ->addObject($creditmemo->getOrder())
                    ->addObject($creditmemo->getInvoice())
                    ->save();

 

1 REPLY 1

Re: Credit memo refund does not include tips

Hello @anusha_das 

 

have you created custom total tips? as i know no any tips total Magento provide it

 

if it is custom total then have you implement 

https://github.com/manishiitg/excellence_magento_blog/blob/master/Fee%20Module/app/code/local/Excell...
please check that module it will help you.

 

if works then mark as solution

 

 


Problem solved? Click Kudos & Accept as Solution!
Sunil Patel
Magento 2 Certified Professional Developer & Frontend Developer