I am using JavaScript
to show text box dynamically
and calculations are used in javascript
like
function add_number(k) {
var rate = parseFloat(document.getElementById("rate-"+k).value);
var units = parseFloat(document.getElementById("unit-"+k).value);
var disc = parseFloat(document.getElementById("dis-"+k).value);
var result = rate * units;
var discnt =result - disc;
var disamt =parseFloat(discnt).toFixed(2);
var utgp = 9;
var persnt = parseFloat((discnt * utgp) /100).toFixed(2);
var totl = discnt +(persnt * 2);
var totls = parseFloat(totl).toFixed(2);
document.getElementById("taxs-"+k).value = disamt;
document.getElementById("utgp-"+k).value = utgp;
document.getElementById("utg-"+k).value = persnt;
document.getElementById("cgstp-"+k).value = utgp;
document.getElementById("cgst-"+k).value = persnt;
document.getElementById("total-"+k).value = totls;
document.getElementById("taxtotal").value = disamt;
}
how to find tax total here show last enter value I have to show every click of tax amt field show total in below column how to calculate ?