|
@@ -1839,7 +1839,7 @@ if (empty($reshook))
|
|
|
if ($tva_npr)
|
|
|
$info_bits |= 0x01;
|
|
|
|
|
|
- if (! empty($price_min) && (price2num($pu_ht) * (1 - price2num($remise_percent) / 100) < price2num($price_min))) {
|
|
|
+ if (empty($user->rights->produit->ignore_price_min) && (! empty($price_min) && (price2num($pu_ht) * (1 - price2num($remise_percent) / 100) < price2num($price_min)))) {
|
|
|
$mesg = $langs->trans("CantBeLessThanMinPrice", price(price2num($price_min, 'MU'), 0, $langs, 0, 0, - 1, $conf->currency));
|
|
|
setEventMessages($mesg, null, 'errors');
|
|
|
} else {
|
|
@@ -1984,7 +1984,7 @@ if (empty($reshook))
|
|
|
$label = ((GETPOST('update_label') && GETPOST('product_label')) ? GETPOST('product_label') : '');
|
|
|
|
|
|
// Check price is not lower than minimum (check is done only for standard or replacement invoices)
|
|
|
- if (($object->type == Facture::TYPE_STANDARD || $object->type == Facture::TYPE_REPLACEMENT) && $price_min && (price2num($pu_ht) * (1 - price2num(GETPOST('remise_percent')) / 100) < price2num($price_min))) {
|
|
|
+ if (empty($user->rights->produit->ignore_price_min) && (($object->type == Facture::TYPE_STANDARD || $object->type == Facture::TYPE_REPLACEMENT) && $price_min && (price2num($pu_ht) * (1 - price2num(GETPOST('remise_percent')) / 100) < price2num($price_min)))) {
|
|
|
setEventMessages($langs->trans("CantBeLessThanMinPrice", price(price2num($price_min, 'MU'), 0, $langs, 0, 0, - 1, $conf->currency)), null, 'errors');
|
|
|
$error ++;
|
|
|
}
|