You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by ja...@apache.org on 2007/04/28 17:41:29 UTC

svn commit: r533361 - /ofbiz/trunk/applications/order/webapp/ordermgr/entry/order/orderitems.ftl

Author: jacopoc
Date: Sat Apr 28 08:41:28 2007
New Revision: 533361

URL: http://svn.apache.org/viewvc?view=rev&rev=533361
Log:
Misc fixes for npe for non product items.

Modified:
    ofbiz/trunk/applications/order/webapp/ordermgr/entry/order/orderitems.ftl

Modified: ofbiz/trunk/applications/order/webapp/ordermgr/entry/order/orderitems.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/webapp/ordermgr/entry/order/orderitems.ftl?view=diff&rev=533361&r1=533360&r2=533361
==============================================================================
--- ofbiz/trunk/applications/order/webapp/ordermgr/entry/order/orderitems.ftl (original)
+++ ofbiz/trunk/applications/order/webapp/ordermgr/entry/order/orderitems.ftl Sat Apr 28 08:41:28 2007
@@ -37,7 +37,7 @@
             <td width="10%" align="right"><span class="tableheadtext"><b>${uiLabelMap.OrderSubTotal}</b></span></td>
           </tr>
           <#list orderItems?if_exists as orderItem>
-            <#assign itemType = orderItem.getRelatedOne("OrderItemType")>
+            <#assign itemType = orderItem.getRelatedOne("OrderItemType")?if_exists>
             <tr><td colspan="6"><hr class="sepbar"/></td></tr>
             <tr>     
               <#if orderItem.productId?exists && orderItem.productId == "_?_">           
@@ -50,7 +50,7 @@
                     <#if orderItem.productId?exists>                       
                       <a href="<@o...@ofbizUrl>" class="buttontext">${orderItem.productId} - ${orderItem.itemDescription}</a>
                     <#else>                                                    
-                      <b>${itemType.description}</b> : ${orderItem.itemDescription?if_exists}
+                      <b>${itemType?if_exists.description?if_exists}</b> : ${orderItem.itemDescription?if_exists}
                     </#if>
                   </div>
                   
@@ -75,7 +75,7 @@
               </#if>
             </tr>
             <#-- show info from workeffort if it was a rental item -->
-            <#if orderItem.orderItemTypeId == "RENTAL_ORDER_ITEM">
+            <#if orderItem.orderItemTypeId?exists && orderItem.orderItemTypeId == "RENTAL_ORDER_ITEM">
                 <#assign WorkOrderItemFulfillments = orderItem.getRelated("WorkOrderItemFulfillment")?if_exists>
                 <#if WorkOrderItemFulfillments?has_content>
                     <#list WorkOrderItemFulfillments as WorkOrderItemFulfillment>