[OFBIZ-6347] Applied patch from task. Removed code to create duplicate OPP record. Thanks Mohammad Kathawala for the patch.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1686545 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Arun Patidar
2015-06-20 10:20:32 +00:00
parent 6865d2db88
commit 5268a0835b
@@ -3852,18 +3852,6 @@ public class ShoppingCart implements Iterable<ShoppingCartItem>, Serializable {
if (billingAccountAvailableAmount.compareTo(getBillingAccountAmount()) < 0) {
this.billingAccountAmt = billingAccountAvailableAmount;
}
BigDecimal billingAccountAmountSelected = getBillingAccountAmount();
GenericValue opp = delegator.makeValue("OrderPaymentPreference", new HashMap<String, Object>());
opp.set("paymentMethodTypeId", "EXT_BILLACT");
opp.set("presentFlag", "N");
opp.set("overflowFlag", "N");
opp.set("maxAmount", billingAccountAmountSelected);
opp.set("statusId", "PAYMENT_NOT_RECEIVED");
allOpPrefs.add(opp);
remainingAmount = remainingAmount.subtract(billingAccountAmountSelected);
if (remainingAmount.compareTo(BigDecimal.ZERO) < 0) {
remainingAmount = BigDecimal.ZERO;
}
}
for (CartPaymentInfo inf : paymentInfo) {
if (inf.amount == null) {