Fix: possibility to defined rang with an external module
This commit is contained in:
parent
77aa19f885
commit
b3cf4598fd
@ -728,6 +728,9 @@ if ($_POST['action'] == "addline" && $user->rights->propale->creer)
|
|||||||
$info_bits=0;
|
$info_bits=0;
|
||||||
if ($tva_npr) $info_bits |= 0x01;
|
if ($tva_npr) $info_bits |= 0x01;
|
||||||
|
|
||||||
|
// Rang to use
|
||||||
|
$rang = (!empty($module->rangtouse)?$module->rangtouse:-1);
|
||||||
|
|
||||||
if ($prod->price_min && (price2num($pu_ht)*(1-price2num($_POST['remise_percent'])/100) < price2num($prod->price_min)))
|
if ($prod->price_min && (price2num($pu_ht)*(1-price2num($_POST['remise_percent'])/100) < price2num($prod->price_min)))
|
||||||
{
|
{
|
||||||
$mesg = '<div class="error">'.$langs->trans("CantBeLessThanMinPrice",price2num($prod->price_min,'MU').' '.$langs->trans("Currency".$conf->monnaie)).'</div>' ;
|
$mesg = '<div class="error">'.$langs->trans("CantBeLessThanMinPrice",price2num($prod->price_min,'MU').' '.$langs->trans("Currency".$conf->monnaie)).'</div>' ;
|
||||||
@ -748,7 +751,8 @@ if ($_POST['action'] == "addline" && $user->rights->propale->creer)
|
|||||||
$price_base_type,
|
$price_base_type,
|
||||||
$pu_ttc,
|
$pu_ttc,
|
||||||
$info_bits,
|
$info_bits,
|
||||||
$type
|
$type,
|
||||||
|
$rang
|
||||||
);
|
);
|
||||||
|
|
||||||
if ($result > 0)
|
if ($result > 0)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user