You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by jl...@apache.org on 2010/12/04 11:32:19 UTC
svn commit: r1042132 -
/ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderReturnServices.java
Author: jleroux
Date: Sat Dec 4 10:32:18 2010
New Revision: 1042132
URL: http://svn.apache.org/viewvc?rev=1042132&view=rev
Log:
The rounding is already present in the divide operation, so the additional setScale wasn't necessary. Thanks to Scott on dev ML
Modified:
ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderReturnServices.java
Modified: ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderReturnServices.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderReturnServices.java?rev=1042132&r1=1042131&r2=1042132&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderReturnServices.java (original)
+++ ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderReturnServices.java Sat Dec 4 10:32:18 2010
@@ -2648,7 +2648,7 @@ public class OrderReturnServices {
originalTotal = originalTotal.setScale(decimals, rounding);
BigDecimal newAmount = null;
if (ZERO.compareTo(originalTotal) != 0) {
- newAmount = returnTotal.multiply(amount).divide(originalTotal, decimals, rounding).setScale(decimals, rounding);
+ newAmount = returnTotal.multiply(amount).divide(originalTotal, decimals, rounding);
} else {
newAmount = ZERO;
}