Ajout d'un parametre la fonction price pour l'affichage html

This commit is contained in:
Rodolphe Quiedeville 2004-04-07 12:57:52 +00:00
parent 36a82f99d8
commit 575da57c05

View File

@ -826,13 +826,20 @@ function print_duree_select($prefix)
* Fonction utilisée dans les pdf et les pages
* html
*/
function price($amount)
function price($amount, $html=0)
{
return number_format($amount, 2, '.', ' ');
/* TODO implémenter cela plus tard
*$dec='.'; $thousand=' ';
*return ereg_replace(' ',' ',number_format($amount, 2, $dec, $thousand));
*/
if ($html)
{
$dec='.'; $thousand=' ';
return ereg_replace(' ',' ',number_format($amount, 2, $dec, $thousand));
}
else
{
return number_format($amount, 2, '.', ' ');
}
}
function francs($euros)