diff --git a/htdocs/fourn/class/fournisseur.commande.class.php b/htdocs/fourn/class/fournisseur.commande.class.php index 0ae72b8f96d..b7ee4ee7232 100644 --- a/htdocs/fourn/class/fournisseur.commande.class.php +++ b/htdocs/fourn/class/fournisseur.commande.class.php @@ -1704,7 +1704,7 @@ class CommandeFournisseur extends CommonOrder $this->error='ErrorBadValueForParameterWarehouse'; return -1; } - if ($qty <= 0) + if ($qty == 0) { $this->error='ErrorBadValueForParameterQty'; return -1; diff --git a/htdocs/fourn/commande/dispatch.php b/htdocs/fourn/commande/dispatch.php index dba45be1bc5..c55183921f2 100644 --- a/htdocs/fourn/commande/dispatch.php +++ b/htdocs/fourn/commande/dispatch.php @@ -243,7 +243,7 @@ if ($action == 'dispatch' && $user->rights->fournisseur->commande->receptionner) $fk_commandefourndet = "fk_commandefourndet_" . $reg[1] . '_' . $reg[2]; // We ask to move a qty - if (GETPOST($qty) > 0) { + if (GETPOST($qty) != 0) { if (! (GETPOST($ent, 'int') > 0)) { dol_syslog('No dispatch for line ' . $key . ' as no warehouse choosed'); $text = $langs->transnoentities('Warehouse') . ', ' . $langs->transnoentities('Line') . ' ' . ($numline);