Fix the FACTURE_ENABLE_NEGATIVE was useless without
FACTURE_ENABLE_NEGATIVE_LINES
This commit is contained in:
parent
c67e57836e
commit
8ae25b3c65
@ -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;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user