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/07/04 09:58:57 UTC
svn commit: r553114 -
/ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCart.java
Author: lektran
Date: Wed Jul 4 00:58:52 2007
New Revision: 553114
URL: http://svn.apache.org/viewvc?view=rev&rev=553114
Log:
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;