Don't miss out Virtual Happy Hour this Friday (April 26).

Try our conversational search powered by Generative AI!

Improve rounding strategy in promotion engine

Fixed in

EPiServer.Commerce 12.4.0

(Or a related package)

Created

Jun 14, 2018

Updated

Dec 19, 2023

Area

Core

State

Closed, Acceptance tests pass


Description

The promotion engine's old rounding strategy is to always round to the maximum precision allowed by the current currency, adjusting for rounding issues by sprinkling money across affected line items.

This may cause "off by a cent" errors in a couple of edge-cases.

The new rounding strategy performs all promotion calculations with full precision and does rounding (and possibly sprinkles money to adjust for errors) only once, at the end of promotion calculations.