From 575da57c05a297643023b9fc4b60664782f8d449 Mon Sep 17 00:00:00 2001 From: Rodolphe Quiedeville Date: Wed, 7 Apr 2004 12:57:52 +0000 Subject: [PATCH] =?UTF-8?q?Ajout=20d'un=20parametre=20=E0=20la=20fonction?= =?UTF-8?q?=20price=20pour=20l'affichage=20html?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- htdocs/lib/functions.inc.php | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) 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)