diff --git a/htdocs/comm/propal.php b/htdocs/comm/propal.php index 6eefcf27155..75761ce93bf 100644 --- a/htdocs/comm/propal.php +++ b/htdocs/comm/propal.php @@ -635,7 +635,7 @@ else if ($action == "addline" && $user->rights->propal->creer) setEventMessage($langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("Type")), 'errors'); $error++; } - if ((empty($idprod) || GETPOST('usenewaddlineform')) && (!($price_ht >= 0) || $price_ht == '')) // Unit price can be 0 but not '' + if ((empty($idprod) || GETPOST('usenewaddlineform')) && (!($price_ht != 0) || $price_ht == '')) // Unit price can be 0 but not ''. Also price can be negative for proposal. { setEventMessage($langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("UnitPriceHT")), 'errors'); $error++; @@ -646,7 +646,7 @@ else if ($action == "addline" && $user->rights->propal->creer) $error++; } - if (! $error && (GETPOST('qty') >= 0) && (! empty($product_desc) || ! empty($idprod))) + if (! $error && (GETPOST('qty') != 0) && (! empty($product_desc) || ! empty($idprod))) // Price can be negative for proposal. { $pu_ht=0; $pu_ttc=0; @@ -1191,7 +1191,7 @@ if ($action == 'create') } print '
| '.$langs->trans('Ref').' | '.$langs->trans("Draft").' | |