You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Item is set to Manage stock > NO
Customer purchases qty of items
Admin changes Manage stock to YES and sets to out of stock
Item is shown out of stock.
Admin ships order
Item qty is set to the same qty that has been shipped and now the item is in stock
The text was updated successfully, but these errors were encountered:
The scenario was that a customer purchased an item and on fulfilling the order used the last stock.
As the item was set to not manage stock this was changed to manage stock and qty to 0, out of stock
When the item was shipped the product qty increased to match the shipped qty.
The saleable qty didn't change but the qty of the product in admin did, causing confusion
This only happens with the following procedure
1: Item is set to Manage stock > NO
2: Customer purchases qty of items
3: Admin changes Manage stock to YES and sets to out of stock
Item is shown out of stock.
4:Admin ships order
It seems this code adds the qty
Magento\InventoryCatalog\Model\ResourceModel\SetDataToLegacyStockItem.php
when I comment out line 49, the products are not set so no qty gets updated after shipping
//$productIds = $this->getProductIdsBySkus->execute([$sku]);
The following steps update item qty
Item is set to Manage stock > NO
Customer purchases qty of items
Admin changes Manage stock to YES and sets to out of stock
Item is shown out of stock.
Admin ships order
Item qty is set to the same qty that has been shipped and now the item is in stock
The text was updated successfully, but these errors were encountered: