svn commit: r606901 - /ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/order/orderview.bsh

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

svn commit: r606901 - /ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/order/orderview.bsh

bibryam
Author: bibryam
Date: Wed Dec 26 06:09:29 2007
New Revision: 606901

URL: http://svn.apache.org/viewvc?rev=606901&view=rev
Log:
Fix a bug introduced by me in r606797.

Modified:
    ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/order/orderview.bsh

Modified: ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/order/orderview.bsh
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/order/orderview.bsh?rev=606901&r1=606900&r2=606901&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/order/orderview.bsh (original)
+++ ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/order/orderview.bsh Wed Dec 26 06:09:29 2007
@@ -381,18 +381,20 @@
     context.put("returnableItems", returnableItems);
     
     // get the catalogIds for appending items
-    if ("SALES_ORDER".equals(orderType)) {
-        catalogCol = CatalogWorker.getCatalogIdsAvailable(delegator, productStoreId, partyId);
-    } else {
-        catalogCol = CatalogWorker.getAllCatalogIds(request);
+    if ((request != null) && (request != void)) {
+        if ("SALES_ORDER".equals(orderType)) {
+            catalogCol = CatalogWorker.getCatalogIdsAvailable(delegator, productStoreId, partyId);
+        } else {
+            catalogCol = CatalogWorker.getAllCatalogIds(request);
+        }
+        if (catalogCol != null && catalogCol.size() > 0) {
+            currentCatalogId = (String) catalogCol.get(0);
+            currentCatalogName = CatalogWorker.getCatalogName(request, currentCatalogId);
+            context.put("catalogCol", catalogCol);
+            context.put("currentCatalogId", currentCatalogId);
+            context.put("currentCatalogName", currentCatalogName);
+        }
     }
-    if (catalogCol != null && catalogCol.size() > 0) {
-        currentCatalogId = (String) catalogCol.get(0);
-        currentCatalogName = CatalogWorker.getCatalogName(request, currentCatalogId);
-        context.put("catalogCol", catalogCol);
-        context.put("currentCatalogId", currentCatalogId);
-        context.put("currentCatalogName", currentCatalogName);
-    }    
 }
 
 if (orderHeader != null) {