function ($value) {
// bring in line with decimal precision
$prec = $this->decimalPrecision;
$thousends = $this->asId ? '' : $this->thousends;
if ($prec!==null) {
$value = round($value, $prec); //otherwise it gets trucated
return number_format($value, $prec, $this->decimal, $thousends);
}
$arr = explode(ValueValidator::getInternalDecimalSeparator(), "$value");
$string = number_format((float)$arr[0], 0, $this->decimal, $thousends);
if (isSet($arr[1]))
$string .= $this->decimal. $arr[1];
return $string;
}
|