Smart Quote: Price Rounding
Overview
Smart Quote rules can round the total price of the configuration at the point where the rule runs. The operation includes the tasks, BOM items, and SKU items that have been priced so far. Components added or priced by later rules are not included in that rounding operation.
The rounding adjustment is applied to the final available priced component so the total reaches the requested increment without changing the other component prices.
Syntax
config.Price.Total.Rounding.Up.ToIncrement(10m);
config.Price.Total.Rounding.Down.ToIncrement(100m);
config.Price.Total.Rounding.Nearest.ToIncrement(1000m);
The increment must be greater than zero and should be supplied as a decimal value using the m suffix.
Rounding modes
Up
Rounds upward to the next increment. An exact multiple remains unchanged.
config.Price.Total.Rounding.Up.ToIncrement(100m);
Examples: 234 becomes 300; 300 remains 300.
Down
Rounds downward to the previous increment. An exact multiple remains unchanged.
config.Price.Total.Rounding.Down.ToIncrement(100m);
Examples: 234 becomes 200; 300 remains 300.
Nearest
Rounds to the nearest increment. Midpoint values are rounded away from zero.
config.Price.Total.Rounding.Nearest.ToIncrement(100m);
Examples: 234 becomes 200; 250 becomes 300.
Rule timing
Rounding is applied immediately when the rule executes. Place the rounding rule after the rules that create and price the components that should be included in the total.
For component-level price changes, see Price Modification.