forked from Wavyzz/dolibarr
Protect against bad value of accurancy to avoid javascript error
This commit is contained in:
@@ -1035,9 +1035,9 @@ function price2numjs(amount) {
|
||||
print "var dec='" . dol_escape_js($dec) . "'; var thousand='" . dol_escape_js($thousand) . "';\n"; // Set var in javascript
|
||||
?>
|
||||
|
||||
var main_max_dec_shown = <?php echo str_replace('.', '', $conf->global->MAIN_MAX_DECIMALS_SHOWN); ?>;
|
||||
var main_rounding_unit = <?php echo $conf->global->MAIN_MAX_DECIMALS_UNIT; ?>;
|
||||
var main_rounding_tot = <?php echo $conf->global->MAIN_MAX_DECIMALS_TOT; ?>;
|
||||
var main_max_dec_shown = <?php echo (int) str_replace('.', '', $conf->global->MAIN_MAX_DECIMALS_SHOWN); ?>;
|
||||
var main_rounding_unit = <?php echo (int) $conf->global->MAIN_MAX_DECIMALS_UNIT; ?>;
|
||||
var main_rounding_tot = <?php echo (int) $conf->global->MAIN_MAX_DECIMALS_TOT; ?>;
|
||||
|
||||
var amount = amount.toString();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user