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

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@597967 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Scott Gray
2007-11-25 09:23:22 +00:00
parent 254b5b54e2
commit bca8668989
@@ -1461,7 +1461,7 @@ public class ShoppingCart implements Serializable {
/** 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) {