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

Discount percentage

New Here ,
Jan 11, 2016 Jan 11, 2016

I am new to this Java in the simplified notion and I am wanting to create a formula for a form that calculates the discount that is entered in from when the form User enters the discount in "Disc1" and the "MSRP1". I currently have it set up to give me the answer for that. Now I need it to minus that answer from the "MSRP1".

screen shot of form Form 1010.1.png

calculation script.png

TOPICS
Acrobat SDK and JavaScript , Windows
783
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 11, 2016 Jan 11, 2016

It's not clear what you're deducting there... Shouldn't just UC1 be the produce of Disc1 and MSRP1, ie the price after the discount?

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

This is the information that the form user will fill out "Form User":

Dealer Discount (Disc1)="44%"

Unit MSRP (MSRP1)="$5599.00"

Currently the form is doing: 44%*$5599=$2464

I need to know minus the $2464 from the $5599 to get the answer for UC1

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

Is the Discount field set as Percentage under Format?

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

Yes it is

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

Then you can use this as the Simple Field Notation formula:

MSRP1 * (1-Disc1)

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

So what does the (1) stand for in (1-Disc1)?

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

It doesn't stand for anything. It's just the number one... The value of a percentage field is between 0 (0%) and 1 (100%). So if you want to show the result after applying the discount then you need to multiply the amount by its complementary value, ie, 1 minus the discount value.

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 12, 2016 Jan 12, 2016
LATEST

It appears you want the expression to read:

MSSRP - (MSRP * Discount)

Which could also be written as:

(1 * MSRP) - (MSRP * Discount)

And applying the Associative Law of Multiplication becomes:

MSRP * (1 - Discount)

Compute out the discounted price both ways and the result should be the same.

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