noalyss-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Noalyss-commit] [noalyss] 17/107: Mantis #0001651: Problème avec totau


From: Dany De Bontridder
Subject: [Noalyss-commit] [noalyss] 17/107: Mantis #0001651: Problème avec totaux en CA
Date: Mon, 26 Aug 2019 10:31:48 -0400 (EDT)

sparkyx pushed a commit to branch master
in repository noalyss.

commit 2cffe46e01f1cbef1c0922553cafb8d77832f0d2
Author: Dany De Bontridder <address@hidden>
Date:   Mon Feb 18 21:57:16 2019 +0100

    Mantis #0001651: Problème avec totaux en CA
---
 html/js/anc_script.js | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/html/js/anc_script.js b/html/js/anc_script.js
index 97e524d..9e2b7a3 100644
--- a/html/js/anc_script.js
+++ b/html/js/anc_script.js
@@ -83,11 +83,11 @@ function compute_total_table(p_table, seq)
         for (i = 0; i < col.length; i++)
         {
             if ( $(p_table).contains(col[i])) {
-                rounded_value = parseFloat(col[i].value);
-                tot += Math.round(rounded_value*100)/100;
+                rounded_value = Math.round(parseFloat(col[i].value) *100);
+                tot += rounded_value
             }
         }
-        return tot;
+        return tot/100;
     }
     catch (e)
     {
@@ -106,6 +106,7 @@ function anc_refresh_remain(p_table, p_seq)
     {
         var tot_line =Math.abs( parseFloat(g('amount_t' + p_seq).value));
         var tot_table = compute_total_table(p_table, p_seq);
+
         var remain = tot_line - tot_table;
         remain = Math.round(remain * 100) / 100;
         $('remain' + p_table).innerHTML = remain;



reply via email to

[Prev in Thread] Current Thread [Next in Thread]