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

Sales tax automatically calculated from the Subtotal that is manually entered in fillable field

Community Beginner ,
Jul 01, 2021 Jul 01, 2021

Copy link to clipboard

Copied

Having trouble figuring out how to get the "Tax Total" to calculate from the "Subtotal" and "Tax" fields when a number is entered into the "Tax" field.

 

Using Adobe Acrobat Pro DC

 

Jaydon5CFA_0-1625184948192.png

 

TOPICS
How to

Views

1.2K

Translate

Translate

Report

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

correct answers 1 Correct answer

Community Beginner , Jul 12, 2021 Jul 12, 2021

Thank you so much for the input! After some research in past posts and messing around, this is what I did in the "simplified field notation" and it seems to work.  SUBTOTAL*(TAX/100)

Now I need to figure out how to do another calculation. Will create a new post for that.

Thank you!

Beemonkie_0-1626137446043.png

 

Votes

Translate

Translate
Adobe Employee ,
Jul 01, 2021 Jul 01, 2021

Copy link to clipboard

Copied

Hi there

 

Hope you are doing well and sorry for the trouble. As described you want to automatically calculate the sales tax from the subtotal entered manually in the other fields

 

The workflow you are trying to achieve is possible using the JavaScript. For more information please check the help page https://acrobatusers.com/tutorials/javascript_console/

 

Hope it will help

 

Regards

Amal

 

 

Votes

Translate

Translate

Report

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
Enthusiast ,
Jul 01, 2021 Jul 01, 2021

Copy link to clipboard

Copied

That link is how to setup and use javascript console, I don't think it will help OP much in this case.

Votes

Translate

Translate

Report

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 ,
Jul 01, 2021 Jul 01, 2021

Copy link to clipboard

Copied

++Adding to the discussion,

 

You can use a custom calculated script like shown below or better:

 

var subtotal = this.getField("SUBTOTAL").value;
var tax = this.getField("TAX").value / 100;

event.value = (subtotal * tax) + subtotal;

 

I placed this calculating event in the "Tax Total" field and additionally formatted all fields as Number using the built-in "Format" feature.

 

I also noticed that your form offers bulk discounts based on the purchased amount.

 

In addition to calculating the proper formula that adds the true state sales tax of California to the sum of all item costs in the "SUBTOTAL" field,  if you were also asking to see if bulk discounts  can be done automatically in the "Total Tax" field with a script, then use something like this (or better):

 

var subtotal = this.getField("SUBTOTAL").value;
var tax = this.getField("TAX").value / 100;

if (subtotal <= 4999) {

event.value = (subtotal * tax) + (subtotal - (subtotal * .05));

} else {

if (subtotal >= 5000) {

event.value = (subtotal * tax) + (subtotal - (subtotal * .10));

 }
}

 

Votes

Translate

Translate

Report

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
Enthusiast ,
Jul 01, 2021 Jul 01, 2021

Copy link to clipboard

Copied

1. Op said: when a number is entered into the "Tax" field so I belive he only wants result to show if there is number in TAX field.

2. In his photo you can see it said BULK discount is only applied to 1 item.

Votes

Translate

Translate

Report

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 ,
Jul 01, 2021 Jul 01, 2021

Copy link to clipboard

Copied

Thank you as usual Asim.

Votes

Translate

Translate

Report

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 Beginner ,
Jul 12, 2021 Jul 12, 2021

Copy link to clipboard

Copied

LATEST

Thank you so much for the input! After some research in past posts and messing around, this is what I did in the "simplified field notation" and it seems to work.  SUBTOTAL*(TAX/100)

Now I need to figure out how to do another calculation. Will create a new post for that.

Thank you!

Beemonkie_0-1626137446043.png

 

Votes

Translate

Translate

Report

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