The stock is_salable index value is not correct #39731
Labels
Area: Inventory / MSI
Component: DB
Issue: Confirmed
Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed
Priority: P3
May be fixed according to the position in the backlog.
Reported on 2.4.7-p4
Indicates original Magento version for the Issue report.
Reproduced on 2.4.x
The issue has been reproduced on latest 2.4-develop branch
Preconditions and environment
Steps to reproduce
is_salable
column in the tableinventory_stock_{storeId}
Expected result
is_salable = 0
Actual result
is_salable = 1
Additional information
The product salable quantity is 0 because min_qty is set to 0 if product is no backorder. It is set by plugin
\Magento\InventoryCatalog\Plugin\CatalogInventory\Api\Data\StockItemInterface\AdaptMinQtyToBackordersPlugin::afterGetMinQty
But for indexer, this logic is not applied so min_qty is still -10 and available qty is 0 - (-10) = 10
Release note
No response
Triage and priority
The text was updated successfully, but these errors were encountered: