Sum or add two currency field values

charanpreet
Kilo Expert

I am trying to sum up two currency field values with below code where cur1 and cur 2 are the values of currency field.

var val1 = cur1 + cur2;

the ouput is 200.001000.00, where cur1 = 200.00 and cur2=1000.00

The output should be 1200.00 and to be set in the currency field itself.

5 REPLIES 5

How to subtract currency values?