Fix: we must use conf-currency as parameter of method price instead of
using langs->getCurrencySymbol
This commit is contained in:
parent
5e969536c0
commit
b20b82df3d
@ -1775,8 +1775,8 @@ class Form
|
||||
{
|
||||
$opt.= price($objp->fprice,1,$langs,0,0,-1,$conf->currency)."/".$objp->quantity;
|
||||
$outval.= price($objp->fprice,0,$langs,0,0,-1,$conf->currency)."/".$objp->quantity;
|
||||
$opt.= $langs->trans("Units"); // Do not use strtolower because it breaks utf8 encoding
|
||||
$outval.= $langs->transnoentities("Units");
|
||||
$opt.= ' '.$langs->trans("Units"); // Do not use strtolower because it breaks utf8 encoding
|
||||
$outval.= ' '.$langs->transnoentities("Units");
|
||||
}
|
||||
|
||||
if ($objp->quantity >= 1)
|
||||
|
||||
@ -79,35 +79,26 @@ if (! empty($idprod))
|
||||
|
||||
if ($objp->quantity == 1)
|
||||
{
|
||||
$title.= price($price);
|
||||
$title.= $langs->getCurrencySymbol($conf->currency)."/";
|
||||
$title.= price($price,0,$langs,0,0,-1,$conf->currency)."/";
|
||||
}
|
||||
$title.= $objp->quantity.' '.($objp->quantity == 1 ? $langs->trans("Unit") : $langs->trans("Units"));
|
||||
|
||||
$title.= $objp->quantity.' ';
|
||||
|
||||
if ($objp->quantity == 1)
|
||||
{
|
||||
$title.= strtolower($langs->trans("Unit"));
|
||||
}
|
||||
else
|
||||
{
|
||||
$title.= strtolower($langs->trans("Units"));
|
||||
}
|
||||
if ($objp->quantity > 1)
|
||||
{
|
||||
$title.=" - ";
|
||||
$title.= price($unitprice).$langs->getCurrencySymbol($conf->currency)."/".strtolower($langs->trans("Unit"));
|
||||
$title.= price($unitprice,0,$langs,0,0,-1,$conf->currency)."/".$langs->trans("Unit");
|
||||
|
||||
$price = $unitprice;
|
||||
}
|
||||
if ($objp->unitcharges > 0 && ($conf->global->MARGIN_TYPE == "2")) {
|
||||
if ($objp->unitcharges > 0 && ($conf->global->MARGIN_TYPE == "2"))
|
||||
{
|
||||
$title.=" + ";
|
||||
$title.= price($objp->unitcharges).$langs->getCurrencySymbol($conf->currency);
|
||||
$title.= price($objp->unitcharges,0,$langs,0,0,-1,$conf->currency);
|
||||
$price += $objp->unitcharges;
|
||||
}
|
||||
if ($objp->duration) $label .= " - ".$objp->duration;
|
||||
|
||||
$label = price($price).$langs->getCurrencySymbol($conf->currency)."/".strtolower($langs->trans("Unit"));
|
||||
$label = price($price,0,$langs,0,0,-1,$conf->currency)."/".$langs->trans("Unit");
|
||||
|
||||
$prices[] = array("id" => $objp->idprodfournprice, "price" => price($price,0,'',0), "label" => $label, "title" => $title);
|
||||
$i++;
|
||||
|
||||
@ -2221,7 +2221,7 @@ else
|
||||
|
||||
/*
|
||||
* Linked object block
|
||||
*/
|
||||
*/
|
||||
$somethingshown=$object->showLinkedObjectBlock();
|
||||
|
||||
print '</div><div class="fichehalfright"><div class="ficheaddleft">';
|
||||
|
||||
Loading…
Reference in New Issue
Block a user