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

GST calculation in Acrobat DC not working

New Here ,
Feb 27, 2018 Feb 27, 2018

I have a form with GST calculation.

The problem is that the GST doesn't calculate for the first instance when you input a sum field – it ignores it, but works for subsequent entries.

The calculation is done in Javascript here:

var f = this.getField("Sum exl GST");

event.value = Math.round(f.value * 10) /100;

The form looks like this

Screen Shot 2018-02-28 at 10.04.55 am.png

Here is an example of the form not working. You can see that the Total fields are adding correctly, but the GST field is only counting subsequent GST calculations, and skipping the first instance.

Screen Shot 2018-02-28 at 10.07.43 am.png

I'm on a Mac by the way. Hoping someone can help – my client urgently needs this, so getting stressed!

TOPICS
PDF forms
4.6K
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
1 ACCEPTED SOLUTION
LEGEND ,
Feb 27, 2018 Feb 27, 2018

After you click on "Tools > Prepare Form" (or you can select the Open option) you will be in form editing mode. In the right-hand panel, you should see a "More" dropdown the includes a hammer and wrench icon. Click "More" and select "Set Field Calculation Order" from the list of options.

View solution in original post

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 ,
Feb 27, 2018 Feb 27, 2018

Check the fields calculation order.

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 ,
Feb 27, 2018 Feb 27, 2018

Hi try67

I played around with it and changed the tab order, read only etc. Not sure which one worked, but now the GST calculation is working - but the field under it – TOTAL including GST is now not working properly, aggh!

Any thoughts?

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
LEGEND ,
Feb 27, 2018 Feb 27, 2018

The field calculation order is not related to the tab order. To set it in Acrobat DC, select:

Tools > Prepare Form

and then:

More > Set Field Calculation Order

and arrange the fields in the list according to what makes sense for the 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
New Here ,
Feb 27, 2018 Feb 27, 2018

I don’t have that option – all that comes up in Prepare form is: open, remove shortcut and learn more

warm regards,

Vanessa

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 ,
Feb 27, 2018 Feb 27, 2018

Sorry – can you be more specific? (I'm new to using the Calculate function)

And thanks for answering!

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
LEGEND ,
Feb 27, 2018 Feb 27, 2018

After you click on "Tools > Prepare Form" (or you can select the Open option) you will be in form editing mode. In the right-hand panel, you should see a "More" dropdown the includes a hammer and wrench icon. Click "More" and select "Set Field Calculation Order" from the list of options.

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 ,
Feb 27, 2018 Feb 27, 2018

IT’S WORKING!!!!

Thank you so much – never even noticed that More menu was there!

Really appreciate your help.

warm regards,

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 ,
Oct 30, 2019 Oct 30, 2019

Thank you, thank you, thank you! I found this thread because I was having the same problem. Once I put the fields in the right order everything worked!! 

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 19, 2020 Mar 19, 2020

Hi,

Can some one please help me.

I need GST added as only 10%

 

So I have these fields - 

Sales Amount:

Freight:

GST:

Total:

 

I need the GST field to show only the 10% of the total of "Sales Amount + Freight"

Can someone tell me the java script for this please? I have tried several ways but cant get it

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 ,
Apr 29, 2021 Apr 29, 2021

I'm kinda new to this and I HOPE you have this solved by now but if anyone else sees this thread try:

event.value = this.getField("Subtotal").value * 0.10

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 ,
Apr 17, 2023 Apr 17, 2023
LATEST

Executive U.S.A military  

Screenshot_20230406_233142_com.adobe.spark.post.jpg

quote

I have a form with GST calculation.

The problem is that the GST doesn't calculate for the first instance when you input a sum field – it ignores it, but works for subsequent entries.

 

The calculation is done in Javascript here:

var f = this.getField("Sum exl GST");

event.value = Math.round(f.value * 10) /100;

 

The form looks like this

Screen Shot 2018-02-28 at 10.04.55 am.png

 

Here is an example of the form not working. You can see that the Total fields are adding correctly, but the GST field is only counting subsequent GST calculations, and skipping the first instance.

Screen Shot 2018-02-28 at 10.07.43 am.png

 

I'm on a Mac by the way. Hoping someone can help – my client urgently needs this, so getting stressed!


By @vanessaross3

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