Fix decimal render (#2975)

This commit is contained in:
jekkos committed 2021-04-22 22:28:12 +02:00
1 parent 8513a2b85b
commit 663da89293
1 file changed
+1 -1
+1 -1
View File
@@ -399,7 +399,7 @@ function to_decimals($number, $decimals=NULL, $type=\NumberFormatter::DECIMAL)
$config = get_instance()->config;
$fmt = new \NumberFormatter($config->item('number_locale'), $type);
$fmt->setAttribute(\NumberFormatter::MIN_FRACTION_DIGITS, 0);
$fmt->setAttribute(\NumberFormatter::MIN_FRACTION_DIGITS, empty($decimals) ? DEFAULT_PRECISION : $config->item($decimals));
$fmt->setAttribute(\NumberFormatter::MAX_FRACTION_DIGITS, empty($decimals) ? DEFAULT_PRECISION : $config->item($decimals));
if(empty($config->item('thousands_separator')))