Fix: quantity to deliver is 0 if negative

This commit is contained in:
Laurent Destailleur 2008-08-21 07:39:38 +00:00
parent 910107975a
commit 72c1852002

View File

@ -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