Fix: we must use conf-currency as parameter of method price instead of

using langs->getCurrencySymbol
This commit is contained in:
Laurent Destailleur 2013-09-15 13:04:38 +02:00
parent 5e969536c0
commit b20b82df3d
3 changed files with 10 additions and 19 deletions

View File

@ -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)

View File

@ -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++;

View File

@ -2221,7 +2221,7 @@ else
/*
* Linked object block
*/
*/
$somethingshown=$object->showLinkedObjectBlock();
print '</div><div class="fichehalfright"><div class="ficheaddleft">';