Author: hansbak
Date: Thu Oct 6 06:27:04 2011 New Revision: 1179517 URL: http://svn.apache.org/viewvc?rev=1179517&view=rev Log: update on rev: 1178759 wrong status was displayed Modified: ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/shipment/FindShipment.groovy ofbiz/trunk/applications/product/webapp/facility/shipment/FindShipment.ftl Modified: ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/shipment/FindShipment.groovy URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/shipment/FindShipment.groovy?rev=1179517&r1=1179516&r2=1179517&view=diff ============================================================================== --- ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/shipment/FindShipment.groovy (original) +++ ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/shipment/FindShipment.groovy Thu Oct 6 06:27:04 2011 @@ -79,7 +79,9 @@ if (destinationFacilityId) { if (statusId) { paramListBuffer.append("&statusId="); paramListBuffer.append(statusId); - findShipmentExprs.add(EntityCondition.makeCondition("statusId", EntityOperator.EQUALS, statusId)); + if (!orderReturnValue) { + findShipmentExprs.add(EntityCondition.makeCondition("statusId", EntityOperator.EQUALS, statusId)); + } currentStatus = delegator.findOne("StatusItem", [statusId : statusId], true); context.currentStatus = currentStatus; } @@ -152,6 +154,9 @@ if ("Y".equals(lookupFlag)) { } if (orderReturnValue) { + returnCond = null; + findShipmentExprs.add(EntityCondition.makeCondition("returnStatusId", EntityOperator.EQUALS, statusId)); + returnCond = EntityCondition.makeCondition(findShipmentExprs, EntityOperator.AND); OrderReturnViewEntity = new DynamicViewEntity(); OrderReturnViewEntity.addMemberEntity("SM", "Shipment"); OrderReturnViewEntity.addMemberEntity("RH", "ReturnHeader"); @@ -162,11 +167,12 @@ if ("Y".equals(lookupFlag)) { OrderReturnViewEntity.addAlias("SM", "destinationFacilityId"); OrderReturnViewEntity.addAlias("SM", "originFacilityId"); OrderReturnViewEntity.addAlias("SM", "estimatedShipDate"); - OrderReturnViewEntity.addAlias("RH", "statusId"); + OrderReturnViewEntity.addAlias("SM", "statusId"); OrderReturnViewEntity.addAlias("RH", "returnId"); OrderReturnViewEntity.addAlias("RH", "entryDate"); + OrderReturnViewEntity.addAlias("RH", "returnStatusId", "statusId", null, null, null, null); - orderReturnIt = delegator.findListIteratorByCondition(OrderReturnViewEntity, mainCond, null, null, null, null); + orderReturnIt = delegator.findListIteratorByCondition(OrderReturnViewEntity, returnCond, null, null, null, null); shipmentListSize = orderReturnIt.getResultsSizeAfterPartialList(); if (highIndex > shipmentListSize) { Modified: ofbiz/trunk/applications/product/webapp/facility/shipment/FindShipment.ftl URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/webapp/facility/shipment/FindShipment.ftl?rev=1179517&r1=1179516&r2=1179517&view=diff ============================================================================== --- ofbiz/trunk/applications/product/webapp/facility/shipment/FindShipment.ftl (original) +++ ofbiz/trunk/applications/product/webapp/facility/shipment/FindShipment.ftl Thu Oct 6 06:27:04 2011 @@ -119,7 +119,9 @@ function lookupShipments() { <option value="">---</option> <option value="">${uiLabelMap.ProductOrderReturnStatus}</option> <#list returnStatuses as returnStatus> - <option value="${returnStatus.statusId}">${returnStatus.get("description",locale)}</option> + <#if returnStatus.statusId != "RETURN_REQUESTED"> + <option value="${returnStatus.statusId}">${returnStatus.get("description",locale)}</option> + </#if> </#list> </select> </td> |
Free forum by Nabble | Edit this page |