Due to the particular value you get, I'm going to guess that your currentAmount
isn't 1000
as you claim, but rather 1,000
or 1 000
or even 1'000
in some countries. When parseFloat
gets hold of that, it sees only 1
because ,
isn't a valid character in numbers. 1 / 1.3703
is 0.7298...
.
Numbers must not have thousand separators, and decimals must be a point. (As someone who grew up in France, I know this can be confusing!)