magento2-disable-stock-reservation icon indicating copy to clipboard operation
magento2-disable-stock-reservation copied to clipboard

After Shipping Qty added to out of stock item

Open phes71 opened this issue 3 years ago • 2 comments
trafficstars

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

phes71 avatar Nov 01 '22 14:11 phes71

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])) {

phes71 avatar Nov 14 '22 14:11 phes71

Hi @phes71, is this still an issue? Thanks

tr33m4n avatar Feb 09 '24 21:02 tr33m4n