Copy link to clipboard
Copied
Hi, I would like to add a custm calculation in my tax box.
I want the user to check off either of the following:
No tax
13% tax
15% tax
Once checked, I want the percentage amount to calculate with the subtal.
What would be my script?
Copy link to clipboard
Copied
As custom calculation of tax field use this:
var notax = this.getField("taxnone").value;
var t13 = this.getField("tax13").value;
var t15 = this.getField("tax15").value;
var sub = Number(this.getField("subtotal").value);
if(notax != "Off")
event.value = 0;
else if(t13 != "Off")
event.value = .13*sub;
else if(t15 != "Off")
event.value = .15*sub;
else event.value = "";
Check if field names are correct, if not, change them to your actual field names.
Copy link to clipboard
Copied
Thank you very much for your time!!!
Find more inspiration, events, and resources on the new Adobe Community
Explore Now