[OFBiz] SVN: r6660 - trunk/applications/order/src/org/ofbiz/order/shoppingcart
jaz@svn.ofbiz.org
jaz at svn.ofbiz.org
Thu Feb 2 01:53:42 CST 2006
Author: jaz
Date: 2006-02-02 01:53:40 -0600 (Thu, 02 Feb 2006)
New Revision: 6660
Modified:
trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCart.java
Log:
refactored the get ref num method to return the proper number
Modified: trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCart.java
===================================================================
--- trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCart.java 2006-02-02 07:43:51 UTC (rev 6659)
+++ trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCart.java 2006-02-02 07:53:40 UTC (rev 6660)
@@ -1548,7 +1548,14 @@
}
public String getPaymentRef(String id) {
- return this.getPaymentInfo(id).refNum[0];
+ Iterator i = paymentInfo.iterator();
+ while (i.hasNext()) {
+ CartPaymentInfo inf = (CartPaymentInfo) i.next();
+ if (inf.paymentMethodId.equals(id) || inf.paymentMethodTypeId.equals(id)) {
+ return inf.refNum[0];
+ }
+ }
+ return null;
}
/** returns the total payment amounts */
More information about the Svn
mailing list