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 2008/12/18 21:16:37 UTC

svn commit: r727807 - in /ofbiz/branches/release4.0: ./ applications/order/src/org/ofbiz/order/order/OrderReadHelper.java

Author: jleroux
Date: Thu Dec 18 12:16:37 2008
New Revision: 727807

URL: http://svn.apache.org/viewvc?rev=727807&view=rev
Log:
Applied fix from trunk for revision: 727806

Modified:
    ofbiz/branches/release4.0/   (props changed)
    ofbiz/branches/release4.0/applications/order/src/org/ofbiz/order/order/OrderReadHelper.java

Propchange: ofbiz/branches/release4.0/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Dec 18 12:16:37 2008
@@ -1 +1 @@
-/ofbiz/trunk:539836-539837,618970,627900,629279,674173,676162,676227,676246,679704,690644,705862,706035,706055,706067,706692,721839,721887
+/ofbiz/trunk:539836-539837,618970,627900,629279,674173,676162,676227,676246,679704,690644,705862,706035,706055,706067,706692,721839,721887,721904,727806

Modified: ofbiz/branches/release4.0/applications/order/src/org/ofbiz/order/order/OrderReadHelper.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/release4.0/applications/order/src/org/ofbiz/order/order/OrderReadHelper.java?rev=727807&r1=727806&r2=727807&view=diff
==============================================================================
--- ofbiz/branches/release4.0/applications/order/src/org/ofbiz/order/order/OrderReadHelper.java (original)
+++ ofbiz/branches/release4.0/applications/order/src/org/ofbiz/order/order/OrderReadHelper.java Thu Dec 18 12:16:37 2008
@@ -226,6 +226,11 @@
             if (chargedToPaymentPref.compareTo(ZERO) == 1) {
                 // key of the resulting map is paymentMethodId or paymentMethodTypeId if the paymentMethodId is not available
                 String paymentMethodKey = paymentPref.getString("paymentMethodId") != null ? paymentPref.getString("paymentMethodId") : paymentPref.getString("paymentMethodTypeId");
+                if(paymentMethodAmounts.containsKey(paymentMethodKey)){
+                    Double value = (Double)paymentMethodAmounts.get(paymentMethodKey);
+                    if(value != null)
+                        chargedToPaymentPref = chargedToPaymentPref.add(new BigDecimal(value.doubleValue()));
+                }
                 paymentMethodAmounts.put(paymentMethodKey, new Double(chargedToPaymentPref.setScale(scale, rounding).doubleValue()));
             }
         }