mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-12-15 22:11:36 +01:00
Utilise un espace inscable comme sparateur 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:
@@ -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(' ',' ',number_format($amount, 2, $dec, $thousand));
|
||||
}
|
||||
|
||||
|
||||
function francs($euros)
|
||||
{
|
||||
return price($euros * 6.55957);
|
||||
|
||||
Reference in New Issue
Block a user