Copy link to clipboard
Copied
This is for a towing company form I'm creating, and I'm stumped by the JavaScript I need to setup in order to calculate the grand total based on whether or not an account is taxed or tax exempt. The existing fields are as follows:
(1) Total Trip Miles ["MILES"] x (2) Dollars/Mile ["RATE"] = (4) Total Mileage Fees ["MILEAGE"] + (3) Tow/Hook Fee ("HOOK") + (5) "PAYOUT" [*This figure is NEVER taxed*] + (6) "OTHER" Fees = (7) "SUBTOTAL" + (8) "TAX" (@7.5%) - (9) "DISCOUNT" = (10) Grand Total "TOTAL"
The following fields are currently calculated using these commands:
- (4) MILEAGE: Value is the {Product} of "MILES, RATE"
- (7) SUBTOTAL: Value is the {Sum} of "HOOK, MILEAGE, PAYOUT, OTHER"
- (8) TAX: [Simplified Field Notation] "(HOOK+MILEAGE+OTHER)*0.075"
- (10) GRAND TOTAL: [Simplified Field Notation] "(SUBTOTAL+TAX)-DISCOUNT"
What I need is a 'Tax Exempt?' checkbox adjacent to the existing tax field that, when selected, will calculate the grand total based on the subtotal minus any discounts, but without tax. I realize there is probably some easier way to have conveyed what I need, but I am entirely befuzzled by custom calculations, so please bear with me and try to explain what I need to do in laymen's terms... thank you so much for anyone willing to help!
Copy link to clipboard
Copied
I added checkbox and code to your file see if thats what you wanted
https://drive.google.com/uc?export=download&id=1ihQcJ_6yYm0BryeP88NFgsiFKOKu8Q1n
Code is in TOTAL field.
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Copy link to clipboard
Copied
You are a lifesaver! Thank you for saving me a ton of headache.