Utilise un espace insécable comme séparateur de milliers dans la fonction price afin de ne pas avoir de retour à la ligne au milieu d'un montant.

Cela évite des affichages incorrects ou coupé sur une page web, du montant.
This commit is contained in:
Laurent Destailleur 2004-02-27 17:14:26 +00:00
parent 83582d4bcc
commit c0a9840a66

View File

@ -804,13 +804,15 @@ function print_duree_select($prefix)
print "</select>\n";
}
/*
* Return an amount with format "9 999.99"
*/
function price($amount)
{
return number_format($amount, 2, '.', ' ');
//return sprintf("%.2f", $amount);
$dec='.'; $thousand=' ';
return ereg_replace(' ','&nbsp;',number_format($amount, 2, $dec, $thousand));
}
function francs($euros)
{
return price($euros * 6.55957);