10 Replies Latest reply on Apr 16, 2013 1:30 PM by Coyotefankw

# Newbie, I need to calculate 5 items to a Sub Total + Tax 1.5% = total fields

I have a form the has 5 items, I need to calculate the fields to get a total with tax included.

Iv'e tried to use the formulas that other people requestred and they do not work, what am I doing wrong?

I have created numerous forms but never one that requires field calculations. I'm lost at this point, PLEASE Help!!

Example:

Item 1

Item 2

Item 3

Item 4

Iten 5

Sub Total

Tax

Total

Thank you,

Coyotefankw

• ###### 1. Re: Newbie, I need to calculate 5 items to a Sub Total + Tax 1.5% = total fields

Just set the SubTotal field to be the sum of the item-fields, and then set the tax field to equal 0.015 (to get 1.5%).

Then for the Total field use this as the Simplified Field Notation code (under the Calculate tab):

SubTotal * (1+Tax)

You will need to make sure, though, that Total is calcluated after SubTotal in the field calcluation order.

• ###### 2. Re: Newbie, I need to calculate 5 items to a Sub Total + Tax 1.5% = total fields

You may want to separately state the tax collected for full disclosure the the client and the taxing authority. The client may need to tax separately stated for other purposes and the taxing authority might require it.

• ###### 3. Re: Newbie, I need to calculate 5 items to a Sub Total + Tax 1.5% = total fields

Thanks try67,

I think that worked, I submitted it to my client for testing.

This is just the push i needed to go take a javascript class next semester.

Thanks Again!

Coyotefankw

• ###### 4. Re: Newbie, I need to calculate 5 items to a Sub Total + Tax 1.5% = total fields

I'm glad to hear it, but you should know that the code I provided is not

written in JS...

• ###### 5. Re: Newbie, I need to calculate 5 items to a Sub Total + Tax 1.5% = total fields

Hi try67,

that formula that you gave didn't work. Any other suggestions??? I'm getting desperate for a solution, client getting upset. Anything you can suggest would be most helpfull.

Thank you,

Coyotefankw

"Just set the SubTotal field to be the sum of the item-fields, and then set the tax field to equal 0.015 (to get 1.5%).

Then for the Total field use this as the Simplified Field Notation code (under the Calculate tab):

SubTotal * (1+Tax)

You will need to make sure, though, that Total is calcluated after SubTotal in the field calcluation order."

• ###### 6. Re: Newbie, I need to calculate 5 items to a Sub Total + Tax 1.5% = total fields

What were the input values and what were the calculated totals?

Try adding or changing one of the detail items and see what happens?

If it is computing the any expected value for the previous data, then your field calculation order is wrong.

Open the Acrobat JavaScript (Ctrk + J) console and see if there are any messages.

Actually JavaScript is being used to perform the calculations. Using either of the firs 2 options is just providing parameters to a JavaScript function that performs the calculation per the supplied parameters.

• ###### 7. Re: Newbie, I need to calculate 5 items to a Sub Total + Tax 1.5% = total fields

Yes here azre the errors:

Acrobat EScript Built-in Functions Version 9.0

Acrobat Annotations / Collaboration Built-in Functions Version 9.0

Acrobat Annotations / Collaboration Built-in Wizard Functions Version 9.0

Acrobat SOAP 9.0

SyntaxError: invalid assignment left-hand side

1:Field:Calculate

SyntaxError: invalid assignment left-hand side

1:Field:Calculate

ReferenceError: RateSubTotal is not defined

1:Field:Calculate

• ###### 8. Re: Newbie, I need to calculate 5 items to a Sub Total + Tax 1.5% = total fields

Here are the fields I need to calculate example:

• ###### 9. Re: Newbie, I need to calculate 5 items to a Sub Total + Tax 1.5% = total fields

For RateSubTotal:

RateRow1 + RateRow2 + RateRow3 + RateRow4 + RateRow5

For RateTax:

RateSubTotal * 0.015

For RateTotal:

RateSubTotal + RateTax

A generic form with the calculation 3 different ways.

• ###### 10. Re: Newbie, I need to calculate 5 items to a Sub Total + Tax 1.5% = total fields

GKaiseril --- Thank you very much!

I get it now, your a Genius! You went above and beyond to help.

Your code worked beautifully! I couldn't be happier, my client is happy as well.

Sincerely,

Thanks!

Coyotefankw

1 person found this helpful