I'm trying to make my calculations have .00 at the end of each amount. The app I'm building will be doing print outs for checks. Right now if an amount is $20.50 cents it's displayed at $20.5 which is not acceptable for checks.
<script type="text/javascript">
$(document).ready(function(){
$(".input").keyup(function(){
var val1 = +$(".washer").val();
var val2 = +$(".dryer").val();
var val3 = +$(".multi").val();
var val4 = +$(".deduct").val();
Math.round($("#result").val(val1+val2));
var wtf = val4.toFixed(2);
$("#result_mtbp").val(Math.round((val1+val2)*(val3)*100)/(100));
$("#result_netp").val(Math.round((val1+val2)*(val3-val4)*100)/100);
});
});
</script>
I've perused through other solutions but cannot figure out how to implement them. Thanks in advance!