From d7177575949edd6066a524ce209b6ff7a9f2897d Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 17 Jun 2016 10:40:11 +0200 Subject: [PATCH] Protect against bad value of accurancy to avoid javascript error --- htdocs/core/js/lib_head.js.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/htdocs/core/js/lib_head.js.php b/htdocs/core/js/lib_head.js.php index e3b1d0ed691..4d02acc9925 100644 --- a/htdocs/core/js/lib_head.js.php +++ b/htdocs/core/js/lib_head.js.php @@ -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 = global->MAIN_MAX_DECIMALS_SHOWN); ?>; - var main_rounding_unit = global->MAIN_MAX_DECIMALS_UNIT; ?>; - var main_rounding_tot = global->MAIN_MAX_DECIMALS_TOT; ?>; + var main_max_dec_shown = global->MAIN_MAX_DECIMALS_SHOWN); ?>; + var main_rounding_unit = global->MAIN_MAX_DECIMALS_UNIT; ?>; + var main_rounding_tot = global->MAIN_MAX_DECIMALS_TOT; ?>; var amount = amount.toString();