This is an automated email from the ASF dual-hosted git repository.

jleroux pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/ofbiz-plugins.git


The following commit(s) were added to refs/heads/trunk by this push:
     new fdeff9bb1 Improved: Replace deprecated BigDecimal.ROUND_HALF by  
RoundingMode.HALF (OFBIZ-13103)
fdeff9bb1 is described below

commit fdeff9bb17c37065b295998700bbc7282e13ed1c
Author: Jacques Le Roux <jacques.le.r...@les7arts.com>
AuthorDate: Fri May 24 16:50:58 2024 +0200

    Improved: Replace deprecated BigDecimal.ROUND_HALF by  RoundingMode.HALF 
(OFBIZ-13103)
    
    Fixes a typo, it's RoundingMode.HALF_UP and not RoundingMode.ROUND_HALF_UP 
as
    with BigDecimal
---
 birt/webapp/ordermgr/reports/CouponSalesReport.rptdesign | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/birt/webapp/ordermgr/reports/CouponSalesReport.rptdesign 
b/birt/webapp/ordermgr/reports/CouponSalesReport.rptdesign
index b44f4f0af..c031c57ac 100644
--- a/birt/webapp/ordermgr/reports/CouponSalesReport.rptdesign
+++ b/birt/webapp/ordermgr/reports/CouponSalesReport.rptdesign
@@ -188,14 +188,14 @@ if(productPromoCodes.size()>0){
             shippingCharge = 0;
             shippingCharge = orderAdjustments.get(j).get("amount");
             if(shippingCharge){
-                shippingCharge = shippingCharge.setScale(2, 
RoundingMode.ROUND_HALF_UP).doubleValue();
+                shippingCharge = shippingCharge.setScale(2, 
RoundingMode.HALF_UP).doubleValue();
             }
             totalShippingCharge = totalShippingCharge + shippingCharge;
         }
         shippingAmount = dispatcher.runSync("getOrderShippingAmount", input);
         amount = shippingAmount.get("shippingAmount");
         if(amount){
-            amount = amount.setScale(2, 
RoundingMode.ROUND_HALF_UP).doubleValue();
+            amount = amount.setScale(2, RoundingMode.HALF_UP).doubleValue();
         }
         totalShippingAmount = totalShippingAmount + amount;
     }

Reply via email to