Skip to content
Snippets Groups Projects
Commit 417a1232 authored by Laurent Destailleur's avatar Laurent Destailleur
Browse files

Uniformize usage of function price

parent 55599f94
No related branches found
No related tags found
No related merge requests found
......@@ -181,8 +181,8 @@ if ($resql)
print '<td class="nobordernopadding">';
print $obj->societe;
print ($obj->societe && $obj->nom?' / ':'');
print dolGetFirstLastname($obj->nom,$obj->firstname);
print ($obj->societe && ($obj->lastname || $obj->firstname)?' / ':'');
print dolGetFirstLastname($obj->lastname,$obj->firstname);
print '</td>';
print '<td align="right" class="nobordernopadding">';
......
......@@ -425,14 +425,14 @@ else
print '<td class="nowrap" align="right">';
$temp_ht=$fields['totalht'];
if ($type == 1) $temp_ht=$fields['totalht']*$ratiopaymentinvoice;
print price(price2num($temp_ht,'MT'));
print price(price2num($temp_ht,'MT'),1);
print '</td>';
// VAT
print '<td class="nowrap" align="right">';
$temp_vat=$fields['vat'];
if ($type == 1) $temp_vat=$fields['vat']*$ratiopaymentinvoice;
print price(price2num($temp_vat,'MT'));
print price(price2num($temp_vat,'MT'),1);
//print price($fields['vat']);
print '</td>';
print '</tr>';
......@@ -576,14 +576,14 @@ else
print '<td class="nowrap" align="right">';
$temp_ht=$fields['totalht'];
if ($type == 1) $temp_ht=$fields['totalht']*$ratiopaymentinvoice;
print price(price2num($temp_ht,'MT'));
print price(price2num($temp_ht,'MT'),1);
print '</td>';
// VAT
print '<td class="nowrap" align="right">';
$temp_vat=$fields['vat'];
if ($type == 1) $temp_vat=$fields['vat']*$ratiopaymentinvoice;
print price(price2num($temp_vat,'MT'));
print price(price2num($temp_vat,'MT'),1);
//print price($fields['vat']);
print '</td>';
print '</tr>';
......
......@@ -1625,13 +1625,13 @@ class Form
if ($objp->custprice_base_type == 'HT')
{
$opt.= price($objp->custprice,1).' '.$currencytext.' '.$langs->trans("HT");
$outval.= price($objp->custprice,1).' '.$currencytextnoent.' '.$langs->transnoentities("HT");
$opt.= price($objp->custprice,1,$langs,0,0,-1,$conf->currency).' '.$langs->trans("HT");
$outval.= price($objp->custprice,0,$langs,0,0,-1,$conf->currency).' '.$langs->transnoentities("HT");
}
else
{
$opt.= price($objp->custprice_ttc,1).' '.$currencytext.' '.$langs->trans("TTC");
$outval.= price($objp->custprice_ttc,1).' '.$currencytextnoent.' '.$langs->transnoentities("TTC");
$opt.= price($objp->custprice_ttc,1,$langs,0,0,-1,$conf->currency).' '.$langs->trans("TTC");
$outval.= price($objp->custprice_ttc,0,$langs,0,0,-1,$conf->currency).' '.$langs->transnoentities("TTC");
}
$outprice_ht=price($objp->custprice);
......
......@@ -443,11 +443,11 @@ else
{
$pricemin=$objp->price;
print '<td align="right">';
print price(price2num($pricemin,'MU'));
print price(price2num($pricemin,'MU'),1);
print '</td>';
// Total sell min
print '<td align="right">';
print price(price2num($pricemin*$objp->value,'MT'));
print price(price2num($pricemin*$objp->value,'MT'),1);
print '</td>';
}
$totalvaluesell+=price2num($pricemin*$objp->value,'MT');
......
......@@ -627,11 +627,11 @@ if ($resql)
print '<td align="right">'.(price2num($obj->pmp)?price(price2num($obj->pmp*$obj->reel,'MT')):'').'</td>'; // Ditto : Show PMP from movement or from product
// Sell price
print '<td align="right">';
if (empty($conf->global->PRODUIT_MULTI_PRICES)) print price(price2num($product->price,'MU'));
if (empty($conf->global->PRODUIT_MULTI_PRICES)) print price(price2num($product->price,'MU'),1);
else print $langs->trans("Variable");
print '</td>'; // Ditto : Show PMP from movement or from product
print '<td align="right">';
if (empty($conf->global->PRODUIT_MULTI_PRICES)) print price(price2num($product->price*$obj->reel,'MT')).'</td>'; // Ditto : Show PMP from movement or from product
if (empty($conf->global->PRODUIT_MULTI_PRICES)) print price(price2num($product->price*$obj->reel,'MT'),1).'</td>'; // Ditto : Show PMP from movement or from product
else print $langs->trans("Variable");
print '</tr>'; ;
$total += $obj->reel;
......@@ -661,14 +661,14 @@ print '<td class="liste_total" align="right">';
print ($totalwithpmp?price($totalvalue/$totalwithpmp):'&nbsp;');
print '</td>';
print '<td class="liste_total" align="right">';
print price(price2num($totalvalue,'MT'));
print price(price2num($totalvalue,'MT'),1);
print '</td>';
print '<td class="liste_total" align="right">';
if (empty($conf->global->PRODUIT_MULTI_PRICES)) print ($total?price($totalvaluesell/$total):'&nbsp;');
if (empty($conf->global->PRODUIT_MULTI_PRICES)) print ($total?price($totalvaluesell/$total,1):'&nbsp;');
else print $langs->trans("Variable");
print '</td>';
print '<td class="liste_total" align="right">';
if (empty($conf->global->PRODUIT_MULTI_PRICES)) print price(price2num($totalvaluesell,'MT'));
if (empty($conf->global->PRODUIT_MULTI_PRICES)) print price(price2num($totalvaluesell,'MT'),1);
else print $langs->trans("Variable");
print '</td>';
print "</tr>";
......
......@@ -108,12 +108,12 @@ if ($result)
print '<td>'.$objp->lieu.'</td>';
// PMP value
print '<td align="right">';
if (price2num($objp->estimatedvalue,'MT')) print price(price2num($objp->estimatedvalue,'MT'));
if (price2num($objp->estimatedvalue,'MT')) print price(price2num($objp->estimatedvalue,'MT'),1);
else print '';
print '</td>';
// Selling value
print '<td align="right">';
if (empty($conf->global->PRODUIT_MULTIPRICES)) print price(price2num($objp->sellvalue,'MT'));
if (empty($conf->global->PRODUIT_MULTIPRICES)) print price(price2num($objp->sellvalue,'MT'),1);
else print $langs->trans("Variable");
print '</td>';
// Status
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment