Closed ant-workaholic closed 4 years ago
Hi @ant-workaholic. Thank you for your report. To help us process this issue please make sure that you provided the following information:
Please make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, please, add a comment to the issue:
@magento give me 2.4-develop instance
- upcoming 2.4.x release
For more details, please, review the Magento Contributor Assistant documentation.
@ant-workaholic do you confirm that you were able to reproduce the issue on vanilla Magento instance following steps to reproduce?
Hi @ant-workaholic I can't reproduce your issue on Magento ver 2.4-develop. Maybe it was fixed. Please take a look at my record:https://youtu.be/XDpEMKykomk
Hi @ant-workaholic I can't reproduce your issue on Magento ver 2.4-develop. Maybe it was fixed. Please take a look at my record:https://youtu.be/XDpEMKykomk
Could you make sure that shipment exists ? I did not see this in your video, just success message. Please verify also for guest user. For real customer I got the same success message but my shipment wasn't created, but for not logged in user I got the error. I tested on magento 2.3 on my custom payment but I am pretty sure that this is a Magento issue. I've debugged this, I described the reason of the issue in description. Thank you.
@vincent-le89 Yes, it seems it was fixed in 2.4-develop but not in "2.3.3". So, yes, the issue could be closed.
Preconditions (*)
Steps to reproduce (*)
Expected result (*)
Actual result (*)
I found that the main reason of the issue is that in the template
https://github.com/magento/magento2/blob/2.4-develop/app/code/Magento/Sales/view/adminhtml/templates/order/invoice/create/items/renderer/default.phtml#L21 in the else statement input element was replaced with just value and the data doesn't trasfer to the controller.
https://github.com/magento/magento2/blob/2.4-develop/app/code/Magento/Sales/Controller/Adminhtml/Order/Invoice/Save.php#L102
I propose to add a hidden field to the template https://github.com/magento/magento2/blob/2.4-develop/app/code/Magento/Sales/view/adminhtml/templates/order/invoice/create/items/renderer/default.phtml#L21
<input type="hidden" name="invoice[items][<?= (int) $_item->getOrderItemId() ?>]" value="<?= (int) $_item->getQty() ?>"/>
The issue reproducable for Community and Commerce Edition.