Author: sichen
Date: Wed Feb 14 16:43:26 2007
New Revision: 507758

URL: http://svn.apache.org/viewvc?view=rev&rev=507758
Log:
Fixed bug introduced by new picklist reports.  The picklist will now work on 
items which do not have explicitly defined locations in the warehouse.  
OFBIZ-723

Modified:
    ofbiz/trunk/applications/product/webapp/facility/facility/Picklist.fo.ftl

Modified: 
ofbiz/trunk/applications/product/webapp/facility/facility/Picklist.fo.ftl
URL: 
http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/webapp/facility/facility/Picklist.fo.ftl?view=diff&rev=507758&r1=507757&r2=507758
==============================================================================
--- ofbiz/trunk/applications/product/webapp/facility/facility/Picklist.fo.ftl 
(original)
+++ ofbiz/trunk/applications/product/webapp/facility/facility/Picklist.fo.ftl 
Wed Feb 14 16:43:26 2007
@@ -21,10 +21,12 @@
 <#escape x as x?xml>
 <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format";>
 
-<#macro pickInfoDetail pickQuantity picklistBinInfoList product 
facilityLocation facilityLocationInfo>
+<#-- It is important to set defaults for facilityLocation and 
facilityLocationInfo in case the picklisted item has no location defined in 
facility.
+  Because these defaults are scalars, we must then use the ?is_hash check 
directive as well before trying to access them --> 
+<#macro pickInfoDetail pickQuantity picklistBinInfoList product 
facilityLocation="" facilityLocationInfo="">
     <fo:table-row>
         <fo:table-cell padding="2pt" background-color="${rowColor}">
-            <#if facilityLocation?has_content>
+            <#if (facilityLocation?has_content) && (facilityLocation?is_hash)>
                 
<fo:block>${facilityLocation.areaId?if_exists}-${facilityLocation.aisleId?if_exists}-${facilityLocation.sectionId?if_exists}-${facilityLocation.levelId?if_exists}-${facilityLocation.positionId?if_exists}</fo:block>
             <#else>
                 <fo:block>[${uiLabelMap.ProductNoLocation}]</fo:block>
@@ -36,7 +38,7 @@
             <#else>
                 <fo:block> </fo:block>
             </#if>
-            <#if (facilityLocationInfo.message)?has_content>
+            <#if (facilityLocationInfo?has_content) && 
(facilityLocationInfo?is_hash) && (facilityLocationInfo.message)?has_content>
                 <fo:block>${facilityLocationInfo.message?if_exists}</fo:block>
             </#if>
         </fo:table-cell>


Reply via email to