svn commit: r812159 - /ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderLookupServices.java

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r812159 - /ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderLookupServices.java

jleroux@apache.org
Author: jleroux
Date: Mon Sep  7 14:42:42 2009
New Revision: 812159

URL: http://svn.apache.org/viewvc?rev=812159&view=rev
Log:
A patch from Akash Jain "Find Order functionality thrown error when find orders for billingAccountId" (https://issues.apache.org/jira/browse/OFBIZ-2843) - OFBIZ-2843

Modified:
    ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderLookupServices.java

Modified: ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderLookupServices.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderLookupServices.java?rev=812159&r1=812158&r2=812159&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderLookupServices.java (original)
+++ ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderLookupServices.java Mon Sep  7 14:42:42 2009
@@ -417,9 +417,8 @@
         String cardNumber = (String) context.get("cardNumber");
         String accountNumber = (String) context.get("accountNumber");
 
-        if (billingAccountId != null || finAccountId != null || cardNumber != null || accountNumber != null) {
+        if (finAccountId != null || cardNumber != null || accountNumber != null) {
             dve.addMemberEntity("OP", "OrderPaymentPreference");
-            dve.addAlias("OP", "billingAccountId");
             dve.addAlias("OP", "finAccountId");
             dve.addAlias("OP", "paymentMethodId");
             dve.addViewLink("OH", "OP", Boolean.FALSE, UtilMisc.toList(new ModelKeyMap("orderId", "orderId")));
@@ -427,6 +426,9 @@
 
         // search by billing account ID
         if (UtilValidate.isNotEmpty(billingAccountId)) {
+            dve.addMemberEntity("BL", "BillingAccount");
+            dve.addAlias("BL", "billingAccountId");
+            dve.addViewLink("OH", "BL", Boolean.FALSE, UtilMisc.toList(new ModelKeyMap("billingAccountId", "billingAccountId")));
             paramList.add("billingAccountId=" + billingAccountId);
             conditions.add(makeExpr("billingAccountId", billingAccountId));
         }