From 72c1852002c918c818c4c8eba21dc5238eae5b05 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 21 Aug 2008 07:39:38 +0000 Subject: [PATCH] Fix: quantity to deliver is 0 if negative --- htdocs/expedition/fiche.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/htdocs/expedition/fiche.php b/htdocs/expedition/fiche.php index 4aae735c925..e8b51db79d5 100644 --- a/htdocs/expedition/fiche.php +++ b/htdocs/expedition/fiche.php @@ -180,7 +180,7 @@ if ($_REQUEST['action'] == 'builddoc') // En get ou en post /* - * + * View */ llxHeader('',$langs->trans('Sending'),'Expedition'); @@ -358,6 +358,7 @@ if ($_GET["action"] == 'create') $stock = $product->stock_entrepot[$_GET["entrepot_id"]]; $stock+=0; // Convertit en numérique $defaultqty=min($quantityToBeDelivered, $stock); + if ($defaultqty < 0) $defaultqty=0; } // Quantité à livrer