You are not logged in.
Pages: 1
Topic closed
Hi,
Can we lose the "," thats been added into ticket numbers ? In modern English, you would use commas when describing monetary items, but not when its a static number such as a ticket reference.
GLPI 0.83.91/CENTOS5 - OCS 1.01/Win2003
Offline
Hi, it's just a workaround and it is NOT update proof but I've obtained the result you expect with this modifications:
- inc/config.class.php line ~749:
change from
$values = array
(0 => '1 234.56',
1 => '1,234.56',
2 => '1 234,56');
to
$values = array
(0 => '1 234.56',
1 => '1,234.56',
2 => '1 234,56',
3 => '1234.56');
- inc/html.class.php line ~288:
change from
switch ($_SESSION['glpinumber_format']) {
case 2 : // Other French
return str_replace(' ', ' ', number_format($number, $decimal, ',', ' '));
case 0 : // French
return str_replace(' ', ' ', number_format($number, $decimal, '.', ' '));
default: // English
return number_format($number, $decimal, '.', ',');
}
to
switch ($_SESSION['glpinumber_format']) {
case 2 : // Other French
return str_replace(' ', ' ', number_format($number, $decimal, ',', ' '));
case 0 : // French
return str_replace(' ', ' ', number_format($number, $decimal, '.', ''));
case 3 :
return str_replace(' ', ' ', number_format($number, $decimal, ',', ''));
default: // English
return number_format($number, $decimal, '.', ',');
}
It works with glpi 0.83.2 and with 0.83.31 (tested today)
It would be great to have the option to format numbers this way implemented by default
Offline
Hi conte64,
thanks for that - I'd really like it to be put in as a bug/update though, rather than a hack. Its not consistant either, there are parts of GLPI that still reference the old way without commas. I don't know why they changed it.
GLPI 0.83.91/CENTOS5 - OCS 1.01/Win2003
Offline
You are right. But I had to fix this now so I written those lines of code. Hope it will be fixed permanently in next releases.
Regards.
Offline
Pages: 1
Topic closed