Closed Naberdz closed 1 year ago
Hi @Naberdz. Thank you for your report. To speed up processing of this issue, make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, Add a comment to the issue:
@magento give me 2.4-develop instance
- upcoming 2.4.x release@magento I am working on this
Join Magento Community Engineering Slack and ask your questions in #github channel. :warning: According to the Magento Contribution requirements, all issues must go through the Community Contributions Triage process. Community Contributions Triage is a public meeting. :clock10: You can find the schedule on the Magento Community Calendar page. :telephone_receiver: The triage of issues happens in the queue order. If you want to speed up the delivery of your contribution, join the Community Contributions Triage session to discuss the appropriate ticket.
Hi @engcom-Bravo. Thank you for working on this issue. In order to make sure that issue has enough information and ready for development, please read and check the following instruction: :point_down:
Area: XXXXX
label to the ticket, indicating the functional areas it may be related to.2.4-develop
branch@magento give me 2.4-develop instance
to deploy test instance on Magento infrastructure. 2.4-develop
branch, please, add the label Reproduced on 2.4.x
.Issue: Confirmed
once verification is complete. @magento give me 2.4-develop instance
Hi @engcom-Bravo. Thank you for your request. I'm working on Magento instance for you.
Hi @engcom-Bravo, here is your Magento Instance: https://82ff5428c157a16b7ac2d70bf4c4447a.instances-prod.magento-community.engineering Admin access: https://82ff5428c157a16b7ac2d70bf4c4447a.instances-prod.magento-community.engineering/admin_d1c4 Login: b6cedd99 Password: bc3d1696060c
Hi @Naberdz,
Thank you for reporting and collaboration.
Verified the issue on Magento 2.4-develop instance and the issue is not reproducible.Kindly refer the screenshots.
Steps to reproduce
We are able to create the credit memo for the order having $0 shipping method.
Kindly recheck the behaviour on Magento 2.4-develop instance and elaborate steps to reproduce if the issue is still reproducible.
Thanks.
Hi @Naberdz,
Kindly provide latest update on this comment https://github.com/magento/magento2/issues/37686#issuecomment-1614203759 if you are able to reproduce the issue please elaborate steps to reproduce if the issue is still reproducible.
Thanks.
There is a problem in isShippingIncludeTaxWithTaxAfterDiscount()
method, which returns true here:
https://github.com/magento/magento2/blob/ca30c47787db932b9431e42226bb918e95c932d9/app/code/Magento/Sales/Model/Order/Creditmemo/Total/Tax.php#L137
Then it runs the $part = $creditmemo->getShippingAmount() / $orderShippingAmount;
, where $orderShippingAmount
can be 0 at this point.
Actually there is a fix already for this issue in this commit: https://github.com/magento/magento2/commit/d32646fd5f04cc7f5a2bf4d1f73b110a78197d83
Those changes implements checking if $orderShippingAmount > 0
and runs that part of the code only if it's true.
@dudzio12 Thanks for your contribution & collaboration over here.
Hi @Naberdz,
This issue has been fixed under this commit d32646f Hence we are closing this issue.
Thanks.
Preconditions and environment
Steps to reproduce
Create order and choose delivery method with 0 costs. Complete order and click on creditmemo button. you will get error
Expected result
Creditmemo should be working
Actual result
We get error.
had to replace those lines with the following:
Additional information
No response
Release note
No response
Triage and priority