Fix: Control on minimum amount must be one only on standard and
replacement invoices.
This commit is contained in:
parent
6e96d60c6c
commit
27c6b30651
@ -1479,7 +1479,8 @@ elseif ($action == 'updateligne' && $user->rights->facture->creer && $_POST['sav
|
|||||||
|
|
||||||
$label = ((GETPOST('update_label') && GETPOST('product_label')) ? GETPOST('product_label'):'');
|
$label = ((GETPOST('update_label') && GETPOST('product_label')) ? GETPOST('product_label'):'');
|
||||||
|
|
||||||
if ($price_min && (price2num($pu_ht)*(1-price2num(GETPOST('remise_percent'))/100) < price2num($price_min)))
|
// Check price is not lower than minimum (check is done only for standard or replacement invoices)
|
||||||
|
if (($object->type == 0 || $object->type == 1) && $price_min && (price2num($pu_ht)*(1-price2num(GETPOST('remise_percent'))/100) < price2num($price_min)))
|
||||||
{
|
{
|
||||||
setEventMessage($langs->trans("CantBeLessThanMinPrice", price(price2num($price_min,'MU'),0,$langs,0,0,-1,$conf->currency)), 'errors');
|
setEventMessage($langs->trans("CantBeLessThanMinPrice", price(price2num($price_min,'MU'),0,$langs,0,0,-1,$conf->currency)), 'errors');
|
||||||
$error++;
|
$error++;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user