You used parseInt
to convert that number to an integer and then used toFixed(2)
to convert it to a number with 2 decimal places. Adding 2 decimal places to an integer will always result in .00
.
Try
alert(remainderAmount.toFixed(2));
See DEMO.