[OFBiz] SVN: r6946 - in trunk/applications/order/webapp/ordermgr: WEB-INF/actions/order entry/order

jaz@svn.ofbiz.org jaz at svn.ofbiz.org
Wed Mar 8 10:58:15 CST 2006


Author: jaz
Date: 2006-03-08 10:58:11 -0600 (Wed, 08 Mar 2006)
New Revision: 6946

Modified:
   trunk/applications/order/webapp/ordermgr/WEB-INF/actions/order/findOrders.bsh
   trunk/applications/order/webapp/ordermgr/entry/order/orderheader.ftl
Log:
applied patch which corrected the bug which always displayed -1 orders on the order display.


Modified: trunk/applications/order/webapp/ordermgr/WEB-INF/actions/order/findOrders.bsh
===================================================================
--- trunk/applications/order/webapp/ordermgr/WEB-INF/actions/order/findOrders.bsh	2006-03-08 08:51:13 UTC (rev 6945)
+++ trunk/applications/order/webapp/ordermgr/WEB-INF/actions/order/findOrders.bsh	2006-03-08 16:58:11 UTC (rev 6946)
@@ -31,6 +31,7 @@
 import org.ofbiz.entity.condition.*;
 import org.ofbiz.entity.transaction.*;
 import org.ofbiz.base.util.*;
+import org.ofbiz.product.product.*;
 
 module = "findOrders.bsh";
 
@@ -99,7 +100,7 @@
 currentSalesChannelId = request.getParameter("salesChannelEnumId");
 if (currentSalesChannelId != null && currentSalesChannelId.length() > 0) {
     currentSalesChannel = delegator.findByPrimaryKey("Enumeration", UtilMisc.toMap("enumId", currentSalesChannelId));
-    context.put("currenSalesChannel", currentSalesChannel);
+    context.put("currentSalesChannel", currentSalesChannel);
 }
 
 // create the fromDate for calendar
@@ -203,7 +204,7 @@
     if (productId != null && productId.length() > 0) {
         paramList = paramList + "&productId=" + productId;
         entityName = "OrderHeaderItemAndRoles";
-        andExprs.add(new EntityExpr("productId", EntityOperator.EQUALS, productId));
+        andExprs.add(new EntityExpr("productId", EntityOperator.EQUALS, ProductWorker.findProductId(delegator, productId)));
     }
 
     hasBackOrders = request.getParameter("hasBackOrders");
@@ -297,6 +298,8 @@
 
         if (andExprs.size() > 0 || showAll.equalsIgnoreCase("Y")) mainCond = new EntityConditionList(andExprs, EntityOperator.AND);
 
+    } else {
+        Debug.log("Error messages: " + lookupErrorMessage, module);
     }
 
     // do the lookup
@@ -338,9 +341,13 @@
             }
 
             // get the partial list for this page
-            ohli.first();
-            if (orderHeaderListSize > 0) {
+            ohli.beforeFirst();
+            if (orderHeaderListSize > viewSize) {
                 orderHeaderList = ohli.getPartialList(lowIndex, viewSize);
+                //Debug.log("Got partial list [" + lowIndex + " / " + viewSize + "] : " + orderHeaderList);
+            } else if (orderHeaderListSize > 0) {
+                orderHeaderList = ohli.getCompleteList();
+                //Debug.log("Got full list [" + orderHeaderList.size() + "] : " + orderHeaderList);
             } else {
                 orderHeaderList = new ArrayList();
             }

Modified: trunk/applications/order/webapp/ordermgr/entry/order/orderheader.ftl
===================================================================
--- trunk/applications/order/webapp/ordermgr/entry/order/orderheader.ftl	2006-03-08 08:51:13 UTC (rev 6945)
+++ trunk/applications/order/webapp/ordermgr/entry/order/orderheader.ftl	2006-03-08 16:58:11 UTC (rev 6946)
@@ -68,7 +68,7 @@
                     ${shippingAddress.address1}<br/>
                     <#if shippingAddress.address2?has_content>${shippingAddress.address2}<br/></#if>                            
                     ${shippingAddress.city}<#if shippingAddress.stateProvinceGeoId?has_content>, ${shippingAddress.stateProvinceGeoId} </#if>
-                    ${shippingAddress.postalCode}<br/>
+                    ${shippingAddress.postalCode?if_exists}<br/>
                     ${shippingAddress.countryGeoId?if_exists}
                   </div>
                 </td>



More information about the Svn mailing list