magento2-disable-stock-reservation
magento2-disable-stock-reservation copied to clipboard
After Shipping Qty added to out of stock item
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 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]);
if (isset($productIds[$sku])) {
Hi @phes71, is this still an issue? Thanks