Magento 可售库存算法: 库存 - 保留的库存 - 最小可售数量
vendor/magento/module-inventory-sales/Model/GetProductSalableQty.php
line 84
$productQtyInStock = $stockItemData[GetStockItemDataInterface::QUANTITY]
+ $this->getReservationsQuantity->execute($sku, $stockId)
- $minQty;
涉及的表:
cataloginventory_stock_status
inventory_reservation
(保留库存表,为负值)
$minQty 为加购的最小数量