Author: jleroux Date: Wed Nov 8 15:42:16 2017 New Revision: 1814591 URL: http://svn.apache.org/viewvc?rev=1814591&view=rev Log: Fixed: Inventory Report PDF lists all available statusId's irrespective of selection criteria (OFBIZ-7438)
1. Go to Facility -> Inventory 2. Select a status and perform find 3. Click on Print pdf button Expected: PDF should show selected statusId Actual: All available statusId's in the system get listed in the Pdf. Thanks: Arvind Singh Tomar Modified: ofbiz/ofbiz-framework/trunk/applications/product/groovyScripts/facility/facility/ViewFacilityInventoryByProduct.groovy Modified: ofbiz/ofbiz-framework/trunk/applications/product/groovyScripts/facility/facility/ViewFacilityInventoryByProduct.groovy URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/applications/product/groovyScripts/facility/facility/ViewFacilityInventoryByProduct.groovy?rev=1814591&r1=1814590&r2=1814591&view=diff ============================================================================== --- ofbiz/ofbiz-framework/trunk/applications/product/groovyScripts/facility/facility/ViewFacilityInventoryByProduct.groovy (original) +++ ofbiz/ofbiz-framework/trunk/applications/product/groovyScripts/facility/facility/ViewFacilityInventoryByProduct.groovy Wed Nov 8 15:42:16 2017 @@ -122,12 +122,19 @@ if (action) { whereConditionsList.add(EntityCondition.makeCondition("productId", EntityOperator.LIKE, productId + "%")) searchParameterString = searchParameterString + "&productId=" + productId } - whereCondition = EntityCondition.makeCondition(whereConditionsList, EntityOperator.AND) + // add statusId in search parametters + if (statusId) { + searchParameterString = searchParameterString + "&statusId=" + statusId; + } + + whereCondition = EntityCondition.makeCondition(whereConditionsList, EntityOperator.AND) beganTransaction = false // get the indexes for the partial list lowIndex = ((viewIndex.intValue() * viewSize.intValue()) + 1) highIndex = (viewIndex.intValue() + 1) * viewSize.intValue() + // add viewSize and viewIndex in search parameters + searchParameterString = searchParameterString + "&VIEW_SIZE=" + viewSize + "&VIEW_INDEX=" + viewIndex; List prods = null try { beganTransaction = TransactionUtil.begin()