3 Replies Latest reply on Dec 12, 2016 6:45 PM by Joel_Geraci

    Help with javascript rounding (2nd attempt)




      I have already tried to get an answer in this thread last month: Help with javascript rounding


      I was asked to send the form and was supposed to get the form back with the javascript corrected.. but never got any reply (if someone else would like to take a look at my form I would really appreciate it).


      In any case, here is the problem:


      I have to add 3 Fields to get a TOTAL.




      So here is a real example :


      99,50 + 4,975 + 9.925125 = 114,400125 $


      The problem is that since the format of the Fields is set to "2 decimals", I get the following:


      99,50 + 4,98 + 9,93 = 114,40 $


      Evidently, the obvious result should be 114,41 $ (and not 114,40$).


      So what I need is the correct script that will correctly round TAX1 and TAX2 to 2 decimals, so that the total is 1 cent more...


      Any help is welcomed.