Hi All,
I am calculating subtotals in adobe forms using java script and I am using decimal field to display.
Script code:
var fields = xfa.layout.pageContent(j, "field", 0); "Doubtful. Don't remember exact.
var total = 0;
for (var i=0; i <= fields.length-1; i++){
if (fields.item(i).name == "VALUE"){
total = parseFloat(total) + parseFloat(fields.item(i).rawValue);
}
}
this.rawValue = total;
I am getting the output as 36200 but I need it as 36200.00.
When there is decimal value in amount it gives proper output like 10.25+10.00 = 20.25.
But When I add 10.00 + 10.00, I get 20 instead of 20.00.
I tried using patterns but it’s not working. When I tried Currency pattern it is displaying $32600.00 but i don't need $ or any currency sign.
Request your help on this.
Response would be appreciated.
Thanks,
Ankit Agarwal