cancel
Showing results for 
Search instead for 
Did you mean: 

Credit memo total calculation issue

Credit memo total calculation issue

Using Magento 1.9.2, I encounter a miscalculation on the totals of the credit memo.

 

E.g.:

Order of 9 different products.

  Subtotal (Excl.Tax):     €168.80
  Subtotal (Incl.Tax):     €204.25
  Grand Total (Excl.Tax):     €168.80
  -- TVA 21% (21%):     €35.45
  Tax:    €35.45
  Grand Total (Incl.Tax)     €204.25

 

One product has to be refunded: 50.41 excl, 61 incl TVA.

The totals show up as follows:

  Subtotal (Excl.Tax):     €50.41
  Subtotal (Incl.Tax) :    €61.00
  Adjustment Refund:     €0.00
  Adjustment Fee:     €0.00
  Grand Total (Excl.Tax):     €158.21 <== this is NOT the credit memo grand total excl TVA!!!!
  -- TVA 21% (21%):    €10.59
  Tax:    €10.59
  Grand Total (Incl.Tax):     €168.80 <== This is the invoice Grand Total Excl TVA , not the credit memo GT!!!

 

So what seems to be happening:

  1. The GT excluding tax of the invoice is used as the GT including tax of the credit memo. It should be calculated based on the products that are refunded instead!
  2. The GT excluding tax of the credit memo is (wrongly) calculated by subtracting the (correct) tax amount from the (wrong) GT including tax.

I've tried to look into the code to see whether I could correct this, but it's so modular that I'm affraid to mess other things up.

Can anyone help me to resolve this? It's strange that this hasn't been reported more often.

 

Thx!

 

Dirk

 

 

4 REPLIES 4

Re: Credit memo total calculation issue

Hi,

 

I encountered exactly the same issue. Have you already found out how to fix it?

 

Thanks!

Re: Credit memo total calculation issue

Well after MANY hours I found the problem in an extension. It was overriding the order/creditmemo grand total. Look for observers who are listening to the the sales_order_creditmemo_refund event.

Re: Credit memo total calculation issue

Where did you find it? Can you be clear please?

Re: Credit memo total calculation issue

In my case the MultiSafePay extension was messing up the totals. In the /app/code/community/MultiSafepay/Msp/etc/config.xml was a event hook (sales_order_creditmemo_save_after) that overrides the Magento default.

 

MultiSafePay has issued some updates now due the this problem and that fixed it for us.

 

You could try to search for the sales_order_creditmemo_save_after event hook in all xml files located in the /app/code/community and /app/code/local folder. I found the problem by (temporarily) disabling these xml tags that ware related to this event.