diff --git a/install/tpl/config.inc.php.master b/install/tpl/config.inc.php.master index 1ce1c888fbfc5542aff417fa23de9e7ac44f47d1..86eb65c4bb4dfef06f018468694426b9b03768eb 100644 --- a/install/tpl/config.inc.php.master +++ b/install/tpl/config.inc.php.master @@ -148,6 +148,11 @@ $conf['logo'] = 'themes/default/images/ispc_logo.png'; $conf['language'] = '{language}'; $conf['debug_language'] = false; +//** Currency format +$conf['number_format_decimals'] = 2; +$conf['number_format_dec_point'] = ','; +$conf['number_format_thousands_sep'] = ''; + //** Misc. $conf['interface_logout_url'] = ''; // example: http://www.domain.tld/ diff --git a/interface/lib/classes/listform.inc.php b/interface/lib/classes/listform.inc.php index 7ac6f8110ce44340f8cd6834b7792d5a8cf8a2bb..664f9e5e459241e0fb93b79f35a39a051606fe55 100644 --- a/interface/lib/classes/listform.inc.php +++ b/interface/lib/classes/listform.inc.php @@ -329,7 +329,7 @@ class listform { break; case 'CURRENCY': - $record[$key] = number_format($record[$key], 2, ',', ''); + $record[$key] = number_format($record[$key], $conf['number_format_decimals'], $conf['number_format_dec_point'], $conf['number_format_thousands_sep']); break; default: diff --git a/interface/lib/classes/tform.inc.php b/interface/lib/classes/tform.inc.php index 95374300cf1d52c0c86575efc2a1752841ee9f11..a164e83cdf2d160712cc5bc63946fa2268817186 100644 --- a/interface/lib/classes/tform.inc.php +++ b/interface/lib/classes/tform.inc.php @@ -163,7 +163,8 @@ class tform { * @return record */ function decode($record,$tab) { - if(!is_array($this->formDef['tabs'][$tab])) $app->error("Tab does not exist or the tab is empty (TAB: $tab)."); + global $conf; + if(!is_array($this->formDef['tabs'][$tab])) $app->error("Tab does not exist or the tab is empty (TAB: $tab)."); $new_record = ''; if(is_array($record)) { foreach($this->formDef['tabs'][$tab]['fields'] as $key => $field) { @@ -198,7 +199,7 @@ class tform { break; case 'CURRENCY': - $new_record[$key] = number_format((double)$record[$key], 2, ',', ''); + $new_record[$key] = number_format((double)$record[$key], $conf['number_format_decimals'], $conf['number_format_dec_point'], $conf['number_format_thousands_sep']); break; default: diff --git a/interface/lib/config.inc.php b/interface/lib/config.inc.php index c6250c536b88fad70e54e2ec0fd67b25edf5dff7..b601a8733edeb67e8b3665d734106417529c5126 100644 --- a/interface/lib/config.inc.php +++ b/interface/lib/config.inc.php @@ -133,6 +133,11 @@ $conf['logo'] = 'themes/default/images/ispc_logo.png'; $conf['language'] = 'en'; $conf['debug_language'] = false; +//** Currency formatting +$conf['number_format_decimals'] = 2; +$conf['number_format_dec_point'] = ','; +$conf['number_format_thousands_sep'] = ''; + //** Misc. $conf['interface_logout_url'] = ''; // example: http://www.domain.tld/