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

How do I add VAT amount to a fillable PDF

New Here ,
Jan 28, 2016 Jan 28, 2016

Hi, I'm new to JavaScript and now I have to write a calculation formula.

I have 4 different values to calculate together and get their VAT amount at the same time

=sum(text49, text52, text53, text54)*1.14

but this does not work.

I have tried working with the amount of columns and lines Col8 Ln10, Ln13, Ln14, Ln15

But its just not calculating my values.

Please HELP!!!!

TOPICS
Acrobat SDK and JavaScript , Windows
1.3K
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 ,
Jan 28, 2016 Jan 28, 2016

Something like this:

(text49 + text52 + text53 + text54) * 1.14

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 ,
Jan 28, 2016 Jan 28, 2016

Hi,

Thank you for the advice

I have tried this in the simplified field notations and in the custom calculations script, its still not doing the formula.

I typed it as you gave it to me, is there something else I must type in front of it to do the calculation?

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 ,
Jan 29, 2016 Jan 29, 2016

press ctrl+j and look for any error message.

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 ,
Jan 29, 2016 Jan 29, 2016

Thanks I will try that this afternoon and let you know how it went.

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 ,
Jan 30, 2016 Jan 30, 2016

Hi this is the error it gives me,

But i changed my form, I calculate all amounts to a subtotal, and from there just get the 14% VAT.

I write a script in the Simplified Field Notation:

Sub/Total*0.14

It gave me a Vat amount on the 1st try round and then with the next test it stayed null.

I checked like you told me and this is what I got:  (What does it mean, and better still what am I doing wrong)

TypeError: getField(...) is null

1:Field:Calculate

TypeError: getField(...) is null

1:Field:Calculate

TypeError: getField(...) is null

1:Field:Calculate

TypeError: getField(...) is null

1:Field:Calculate

TypeError: getField(...) is null

1:Field:Calculate

TypeError: getField(...) is null

1:Field:Calculate

TypeError: getField(...) is null

1:Field:Calculate

TypeError: getField(...) is null

1:Field:Calculate

TypeError: getField(...) is null

1:Field:Calculate

TypeError: getField(...) is null

1:Field:Calculate

TypeError: getField(...) is null

1:Field:Calculate

TypeError: getField(...) is null

1:Field:Calculate

TypeError: getField(...) is null

1:Field:Calculate

TypeError: getField(...) is null

1:Field:Calculate

TypeError: getField(...) is null

1:Field:Calculate

TypeError: getField(...) is null

1:Field:Calculate

TypeError: getField(...) is null

1:Field:Calculate

TypeError: getField(...) is null

1:Field:Calculate

TypeError: getField(...) is null

1:Field:Calculate

TypeError: getField(...) is null

1:Field:Calculate

TypeError: getField(...) is null

1:Field:Calculate

TypeError: getField(...) is null

1:Field:Calculate

TypeError: getField(...) is null

1:Field:Calculate

TypeError: getField(...) is null

1:Field:Calculate

TypeError: getField(...) is null

1:Field:Calculate

TypeError: getField(...) is null

1:Field:Calculate

TypeError: getField(...) is null

1:Field:Calculate

TypeError: getField(...) is null

1:Field:Calculate

TypeError: getField(...) is null

1:Field:Calculate

TypeError: getField(...) is null

1:Field:Calculate

TypeError: getField(...) is null

1:Field:Calculate

TypeError: getField(...) is null

1:Field:Calculate

TypeError: getField(...) is null

1:Field:Calculate

TypeError: getField(...) is null

1:Field:Calculate

TypeError: getField(...) is null

1:Field:Calculate

TypeError: getField(...) is null

1:Field:Calculate

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 ,
Jan 30, 2016 Jan 30, 2016

In the calculation you use a field name which not available in 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 ,
Jan 31, 2016 Jan 31, 2016
LATEST

Hi everyone,

Thank you very much I have come right my problem is solved. than you so much for the help.

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 ,
Jan 30, 2016 Jan 30, 2016

The Simplified field notation has a number of requirements for the field name like the name must start with an alphabetic character, the field name cannot use an arithmetic operator, like "+", "-", "*", and "/". The "/" is the division operator. The script behind the Simplified field notation parses the entry by white space, numbered values, alphabetic values, and arithmetic operators and then performs the calculation based on the parsed strings.

You should rename the field "Sub/Total" or insert the JavaScript Escape character before the "/".

Sub\/Total * 0.14

Using a Custom JavaScript calculation should also work.

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