Skip to main content
Participant
February 24, 2017
Question

Simple tax equation

  • February 24, 2017
  • 5 replies
  • 558 views

Hello there,

I am trying to do a simple equation that I can not seem to figure out. I have a subtotal amount and discount that is being given. For the total amount I would like it to give me the price amount with the tax being included for a new total. I would think this formula would be work. I could be wrong.

Total = subtotal1-(Subtotal1*discount)

or

subtotal1-(Subtotal1*discount)

when i did the an easy equation it does not change the numbers as well. I also fixed the calculation order. 

This topic has been closed for replies.

5 replies

Inspiring
February 24, 2017

All calculations are case sensitive.

Did you get any error pop-ups when you entered your code?

Did you check the Acrobat JavaScript console for any execution errors?

When I use your code and then open the Acrobat JavaScript console, I get the following error:

TypeError: getField(...) is null

2:Field:Calculate

Simplified Field notation is just a simple front end to a JavaScript function that performs the same code that a custom calculation script could use.

JavaScript is very case sensitive and you must have the same capitalization used for the field's name. Spaces in field names and object names require special handling.

try67
Community Expert
Community Expert
February 24, 2017

Upper/lower-case is critical. You must enter the fields names EXACTLY (well, except for spaces that need to be escaped) as they actually are.

try67
Community Expert
Community Expert
February 24, 2017

[Question moved to the JavaScript forum]

Legend
February 24, 2017

God question. Please copy abd paste or screenshot the current calculation. I took the screenshot as being from the actual file before, mistake and all.

Legend
February 24, 2017

I'm pretty sure that case is significant. What that means is that subtotal (lower case s) and Subtotal (upper case S) are different things. So take care to match the formula and the design together.

Andres139Author
Participant
February 24, 2017

I had all the caps the same. I did a quick outline of the issue. Unfortunately that was not the issue.

Bernd Alheit
Community Expert
Community Expert
February 24, 2017

What calculation do you use now?