Closed
Description
We've recently run into issue where stock quantity is restored (increased back by 1) after the order has been canceled although Set Items' Status to be In Stock When Order is Cancelled is set to No.
Preconditions
- Magento 2.2.6 Community
- Reproduced on PHP 7.1.18 and 7.1.25
- MariaDB 10.1.26 and 10.3.11
- Go to Stores -> Configuration -> Catalog -> Inventory and make sure the following options are set as per below:
- Decrease Stock When Order is Placed to Yes
- Set Items' Status to be In Stock When Order is Cancelled to No
- Manage Stock to Yes
- Automatically Return Credit Memo Item to Stock to No
(see screenshot below)
Steps to reproduce
- Place an order with 1 item of product (i.e. qty = 1)
- Cancel order
Expected result
- Product quantity in product catalog is decreased by 1 after order is created
- Product quantity remains the same (i.e. does not increase) after order is canceled
Actual result
- Product quantity in product catalog is decreased by 1 after order is created
- Product quantity is increased by 1 immediately after order is canceled
Metadata
Metadata
Assignees
Labels
The issue has been fixed in 2.2 release lineThe issue has been fixed in 2.3 release lineGate 2 Passed. Manual verification of the issue description passedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedGate 1 Passed. Automatic verification of issue format passedGate 4. Acknowledged. Issue is added to backlog and ready for developmentThe issue has been reproduced on latest 2.2 releaseThe issue has been reproduced on latest 2.3 release