From db0d352af3d485187f7b5a9ee20f03106b88f1f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=BCdiger=20Hahn?= Date: Wed, 20 Nov 2019 12:53:23 +0100 Subject: [PATCH] Use virtual stock when this has been configured When "Use virtual stock by default, instead of physical stock, for replenishment feature" has been set in configuration, this should really be used. Otherwise only physically missing items will be shown in replenishment. --- htdocs/product/stock/replenish.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/product/stock/replenish.php b/htdocs/product/stock/replenish.php index 0de9fa76786..99a4b4c286e 100644 --- a/htdocs/product/stock/replenish.php +++ b/htdocs/product/stock/replenish.php @@ -89,7 +89,7 @@ if (! empty($conf->global->STOCK_CALCULATE_ON_SHIPMENT) { $virtualdiffersfromphysical=1; // According to increase/decrease stock options, virtual and physical stock may differs. } -$usevirtualstock=0; +$usevirtualstock = !empty($conf->global->STOCK_USE_VIRTUAL_STOCK); if ($mode == 'virtual') $usevirtualstock=1; $parameters=array();