diff --git a/htdocs/lib/functions.inc.php b/htdocs/lib/functions.inc.php index b55083e5737..c5e29fc6302 100644 --- a/htdocs/lib/functions.inc.php +++ b/htdocs/lib/functions.inc.php @@ -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)