ACSD-45424: Incorrect reservation compensation created after partial refund
The ACSD-45424 patch fixes the issue where an incorrect reservation compensation is created after a partial refund. This patch is available when the Quality Patches Tool (QPT) 1.1.17 is installed. The patch ID is ACSD-45424. Please note that the issue is scheduled to be fixed in Adobe Commerce 2.4.6.
Affected products and versions
The patch is created for Adobe Commerce version:
- Adobe Commerce (all deployment methods) 2.4.1
Compatible with Adobe Commerce versions:
- Adobe Commerce (all deployment methods) 2.3.4 - 2.4.4
magento/quality-patches
package to the latest version and check the compatibility on the Quality Patches Tool: Search for patches page. Use the patch ID as a search keyword to locate the patch.Issue
Incorrect reservation compensation is created after a partial refund.
Steps to reproduce:
-
Enable in-store delivery shipping method.
-
Create three inventory sources and make sure the pickup location is active in each (source1, source2, source3).
-
Create a new stock and assign the three sources to the new stock.
- This stock should be assigned to the main website.
-
Create a simple product, P3, and assign all the sources to it.
-
Add the following quantities for the sources of the simple product and enable backorders:
- Default source - 100
- source1 - 0
- source2 - 10
- source3 - 0
-
Add the simple product to the cart from the frontend and proceed to shipping form.
-
Select “source1” as the shipping location.
-
Complete the order and execute the following query in the database:
code language-sql SELECT * FROM inventory_reservation WHERE sku = 'P3';
You will get the order placed record in the
inventory_reservation
table. The quantity is 10, which is correct. -
Invoice this order from the backend.
-
Now create a credit memo for only one product. DO NOT select the Return to Stock checkbox.
-
Execute the same query from Step 8.
Expected results:
If you did not select the Return to Stock during the credit memo creation, the inventory_reservation
table will not have a record corresponding to the credit memo.
Actual results:
Even though you didn’t select the Return to Stock during the credit memo creation, it adds a record to inventory_reservation
table with creditmemo_created
event type. Also, the credit memo record added in the inventory_reservation
table has a quantity of 10 even though you created the credit memo for only one quantity.
Apply the patch
To apply individual patches, use the following links depending on your deployment method:
- Adobe Commerce or Magento Open Source on-premises: Quality Patches Tool > Usage in the Quality Patches Tool guide.
- Adobe Commerce on cloud infrastructure: Upgrades and Patches > Apply Patches in the Commerce on Cloud Infrastructure guide.
Related reading
To learn more about Quality Patches Tool, refer to:
- Quality Patches Tool released: a new tool to self-serve quality patches in the support knowledge base.
- Check if patch is available for your Adobe Commerce issue using Quality Patches Tool in the Quality Patches Tool guide.
For info about other patches available in QPT, refer to Quality Patches Tool: Search for patches in the Quality Patches Tool guide.