fixed not working precistion display

This commit is contained in:
Ralf Becker 2009-07-15 10:47:36 +00:00
parent 8dc163f04f
commit 1dc2c88059

View File

@ -1113,7 +1113,7 @@ class etemplate extends boetemplate
if (($type == 'float' || !is_numeric($pre)) && $value && $pre)
{
$value = str_replace(array(' ',','),array('','.'),$value);
$value = is_numeric($pre) ? round($value,$pre) : sprintf($pre,$value);
$value = is_numeric($pre) ? number_format($value,$pre,'.','') : sprintf($pre,$value);
}
$cell_options .= ',,'.($cell['type'] == 'int' ? '/^-?[0-9]*$/' : '/^-?[0-9]*[,.]?[0-9]*$/');
// fall-through