Which Method Should We Override To Alter Rounding Strategy In Group Discount Calculator? (PricingTools.java) (Doc ID 2199362.1)

Last updated on NOVEMBER 14, 2016

Applies to:

Oracle Commerce Platform - Version 11.2 and later
Information in this document applies to any platform.

Goal

On : 11.2 version, Application Framework (Repositories, APIs, Core Services)

 

Question:

Which method should we override to alter rounding strategy in Group Discount Calculator?

 

Customer Scenario:

I have a scenario with my customer where they have a promotion of buy 3 items get 2% discount (Get group Discount promo). We are finding though that unfortunately the rounding mode in the calculator associated to the promotion is no accurate enough for our customers needs.

To give an example:
- Item regular cost. $9.90
- Add 3 to cart. Total cost = $29.70
Promotion engine tells us that the discount to apply is 59c which equivalates to a discount of 1.98% and not 2%.
The reason for this is that the exact amount to be discounted is 0.594 cents but the rounding in the calculator is rounding this down to 59 cents. Our customer wants to alter the rounding mode to CEIL or Half Up in order to ensure that at least 2% discount is given to the customer.

Solution

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms