Copy link to clipboard
Copied
Hello! I came here a few months ago to ask for help setting up a form we use everyday at work. The field was set up with a tax exempt checkbox that removes the 7.5% tax from the subtotal, and with a payout checkbox that is not included in the tax amount.
Beginning this Wednesday, we are adding a fuel surcharge and credit card fee to our rating system. These changes should be comprehensive & final for the forseeable future, as there are no additional charges we will be adding anytime soon. The credit card fee will be 3%, and I've set up a checkbox that, when checked, should add 3% to the subtotal pre-tax (CC Fee should be taxed, unless tax exempt checkbox is checked). I have not attempted to add or alter any existing calculable fields to these new charge fields (Fuel Surcharge & CC Fee), as I'm not sure where or how the person who made these changes for me last time did this in the calculations.
Thank you so much for your time and expertise in helping out 'newbs' like me! You guys really are incredible.
Daniel
Copy link to clipboard
Copied
This article explains how to create a conditional calculation:
https://acrobatusers.com/tutorials/conditional-execution/
You can find an example file here:
https://www.pdfscripting.com/public/Free-Sample-PDF-Files-with-scripts.cfm
Copy link to clipboard
Copied
Thom,
I read that article when I was originally creating this form, and it is very involved for my expertise. I had originally used it to create the form, and posted only to ask for help in creating a tax exempt checkbox that would not apply tax to the subtotal. The person who responded helped me tremendously, but since they did the calculations somewhere that I'm not even seeing in the form properties, I'm not sure how to even access the existing modifications they made or to add in the checkbox for the 3% credit card fee pre-tax and fuel surcharge field pre-tax...
Thank you for your prompt reply.
Copy link to clipboard
Copied
The conditional calculation is in the Total field. You can see where the checkbox is used to either include the tax, or clear the tax field. It's not very well written, so I've reformatted the code here so it's easier to see.
if(this.getField("Check1").value != "Off"){
this.getField("TAX").value = 0;
event.value = sub-dsc;
}else
event.value = (sub+tax)-dsc;
Copy link to clipboard
Copied
I changed some calculations,but not sure if got all steps correct, see how it works now and if it need to change something:
https://drive.google.com/uc?export=download&id=166Plu9yQZ-iSPPoP6Me-QRcFmQU48p1T
Copy link to clipboard
Copied
Nesa,
Thank you so much for your help. Only a couple of changes are needed:
Again -- thanks so much for your time and help on this. This type of thing is very necessary for our dispatchers but is way above my level of expertise.
Copy link to clipboard
Copied
Copy link to clipboard
Copied
It's perfect. Thanks so much Nesa!