Skip to content

Commit 0b4d9ac

Browse files
AustinMRookephillipuniverse
authored andcommitted
BroadleafCommerce#1113 Expanded upon the method notes of fixItemTotalRoundingIssues
(cherry picked from commit 9c91d64)
1 parent 562723c commit 0b4d9ac

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

core/broadleaf-framework/src/main/java/org/broadleafcommerce/core/pricing/service/workflow/FulfillmentItemPricingActivity.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,11 @@ protected void populateItemTotalAmount(Order order, Map<OrderItem, List<Fulfillm
127127
* Because an item may have multiple price details that don't round cleanly, we may have pennies
128128
* left over that need to be distributed.
129129
*
130+
* This method may not be needed because the sum of the item amounts is derived from a double price (OrderItem's total)
131+
* being multiplied and divided by whole numbers of which guarantees that each item amount is a clean multiple
132+
* of the price of a single unit of that item. This behavior being enforced in populateItemTotalAmount. So we will
133+
* never get a fraction of a cent that could cause totalItemAmount and totalFGItemAmount to be different values.
134+
*
130135
* @param order
131136
* @param partialOrderItemMap
132137
*/

0 commit comments

Comments
 (0)