You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by mo...@apache.org on 2009/08/14 16:54:52 UTC

svn commit: r804245 - /ofbiz/trunk/applications/order/webapp/ordermgr/order/ordershippinginfo.ftl

Author: mor
Date: Fri Aug 14 14:54:52 2009
New Revision: 804245

URL: http://svn.apache.org/viewvc?rev=804245&view=rev
Log:
Fixed the broken screelet on order detail page, bug introduced by me.

Modified:
    ofbiz/trunk/applications/order/webapp/ordermgr/order/ordershippinginfo.ftl

Modified: ofbiz/trunk/applications/order/webapp/ordermgr/order/ordershippinginfo.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/webapp/ordermgr/order/ordershippinginfo.ftl?rev=804245&r1=804244&r2=804245&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/webapp/ordermgr/order/ordershippinginfo.ftl (original)
+++ ofbiz/trunk/applications/order/webapp/ordermgr/order/ordershippinginfo.ftl Fri Aug 14 14:54:52 2009
@@ -554,9 +554,11 @@
                     <div>
                       ${uiLabelMap.CommonNbr}<a href="/facility/control/ViewShipment?shipmentId=${shipment.shipmentId}&amp;externalLoginKey=${externalLoginKey}" class="buttontext">${shipment.shipmentId}</a>&nbsp;&nbsp;
                       <a href="/facility/control/PackingSlip.pdf?shipmentId=${shipment.shipmentId}&amp;externalLoginKey=${externalLoginKey}" class="buttontext">${uiLabelMap.ProductPackingSlip}</a>
-                      <#if "SALES_ORDER" == orderHeader.orderTypeId>
-                        <#assign shipmentRouteSegment = Static["org.ofbiz.entity.util.EntityUtil"].getFirst(delegator.findByAnd("ShipmentRouteSegment", {"shipmentId":shipment.shipmentId}))>
-                        <#if "UPS" == (shipmentRouteSegment.carrierPartyId)?if_exists && "ORDER_COMPLETED" == orderHeader.statusId>
+                      <#if "SALES_ORDER" == orderHeader.orderTypeId && "ORDER_COMPLETED" == orderHeader.statusId>
+                        <#assign shipmentRouteSegments = delegator.findByAnd("ShipmentRouteSegment", {"shipmentId" : shipment.shipmentId})>
+                        <#if shipmentRouteSegments?has_content>
+                        <#assign shipmentRouteSegment = Static["org.ofbiz.entity.util.EntityUtil"].getFirst(shipmentRouteSegments)>
+                        <#if "UPS" == (shipmentRouteSegment.carrierPartyId)?if_exists>
                           <a href="javascript:document.upsEmailReturnLabel${shipment_index}.submit();" class="buttontext">${uiLabelMap.ProductEmailReturnShippingLabelUPS}</a>
                         </#if>
                         <form name="upsEmailReturnLabel${shipment_index}" method="post" action="<@o...@ofbizUrl>">
@@ -564,6 +566,7 @@
                           <input type="hidden" name="shipmentId" value="${shipment.shipmentId}"/>
                           <input type="hidden" name="shipmentRouteSegmentId" value=${shipmentRouteSegment.shipmentRouteSegmentId}>
                         </form>
+                        </#if>
                       </#if>
                     </div>
                 </#list>