From d41675b028a232e83315ca12adbc190ec04e1b42 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=BCdiger=20Hahn?= Date: Sun, 8 Dec 2019 18:15:13 +0100 Subject: [PATCH 1/3] Fix translations --- htdocs/langs/en_US/sendings.lang | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/htdocs/langs/en_US/sendings.lang b/htdocs/langs/en_US/sendings.lang index f3f023f8dcf..5ce3b7f67e9 100644 --- a/htdocs/langs/en_US/sendings.lang +++ b/htdocs/langs/en_US/sendings.lang @@ -54,10 +54,10 @@ ActionsOnShipping=Events on shipment LinkToTrackYourPackage=Link to track your package ShipmentCreationIsDoneFromOrder=For the moment, creation of a new shipment is done from the order card. ShipmentLine=Shipment line -ProductQtyInCustomersOrdersRunning=Product quantity into open sales orders -ProductQtyInSuppliersOrdersRunning=Product quantity into open purchase orders +ProductQtyInCustomersOrdersRunning=Product quantity from open sales orders +ProductQtyInSuppliersOrdersRunning=Product quantity from open purchase orders ProductQtyInShipmentAlreadySent=Product quantity from open sales order already sent -ProductQtyInSuppliersShipmentAlreadyRecevied=Product quantity from open purchase order already received +ProductQtyInSuppliersShipmentAlreadyRecevied=Product quantity from open purchase orders already received NoProductToShipFoundIntoStock=No product to ship found in warehouse %s. Correct stock or go back to choose another warehouse. WeightVolShort=Weight/Vol. ValidateOrderFirstBeforeShipment=You must first validate the order before being able to make shipments. 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 2/3] 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"; From 4dd3cb346967e7cebecd2598a259f2587b2c7480 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=BCdiger=20Hahn?= Date: Fri, 13 Dec 2019 07:58:36 +0100 Subject: [PATCH 3/3] Prevent stock amount from becoming NULL Set stock to 0 if NULL --- htdocs/core/class/html.form.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index cac859c53b5..223f34a7dce 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -2095,7 +2095,7 @@ class Form } else { - $selectFieldsGrouped = ", p.stock"; + $selectFieldsGrouped = ", ".$db->ifsql("p.stock IS NULL", 0, "p.stock")." AS stock"; } $sql = "SELECT ";