I am making a simple daily sales and expense report sheet to store on my server with inputed information. The problem I am having is the output, or the result uses the two decimal places, but it multiplies from the inputed information but from the whole number, and ignores the decimal places.
So the equation is supposed to sales * 12% = result, but if I put in $40 for sales, the result 4.80 (correct) if I put in $39 for sales, the result 4.68 (correct) if I put in $39.95 for sales, the result is 4.68 (incorrect) when it should be 4.79
so here is what I am working with
var ppc = parseInt(document.form.ppc.value);
var result=ppc * 0.12;
document.form.prof1.value=result.toFixed(2);
If I am doing this in a stupid way, its cause Im new to js and jq and dont quite understand it, feel free to correct me for the right way to do this