Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

I need a Javascript that will allow me to calculate different tax percentages on a form. an example would be $132.00 total sales with 7.25% tax.

New Here ,
Mar 28, 2018 Mar 28, 2018

I have an adobe variable data .pdf I want to be able to calculate the tax rate or tax percentage. How can I write a Javascript for this?

TOPICS
Acrobat SDK and JavaScript , Windows
498
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 28, 2018 Mar 28, 2018

Is the rate fixed? If not, where is it coming from? What are the names of the fields involved?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Mar 28, 2018 Mar 28, 2018

The tax rate will be different from county to county.  I have it called tax rate and and total with tax.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 28, 2018 Mar 28, 2018

So do you have like a drop-down field with the county names?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 28, 2018 Mar 28, 2018

Or do you want the users to enter it themselves?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Mar 28, 2018 Mar 28, 2018

I enter all the information on this form.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 28, 2018 Mar 28, 2018

Then you don't need a script, simply multiply the total by the tax rate to get the total tax amount. You can add that value to the total to get the total (incl. tax).

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Mar 28, 2018 Mar 28, 2018

that is what I did originally it did not calculate right. the dollar amount for 132.00 x 7.25% should be tax of 9.57=$141.57 but on form it calculate to $139.25. I tried it several different way and cant get it to calculate right.clancy invoice 3-8-2018 NEWEST a - Copytry this.jpg      

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 28, 2018 Mar 28, 2018
LATEST

The value of a percentage field needs to be between 0 and 1 to work correctly. If you're using a value between 0 and 100 you need to divide it by 100 first.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Mar 28, 2018 Mar 28, 2018

I manually enter the tax rate.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines