You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by bi...@apache.org on 2007/12/26 15:09:29 UTC

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

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) {