Author: deepak
Date: Fri May 27 06:04:27 2016
New Revision: 1745713
URL:
http://svn.apache.org/viewvc?rev=1745713&view=revLog:
(OFBIZ-7134) Added existence check to fix stack trace on return links ftl.
Modified:
ofbiz/trunk/applications/order/template/return/ReturnLinks.ftl
Modified: ofbiz/trunk/applications/order/template/return/ReturnLinks.ftl
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/template/return/ReturnLinks.ftl?rev=1745713&r1=1745712&r2=1745713&view=diff==============================================================================
--- ofbiz/trunk/applications/order/template/return/ReturnLinks.ftl (original)
+++ ofbiz/trunk/applications/order/template/return/ReturnLinks.ftl Fri May 27 06:04:27 2016
@@ -51,10 +51,10 @@ under the License.
<#assign shipGroup = delegator.findOne("OrderItemShipGroup", {"orderId" : orderId, "shipGroupSeqId" : shipGroupAssoc.shipGroupSeqId}, false)>
<#if shipGroup?? && shipGroup.shipmentMethodTypeId != "NO_SHIPPING">
<#assign shipGroupShipment = Static["org.ofbiz.entity.util.EntityUtil"].getFirst(delegator.findByAnd("Shipment", {"primaryOrderId" : shipGroup.orderId, "primaryShipGroupSeqId" : shipGroup.shipGroupSeqId}, null, false))/>
- <#if shipGroupShipment??>
- <#assign shipmentRouteSegment = Static["org.ofbiz.entity.util.EntityUtil"].getFirst(delegator.findByAnd("ShipmentRouteSegment", {"shipmentId" : shipGroupShipment.shipmentId}, null, false))>
+ <#if shipGroupShipment??>
+ <#assign shipmentRouteSegment = Static["org.ofbiz.entity.util.EntityUtil"].getFirst(delegator.findByAnd("ShipmentRouteSegment", {"shipmentId" : shipGroupShipment.shipmentId}, null, false))!>
<#if shipmentRouteSegment??>
- <#if "UPS" == shipmentRouteSegment.carrierPartyId>
+ <#if "UPS" == shipmentRouteSegment.carrierPartyId!>
<li><a href="javascript:document.upsEmailReturnLabel.submit();" class="buttontext">${uiLabelMap.ProductEmailReturnShippingLabelUPS}</a></li>
<li><form name="upsEmailReturnLabel" method="post" action="<@ofbizUrl>upsEmailReturnLabelReturn</@ofbizUrl>">
<input type="hidden" name="returnId" value="${returnId}"/>