From cc96ad03c1315d5265d1897f18a566114d07d418 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=BCdiger=20Hahn?= Date: Wed, 11 Dec 2019 14:00:27 +0100 Subject: [PATCH] Update replenish.php --- 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 d3a647adfcf..b909a9f2e9d 100644 --- a/htdocs/product/stock/replenish.php +++ b/htdocs/product/stock/replenish.php @@ -367,7 +367,7 @@ if ($usevirtualstock) $sqlExpeditionsCli .= " LEFT JOIN ".MAIN_DB_PREFIX."commande as c ON (c.rowid = cd.fk_commande)"; $sqlExpeditionsCli .= " WHERE e.entity IN (".getEntity('expedition').")"; $sqlExpeditionsCli .= " AND cd.fk_product = p.rowid"; - $sqlExpeditionsCli .= " AND c.fk_statut IN (1,2))"; + $sqlExpeditionsCli .= " AND e.fk_statut IN (1,2))"; $sqlCommandesFourn = "(SELECT ".$db->ifsql("SUM(cd.qty) IS NULL", "0", "SUM(cd.qty)")." as qty"; $sqlCommandesFourn .= " FROM ".MAIN_DB_PREFIX."commande_fournisseurdet as cd";