Author: lektran
Date: Wed Jul 4 00:58:52 2007
New Revision: 553114
URL:
http://svn.apache.org/viewvc?view=rev&rev=553114Log:
Fixed a problem during checkout where if a billing account was being used, two payment prefs were being created for the billing account
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?view=diff&rev=553114&r1=553113&r2=553114==============================================================================
--- ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCart.java (original)
+++ ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCart.java Wed Jul 4 00:58:52 2007
@@ -3399,7 +3399,7 @@
List allOpPrefs = new LinkedList();
BigDecimal remainingAmount = new BigDecimal(this.getGrandTotal() - this.getPaymentTotal());
remainingAmount = remainingAmount.setScale(2, BigDecimal.ROUND_HALF_UP);
- if (getBillingAccountId() != null) {
+ if (getBillingAccountId() != null && this.billingAccountAmt <= 0) {
double billingAccountAvailableAmount = CheckOutHelper.availableAccountBalance(getBillingAccountId(), dispatcher);
if (this.billingAccountAmt == 0.0 && billingAccountAvailableAmount > 0) {
this.billingAccountAmt = billingAccountAvailableAmount;