Calculate Tax Owed Script in PDF
I haven't written formulas for PDF before, but have programmed websites for over 20 years. I need to display the tax owed in a field, which will be the result of the following: ("Subtotal Parts" + "Subtotal Labor")*.08 = "TaxOwed" where the field labels/names are in the quote marks. I have no idea how to write this formula! Can someone help me, please? I'm assuming this would go in the Field Properties > Calculate > Custom calculation script field, correct?
Here is the current script that I thought would work:
var p = this.getField("Subtotal Parts");
var l = this.getField("Subtotal Labor");
event.value = Math.round((p+l).value * 8.25) / 100;
