Open
Description
Preconditions (*)
- V 2.4.6-p8
Steps to reproduce (*)
- Create an eGift card and assign at least one source to it, make the qty 0 and make it available for backorder.
- Create the order for the eGift card
- Make sure the invoice is created (if invoice is not automatically created, create from admin)
Expected result (*)
- Order is created as well as invoice.
- There should be 2 entries in
inventory_reservation
table for that order and SKU:- for the reservation
- for the compensation
Actual result (*)
- Order is created, and invoice is created.
- There is only one entry in
inventory_reservation
table and that is for reservation - No
compensation
entry is created.
The actual issue
When system is trying to create the compensation it tries to gather the qty info for that product.
In this line you can see it is going to set $qtyToDeduct
to 0 as we have set 0 in the product level.
And because of this system cannot mark any source to deduct which is why it will never compensate them.
Because of this, there are so many entries in the reservation table that will stay there forever.