Skip to content

Commit 7580620

Browse files
author
Cody Nguyen
committed
Return current stock qty instead of stock left after minus the minQty
1 parent 09eb76b commit 7580620

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

app/code/Magento/CatalogInventoryGraphQl/Model/Resolver/OnlyXLeftInStockResolver.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ private function getOnlyXLeftQty(ProductInterface $product): ?float
8787
$stockLeft = $stockCurrentQty - $stockItem->getMinQty();
8888

8989
if ($stockLeft > 0 && $stockLeft <= $thresholdQty) {
90-
return (float)$stockLeft;
90+
return (float)$stockCurrentQty;
9191
}
9292

9393
return null;

0 commit comments

Comments
 (0)