add contant DISPLAY_DISCOUNTED_SUPPLIER_PRICE
This commit is contained in:
parent
cb131c56bf
commit
d3bb9d2cc2
@ -2747,23 +2747,23 @@ class Form
|
|||||||
}
|
}
|
||||||
if ($objp->quantity == 1)
|
if ($objp->quantity == 1)
|
||||||
{
|
{
|
||||||
$opt.= price($objp->fprice, 1, $langs, 0, 0, -1, $conf->currency)."/";
|
$opt.= price($objp->fprice * ($conf->global->DISPLAY_DISCOUNTED_SUPPLIER_PRICE?(1 - $objp->remise_percent / 100):1), 1, $langs, 0, 0, -1, $conf->currency)."/";
|
||||||
$outval.= price($objp->fprice, 0, $langs, 0, 0, -1, $conf->currency)."/";
|
$outval.= price($objp->fprice * ($conf->global->DISPLAY_DISCOUNTED_SUPPLIER_PRICE?(1 - $objp->remise_percent / 100):1), 0, $langs, 0, 0, -1, $conf->currency)."/";
|
||||||
$opt.= $langs->trans("Unit"); // Do not use strtolower because it breaks utf8 encoding
|
$opt.= $langs->trans("Unit"); // Do not use strtolower because it breaks utf8 encoding
|
||||||
$outval.=$langs->transnoentities("Unit");
|
$outval.=$langs->transnoentities("Unit");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$opt.= price($objp->fprice, 1, $langs, 0, 0, -1, $conf->currency)."/".$objp->quantity;
|
$opt.= price($objp->fprice * ($conf->global->DISPLAY_DISCOUNTED_SUPPLIER_PRICE?(1 - $objp->remise_percent / 100):1), 1, $langs, 0, 0, -1, $conf->currency)."/".$objp->quantity;
|
||||||
$outval.= price($objp->fprice, 0, $langs, 0, 0, -1, $conf->currency)."/".$objp->quantity;
|
$outval.= price($objp->fprice * ($conf->global->DISPLAY_DISCOUNTED_SUPPLIER_PRICE?(1 - $objp->remise_percent / 100):1), 0, $langs, 0, 0, -1, $conf->currency)."/".$objp->quantity;
|
||||||
$opt.= ' '.$langs->trans("Units"); // Do not use strtolower because it breaks utf8 encoding
|
$opt.= ' '.$langs->trans("Units"); // Do not use strtolower because it breaks utf8 encoding
|
||||||
$outval.= ' '.$langs->transnoentities("Units");
|
$outval.= ' '.$langs->transnoentities("Units");
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($objp->quantity >= 1)
|
if ($objp->quantity >= 1)
|
||||||
{
|
{
|
||||||
$opt.=" (".price($objp->unitprice, 1, $langs, 0, 0, -1, $conf->currency)."/".$langs->trans("Unit").")"; // Do not use strtolower because it breaks utf8 encoding
|
$opt.=" (".price($objp->unitprice * ($conf->global->DISPLAY_DISCOUNTED_SUPPLIER_PRICE?(1 - $objp->remise_percent / 100):1), 1, $langs, 0, 0, -1, $conf->currency)."/".$langs->trans("Unit").")"; // Do not use strtolower because it breaks utf8 encoding
|
||||||
$outval.=" (".price($objp->unitprice, 0, $langs, 0, 0, -1, $conf->currency)."/".$langs->transnoentities("Unit").")"; // Do not use strtolower because it breaks utf8 encoding
|
$outval.=" (".price($objp->unitprice * ($conf->global->DISPLAY_DISCOUNTED_SUPPLIER_PRICE?(1 - $objp->remise_percent / 100):1), 0, $langs, 0, 0, -1, $conf->currency)."/".$langs->transnoentities("Unit").")"; // Do not use strtolower because it breaks utf8 encoding
|
||||||
}
|
}
|
||||||
if ($objp->remise_percent >= 1)
|
if ($objp->remise_percent >= 1)
|
||||||
{
|
{
|
||||||
@ -2854,7 +2854,7 @@ class Form
|
|||||||
$langs->load('stocks');
|
$langs->load('stocks');
|
||||||
|
|
||||||
$sql = "SELECT p.rowid, p.label, p.ref, p.price, p.duration, pfp.fk_soc,";
|
$sql = "SELECT p.rowid, p.label, p.ref, p.price, p.duration, pfp.fk_soc,";
|
||||||
$sql.= " pfp.ref_fourn, pfp.rowid as idprodfournprice, pfp.price as fprice, pfp.quantity, pfp.unitprice,";
|
$sql.= " pfp.ref_fourn, pfp.rowid as idprodfournprice, pfp.price as fprice, pfp.remise_percent, pfp.quantity, pfp.unitprice,";
|
||||||
$sql.= " pfp.fk_supplier_price_expression, pfp.fk_product, pfp.tva_tx, s.nom as name";
|
$sql.= " pfp.fk_supplier_price_expression, pfp.fk_product, pfp.tva_tx, s.nom as name";
|
||||||
$sql.= " FROM ".MAIN_DB_PREFIX."product as p";
|
$sql.= " FROM ".MAIN_DB_PREFIX."product as p";
|
||||||
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."product_fournisseur_price as pfp ON p.rowid = pfp.fk_product";
|
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."product_fournisseur_price as pfp ON p.rowid = pfp.fk_product";
|
||||||
@ -2914,7 +2914,7 @@ class Form
|
|||||||
}
|
}
|
||||||
if ($objp->quantity == 1)
|
if ($objp->quantity == 1)
|
||||||
{
|
{
|
||||||
$opt.= price($objp->fprice, 1, $langs, 0, 0, -1, $conf->currency)."/";
|
$opt.= price($objp->fprice * ($conf->global->DISPLAY_DISCOUNTED_SUPPLIER_PRICE?(1 - $objp->remise_percent / 100):1), 1, $langs, 0, 0, -1, $conf->currency)."/";
|
||||||
}
|
}
|
||||||
|
|
||||||
$opt.= $objp->quantity.' ';
|
$opt.= $objp->quantity.' ';
|
||||||
@ -2930,7 +2930,7 @@ class Form
|
|||||||
if ($objp->quantity > 1)
|
if ($objp->quantity > 1)
|
||||||
{
|
{
|
||||||
$opt.=" - ";
|
$opt.=" - ";
|
||||||
$opt.= price($objp->unitprice, 1, $langs, 0, 0, -1, $conf->currency)."/".$langs->trans("Unit");
|
$opt.= price($objp->unitprice * ($conf->global->DISPLAY_DISCOUNTED_SUPPLIER_PRICE?(1 - $objp->remise_percent / 100):1), 1, $langs, 0, 0, -1, $conf->currency)."/".$langs->trans("Unit");
|
||||||
}
|
}
|
||||||
if ($objp->duration) $opt .= " - ".$objp->duration;
|
if ($objp->duration) $opt .= " - ".$objp->duration;
|
||||||
$opt .= "</option>\n";
|
$opt .= "</option>\n";
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user