cancel
Showing results for 
Search instead for 
Did you mean: 

Cannot create credit note

Cannot create credit note

I cannot create a credit note in Magento 2.4.6-p1. Someone now how to solve this?

 

This is the log file:

 

#26 {main} {"exception":"[object] (DivisionByZeroError(code: 0): Division by zero at /home/SERVER/domains/WEBSITE/public_html/vendor/magento/module-sales/Model/Order/Creditmemo/Total/Tax.php:139)"} []

Issue can also be found here:
https://github.com/magento/magento2/issues/36800

But I do not see any solution.

3 REPLIES 3

Re: Cannot create credit note

Hello @alexander_jorda 

Try this if that works for you

  1. Update Magento to the latest version. The latest version of Magento 2 includes a fix for this issue.
  2. Disable the tax calculation for credit memos. You can do this by editing the following file:
vendor/magento/module-sales/Model/Order/Creditmemo/Total/Tax.php
And adding the following line to the collect() method:
$this->setTaxAmount(0);
 
Was my answer helpful? You can accept it as a solution.
175+ Professional Extensions for M1 & M2
Need a developer?Just visit Contact Us Now

Re: Cannot create credit note

Thanks for your answer.

I have upgraded to 2.4.6-p1, but the issue is still their.

 

I could not find option 2...

Re: Cannot create credit note

Hi,

Actually you can find solution there https://github.com/magento/magento2/issues/36800

If you look more closely you can find here the patch https://github.com/magento/magento2/pull/37226/files

 

Hope it helps