diff --git a/htdocs/compta/facture/card.php b/htdocs/compta/facture/card.php index c299c1d1de5..cd436543079 100644 --- a/htdocs/compta/facture/card.php +++ b/htdocs/compta/facture/card.php @@ -1570,7 +1570,7 @@ if (empty($reshook)) setEventMessages($langs->trans('ErrorFieldRequired', $langs->transnoentitiesnoconv('Type')), null, 'errors'); $error ++; } - if ($prod_entry_mode == 'free' && empty($idprod) && (! ($price_ht >= 0) || $price_ht == '') && $price_ht_devise == '') // Unit price can be 0 but not '' + if ($prod_entry_mode == 'free' && empty($idprod) && (($price_ht < 0 && empty($conf->global->FACTURE_ENABLE_NEGATIVE_LINES)) || $price_ht == '') && $price_ht_devise == '') // Unit price can be 0 but not '' { setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("UnitPriceHT")), null, 'errors'); $error ++; @@ -3047,10 +3047,10 @@ else if ($id > 0 || ! empty($ref)) } } - // Confirmation de la validation + // Confirmation of validation if ($action == 'valid') { - // on verifie si l'objet est en numerotation provisoire + // we check object has a draft number $objectref = substr($object->ref, 1, 4); if ($objectref == 'PROV') { $savdate = $object->date;