Fix: Regression for negative proposal lines.
This commit is contained in:
parent
1e5c56642c
commit
f041a8a95e
@ -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 '<table class="border" width="100%">';
|
||||
|
||||
|
||||
// Reference
|
||||
print '<tr><td class="fieldrequired">'.$langs->trans('Ref').'</td><td colspan="2">'.$langs->trans("Draft").'</td></tr>';
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user