Question
Calculating the sum of the fields with values and adding a discount.
I greet you cordially.
I'll say right away that I'm just getting started with javascripts.
I have to add the values from Price1,2,3 fields to the SUM field.
Even if it is 0.
I used the Properities / Calculate / Value is the / sum + of the following fields
option to calculate the sum. But now I want to write it down to use "Custom Calculation Script".
I have tried many things and nothing is working properly for me. I was creating hidden fields,
but I'd rather not want to make a workaround. Summing up, I don't know how to get
the values into the SUM fields from the Price1, 2, 3. I don't know how to write
a script that will calculate the discount in the SUM field. Before, I did it differently
but was not allowed to do so. It looked like this:
this.getField ("Discount"). value = 0;
if (this.getField ("BoxDiscount"). value! = "Off") this.getField ("PriceDiscount").
value = this.getField ("SUM"). value -this.getField ("Percent"). value * this.getField ("SUM"). value / 100;
And it works, but the need is different.

