Fix: quantity to deliver is 0 if negative
This commit is contained in:
parent
910107975a
commit
72c1852002
@ -180,7 +180,7 @@ if ($_REQUEST['action'] == 'builddoc') // En get ou en post
|
|||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
*
|
* View
|
||||||
*/
|
*/
|
||||||
|
|
||||||
llxHeader('',$langs->trans('Sending'),'Expedition');
|
llxHeader('',$langs->trans('Sending'),'Expedition');
|
||||||
@ -358,6 +358,7 @@ if ($_GET["action"] == 'create')
|
|||||||
$stock = $product->stock_entrepot[$_GET["entrepot_id"]];
|
$stock = $product->stock_entrepot[$_GET["entrepot_id"]];
|
||||||
$stock+=0; // Convertit en numérique
|
$stock+=0; // Convertit en numérique
|
||||||
$defaultqty=min($quantityToBeDelivered, $stock);
|
$defaultqty=min($quantityToBeDelivered, $stock);
|
||||||
|
if ($defaultqty < 0) $defaultqty=0;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Quantité à livrer
|
// Quantité à livrer
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user