From 1cb712d57caefc12bc1ce14956324e482cc1a38e Mon Sep 17 00:00:00 2001 From: sparkyx Date: Sun, 25 Apr 2021 23:32:47 +0200 Subject: [PATCH] =?UTF-8?q?Bug=20#0001971:=20erreur=20calcul=20dans=20cham?= =?UTF-8?q?p=20prix/unit=C3=A9=20htva?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- html/js/scripts.js | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/html/js/scripts.js b/html/js/scripts.js index 60d67fd4b..6932dda62 100644 --- a/html/js/scripts.js +++ b/html/js/scripts.js @@ -289,6 +289,7 @@ function compute_number(value) points dans le nombre et eval() lève une exception*/ try { + console.debug("value = "+value); retval = eval(value); } catch (e) { @@ -320,7 +321,7 @@ function format_number(obj, p_prec) precision = p_prec; } var value = obj.value; - value = value.replace(/,/, '.'); + value = value.replace(/,/g, '.'); value=compute_number(value); @@ -604,16 +605,8 @@ function popup_select_tva(obj) alert_box("popup_select_tva " + e.message); } } -/** - *@brief display the popup with vat and explanations - *@deprecated this function is not used anymore - */ -function success_popup_select_tva_obsolete(req) -{ -} - /** *@brief display the popup with vat and explanation *@param obj with 4 attributes gdossier, ctl,popup