better constant test
This commit is contained in:
parent
d3bb9d2cc2
commit
4e533b2a91
@ -2747,23 +2747,23 @@ class Form
|
|||||||
}
|
}
|
||||||
if ($objp->quantity == 1)
|
if ($objp->quantity == 1)
|
||||||
{
|
{
|
||||||
$opt.= price($objp->fprice * ($conf->global->DISPLAY_DISCOUNTED_SUPPLIER_PRICE?(1 - $objp->remise_percent / 100):1), 1, $langs, 0, 0, -1, $conf->currency)."/";
|
$opt.= price($objp->fprice * (!empty($conf->global->DISPLAY_DISCOUNTED_SUPPLIER_PRICE)?(1 - $objp->remise_percent / 100):1), 1, $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)."/";
|
$outval.= price($objp->fprice * (!empty($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 * ($conf->global->DISPLAY_DISCOUNTED_SUPPLIER_PRICE?(1 - $objp->remise_percent / 100):1), 1, $langs, 0, 0, -1, $conf->currency)."/".$objp->quantity;
|
$opt.= price($objp->fprice * (!empty($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 * ($conf->global->DISPLAY_DISCOUNTED_SUPPLIER_PRICE?(1 - $objp->remise_percent / 100):1), 0, $langs, 0, 0, -1, $conf->currency)."/".$objp->quantity;
|
$outval.= price($objp->fprice * (!empty($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 * ($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
|
$opt.=" (".price($objp->unitprice * (!empty($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 * ($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
|
$outval.=" (".price($objp->unitprice * (!empty($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)
|
||||||
{
|
{
|
||||||
@ -2914,7 +2914,7 @@ class Form
|
|||||||
}
|
}
|
||||||
if ($objp->quantity == 1)
|
if ($objp->quantity == 1)
|
||||||
{
|
{
|
||||||
$opt.= price($objp->fprice * ($conf->global->DISPLAY_DISCOUNTED_SUPPLIER_PRICE?(1 - $objp->remise_percent / 100):1), 1, $langs, 0, 0, -1, $conf->currency)."/";
|
$opt.= price($objp->fprice * (!empty($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 * ($conf->global->DISPLAY_DISCOUNTED_SUPPLIER_PRICE?(1 - $objp->remise_percent / 100):1), 1, $langs, 0, 0, -1, $conf->currency)."/".$langs->trans("Unit");
|
$opt.= price($objp->unitprice * (!empty($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