You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by le...@apache.org on 2007/11/25 10:23:23 UTC

svn commit: r597967 - /ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCart.java

Author: lektran
Date: Sun Nov 25 01:23:22 2007
New Revision: 597967

URL: http://svn.apache.org/viewvc?rev=597967&view=rev
Log:
When adding a payment method/type an existing CartPaymentInfo should only be updated when the replace parameter has been set to true, related to OFBIZ-1426

Modified:
    ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCart.java

Modified: ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCart.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCart.java?rev=597967&r1=597966&r2=597967&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCart.java (original)
+++ ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCart.java Sun Nov 25 01:23:22 2007
@@ -1461,7 +1461,7 @@
 
     /** adds a payment method/payment method type */
     public CartPaymentInfo addPaymentAmount(String id, Double amount, String refNum, String authCode, boolean isSingleUse, boolean isPresent, boolean replace) {
-        CartPaymentInfo inf = this.getPaymentInfo(id, refNum, authCode, amount, true);
+        CartPaymentInfo inf = this.getPaymentInfo(id, refNum, authCode, amount, replace);
         if (isSalesOrder()) {
             GenericValue billingAddress = inf.getBillingAddress(this.getDelegator());
             if (billingAddress != null) {