From 8f0abe3378c89c9488f7c3c4906ca6f35374e420 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 30 Mar 2007 19:13:50 +0000 Subject: [PATCH] =?UTF-8?q?Fix:=20Affichage=20non=20traffiqu=E9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- htdocs/lib/functions.inc.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/htdocs/lib/functions.inc.php b/htdocs/lib/functions.inc.php index 71e6bf92894..969c016444e 100644 --- a/htdocs/lib/functions.inc.php +++ b/htdocs/lib/functions.inc.php @@ -1838,13 +1838,16 @@ function price($amount, $html=0, $outlangs='') if ($outlangs->trans("SeparatorDecimal") != "SeparatorDecimal") $dec=$outlangs->trans("SeparatorDecimal"); if ($outlangs->trans("SeparatorThousand")!= "SeparatorThousand") $thousand=$outlangs->trans("SeparatorThousand"); - //print "x".$langs->trans("SeparatorThousand")."x"; + //print "dec=".$dec." thousand=".$thousand; // On pose par defaut 2 decimales $decimal = 2; + //print "xx".$amount."-"; $amount = ereg_replace(',','.',$amount); - $datas = split('.',$amount); + //print $amount."-"; + $datas = split("\.",$amount); $decpart = $datas[1]; + //print $datas[1]."
"; // On augmente au besoin si il y a plus de 2 décimales if (strlen($decpart) > 2) $decimal=strlen($decpart);