When I create a new credit memo for shipping costs the shipping taxes are calculated twice:

enter image description here

Notice: Before, I created a credit memo for the product price to have a better overview what happens with the shipping refund.

4,95 are the shipping costs (incl. taxes). The problem is, that magento adds the taxes (0,79) again.

Here is a full example:

enter image description here

This is an offline example, but when I try to refund payments made with RatePay or PayPal, they receive a refund request 0,79€ higher than the price paid before.

Has anybody experienced something like that before and has an idea what is happening here? Where should I start to look for the root of this problem? Maybe I can fix the problem in a submodule.

The price calculation works anywhere else correctly.

1 Answer 1


Found the problem while I tested each community and local module separated.

In a custom module we create custom invoice pdfs and here is the problem:

foreach ($invoices as $invoice) { $order = $invoice->getOrder(); $order->setShippingAmount( ($order->getShippingAmount() + $order->getShippingTaxAmount()) ); }

The order is saved somehow after the pdf has been generated and the result is a wrong shipping cost amount.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.