Author: lektran
Date: Thu Dec  6 23:37:10 2007
New Revision: 602011

URL: http://svn.apache.org/viewvc?rev=602011&view=rev
Log:
Round the total rather than the subtotals to avoid prematurely rounding tax 
adjustments, reported by Rashko Rejmer

Modified:
    
ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderReadHelper.java

Modified: 
ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderReadHelper.java
URL: 
http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderReadHelper.java?rev=602011&r1=602010&r2=602011&view=diff
==============================================================================
--- 
ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderReadHelper.java 
(original)
+++ 
ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderReadHelper.java 
Thu Dec  6 23:37:10 2007
@@ -2513,9 +2513,9 @@
         Iterator itemIter = UtilMisc.toIterator(orderItems);
 
         while (itemIter != null && itemIter.hasNext()) {
-            result = result.add(getOrderItemAdjustmentsTotal((GenericValue) 
itemIter.next(), adjustments, includeOther, includeTax, 
includeShipping)).setScale(scale, rounding);
+            result = result.add(getOrderItemAdjustmentsTotal((GenericValue) 
itemIter.next(), adjustments, includeOther, includeTax, includeShipping));
         }
-        return result;
+        return result.setScale(scale, rounding);
     }
 
     /** The passed adjustments can be all adjustments for the order, ie for 
all line items */


Reply via email to