inventory
inventory copied to clipboard
Partial Refunds on orders pre-shipment generate return to stock reservations, but order can't be shipped, leading to stock issues
Preconditions (*)
- magento 2.4.3 with MSI enabled (also 2.4.2)
- order for multiple products,
Steps to reproduce (*)
- refund an incomplete amount of one item in the order (ie. if 6 duffel bags in green were ordered, refund 4 of them but allow the rest of the order to remain)
- tick return to stock checkbox
- attempt to ship/complete the order
Expected result (*)
- shipment is generated, order status is changed to complete
- all reservations for products in the order are generated, stock returns to the on-the-shelf level
Actual result (*)
- shipment is generated, but order stays in pending state, positive reservations are generated for all products not refunded (+2 for green duffel as shipment_created metadata for refunded product, and full reservations for all other items)
- inventory reservations are generated correctly by the refund/return to stock (+4 for green duffel on inventory_reservation as credit_memo)
- more reservations are generated every time the user tries to refund the items again, if they think that will close the order (this won't happen every time though)
- eventually you have to ship the refunded items as a separate item to move the order status, also generating another reservation (+4 for green duffel on inventory reservation as shipment_created)
- the item in question then has more positive than negative reservations leading to saleable qty being higher than actual stock qty
Hi @IanFiretoys. Thank you for your report. To speed up processing of this issue, make sure that you provided sufficient information.
Add a comment to assign the issue: @magento I am working on this
- Join Magento Community Engineering Slack and ask your questions in #github channel.