diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index dd0d145be96..c5414d6c89c 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -2097,7 +2097,7 @@ class Form } else { - $selectFieldsGrouped = ", p.stock"; + $selectFieldsGrouped = ", ".$db->ifsql("p.stock IS NULL", 0, "p.stock")." AS stock"; } $sql = "SELECT "; 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. diff --git a/htdocs/product/stock/replenish.php b/htdocs/product/stock/replenish.php index 640a6eaa32e..2e62e7447e7 100644 --- a/htdocs/product/stock/replenish.php +++ b/htdocs/product/stock/replenish.php @@ -374,7 +374,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";