Example: round, roundTo
Rounding is the optional parameter.
To apply rounding to percentages, use SUM as the parent operator to add the percentage discount values and apply the total discount.
-
If the child type is MULT, the discounts will be multiplied and returned for addition in SUM.
-
If MULT is used separately, the calculation formula is 1 – (1– % result_previous_step)*(1 – % discount)
Round: item
| Input Conditions | JSON | Discount Calculation Flow |
|---|---|---|
Unit of Measure = Percent Product List Price = 100$ 4 Calculation Types are created for the Pricing Procedure:
|
|
Calculating maximum discount according to the formula:
Total price for an Order Line Item = 86.70$ The rounding is presented with two decimals as by default the field format allows only two digits after the decimal point. |
Round: group
| Input Conditions | JSON | Discount Calculation Flow |
|---|---|---|
Unit of Measure = Percent Product List Price = 100$ 4 Calculation Types are created for the Pricing Procedure:
|
|
Calculating maximum discount according to the formula:
Total price for an Order Line Item = 86.70$ The rounding is presented with two decimals as by default the field format allows only two digits after the decimal point. |