Author: mor
Date: Mon Apr 6 15:49:17 2009 New Revision: 762399 URL: http://svn.apache.org/viewvc?rev=762399&view=rev Log: For creating picklist, grouping can be done with two new methods Warehouse Area and Number of order items in addition to the default option i.e. Shipping Method. Patch from Arun Patidar, reviewed by Pranay Pandey and applied from OFBIZ-2223 (https://issues.apache.org/jira/browse/OFBIZ-2223) Modified: ofbiz/trunk/applications/product/config/ProductUiLabels.xml ofbiz/trunk/applications/product/entitydef/entitymodel.xml ofbiz/trunk/applications/product/script/org/ofbiz/shipment/picklist/PicklistServices.xml ofbiz/trunk/applications/product/servicedef/services_picklist.xml ofbiz/trunk/applications/product/webapp/facility/facility/PicklistOptions.ftl Modified: ofbiz/trunk/applications/product/config/ProductUiLabels.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/config/ProductUiLabels.xml?rev=762399&r1=762398&r2=762399&view=diff ============================================================================== --- ofbiz/trunk/applications/product/config/ProductUiLabels.xml (original) +++ ofbiz/trunk/applications/product/config/ProductUiLabels.xml Mon Apr 6 15:49:17 2009 @@ -61,6 +61,18 @@ <value xml:lang="zh">åºæ</value> <value xml:lang="zh_CN">ä»å¨è®¾æ½</value> </property> + <property key="FacilityGroupByShippingMethod"> + <value xml:lang="en">Group by shipping method</value> + </property> + <property key="FacilityGroupByWarehouseArea"> + <value xml:lang="en">Group by warehouse area</value> + </property> + <property key="FacilityGroupByNoOfOrderItems"> + <value xml:lang="en">Group by number of order items</value> + </property> + <property key="FacilityGroupName"> + <value xml:lang="en">Group Name</value> + </property> <property key="FacilityInventory"> <value xml:lang="de">Inventar</value> <value xml:lang="en">Inventory</value> @@ -100,11 +112,23 @@ <value xml:lang="zh">使ç¨ç¼ºçå¼ï¼æ²¡æå ¶å®å¯ç¨çéè´§æ¹å¼ã</value> <value xml:lang="zh_CN">使ç¨é»è®¤: 没æå ¶ä»éè´§æ¹å¼</value> </property> + <property key="FacilityNumberOfItemsLessThanThree"> + <value xml:lang="en">Items less than 3</value> + </property> + <property key="FacilityNumberOfItemsThreeOrMore"> + <value xml:lang="en">Items 3 or more</value> + </property> + <property key="FacilityMultipleLocations"> + <value xml:lang="en">Multiple Locations</value> + </property> <property key="FacilitySelection"> <value xml:lang="en">Facility Selection</value> <value xml:lang="fr">Choix du lieu de stockage</value> <value xml:lang="it">Seleziona stabilimento</value> </property> + <property key="FacilitySelectOptionsToGroupBy"> + <value xml:lang="en">Select Options To Group</value> + </property> <property key="FacilityShipAvailable"> <value xml:lang="de">Bitte liefern Sie meine bestellten Artikel sobald sie verfügbar sind (Sie dürfen zusätzliche Lieferungskosten erheben).</value> <value xml:lang="en">Please ship items I ordered as they become available (you may incur additional shipping charges).</value> Modified: ofbiz/trunk/applications/product/entitydef/entitymodel.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/entitydef/entitymodel.xml?rev=762399&r1=762398&r2=762399&view=diff ============================================================================== --- ofbiz/trunk/applications/product/entitydef/entitymodel.xml (original) +++ ofbiz/trunk/applications/product/entitydef/entitymodel.xml Mon Apr 6 15:49:17 2009 @@ -4609,4 +4609,39 @@ <key-map field-name="productId"/> </view-link> </view-entity> + + <view-entity entity-name="OrderItemAndFacilityLocationView" package-name="org.ofbiz.product.facility" title="Order Item And Facility Location View Entity"> + <member-entity entity-alias="SMT" entity-name="ShipmentMethodType"/> + <member-entity entity-alias="OISG" entity-name="OrderItemShipGroup"/> + <member-entity entity-alias="OI" entity-name="OrderItem"/> + <member-entity entity-alias="PFL" entity-name="ProductFacilityLocation"/> + <member-entity entity-alias="FL" entity-name="FacilityLocation"/> + <alias entity-alias="OISG" name="orderId"/> + <alias entity-alias="OISG" name="shipGroupSeqId"/> + <alias entity-alias="OISG" name="shipmentMethodTypeId"/> + <alias entity-alias="OISG" name="carrierPartyId"/> + <alias entity-alias="OI" name="productId"/> + <alias entity-alias="OI" name="orderItemSeqId"/> + <alias entity-alias="PFL" name="locationSeqId"/> + <alias entity-alias="PFL" name="facilityId"/> + <alias entity-alias="FL" name="locationTypeEnumId"/> + <alias entity-alias="FL" name="areaId"/> + <view-link entity-alias="OI" rel-entity-alias="OISG"> + <key-map field-name="orderId"/> + </view-link> + <view-link entity-alias="OISG" rel-entity-alias="SMT"> + <key-map field-name="shipmentMethodTypeId"/> + </view-link> + <view-link entity-alias="OI" rel-entity-alias="PFL"> + <key-map field-name="productId"/> + </view-link> + <view-link entity-alias="PFL" rel-entity-alias="FL"> + <key-map field-name="facilityId"/> + <key-map field-name="locationSeqId"/> + </view-link> + <relation type="one-nofk" rel-entity-name="ShipmentMethodType"> + <key-map field-name="shipmentMethodTypeId"/> + </relation> + </view-entity> + </entitymodel> Modified: ofbiz/trunk/applications/product/script/org/ofbiz/shipment/picklist/PicklistServices.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/script/org/ofbiz/shipment/picklist/PicklistServices.xml?rev=762399&r1=762398&r2=762399&view=diff ============================================================================== --- ofbiz/trunk/applications/product/script/org/ofbiz/shipment/picklist/PicklistServices.xml (original) +++ ofbiz/trunk/applications/product/script/org/ofbiz/shipment/picklist/PicklistServices.xml Mon Apr 6 15:49:17 2009 @@ -27,7 +27,6 @@ + OrderHeader.isRushOrder = if Y then add to rush list, still leave in other lists + OrderItem.statusId = ITEM_APPROVED + total number of orders to pick: limit to X - + OrderItemShipGroup.shipmentMethodTypeId = group by + ShipmentMethodType.sequenceNum = order display of methods by x OrderItemShipGroup.carrierPartyId = group by along with ship method? + OrderItemShipGroup.shipAfterDate is null or <= now @@ -38,11 +37,14 @@ + InventoryItem.facilityId = passed facilityId + FacilityLocation.locationTypeEnumId = FLT_PICKLOC, can be picked now + FacilityLocation.locationTypeEnumId = FLT_BULK, stock move needed, remove whole order from list to be picked, add to list needing stock move - --> - <!-- data to create - in Map in List pickMoveByShipmentMethodInfoList + + User have options to select factors to group + + group by : Shipping method, Warehouse area, Number of order items (one to two, three or more) + --> + <!-- data to create - in Map in List pickMoveInfoList + shipmentMethodType + orderReadyToPickInfoList + orderNeedsStockMoveInfoList + + groupName, which is based on user selected options to group With each list containing a Map with: + orderHeader + orderItemShipGroup @@ -62,7 +64,9 @@ <fail-message message="Security Error: to run getPicklistData you must have the FACILITY_VIEW or FACILITY_ADMIN permission"/> </check-permission> <check-errors/> - + <set field="groupByShippingMethod" from-field="parameters.groupByShippingMethod"/> + <set field="groupByNoOfOrderItems" from-field="parameters.groupByNoOfOrderItems"/> + <set field="groupByWarehouseArea" from-field="parameters.groupByWarehouseArea"/> <now-timestamp field="nowTimestamp"/> <if-empty field="parameters.orderHeaderList"> @@ -91,25 +95,114 @@ <field-map field-name="orderId" from-field="orderHeader.orderId"/> <order-by field-name="shipGroupSeqId"/> </entity-and> + <!-- get no. of order items for each order --> + <entity-count entity-name="OrderItem" count-field="orderItemCount"> + <condition-expr field-name="orderId" from-field="orderHeader.orderId"/> + </entity-count> + <!-- get list of order items for each order --> + <entity-and entity-name="OrderItem" list="orderItems"> + <field-map field-name="orderId" from-field="orderHeader.orderId"/> + </entity-and> + + <iterate list="orderItems" entry="orderItem"> + <!-- get information about location for each order item --> + <entity-and entity-name="OrderItemAndFacilityLocationView" list="OrderItemAndFacilityLocationList"> + <field-map field-name="orderId" from-field="orderHeader.orderId"/> + <field-map field-name="locationTypeEnumId" value="FLT_PICKLOC"/> + <field-map field-name="orderItemSeqId" from-field="orderItem.orderItemSeqId"/> + <order-by field-name="orderItemSeqId"/> + </entity-and> + + <iterate entry="OrderItemAndFacilityLocation" list="OrderItemAndFacilityLocationList"> + <!-- set groupName for order according to user selected options and available informations --> + <set field="groupName1" value=""/> + <set field="groupName2" value=""/> + <set field="groupName3" value=""/> + <if> + <condition> + <or> + <if-compare field="groupByShippingMethod" operator="equals" value="Y"/> + <and> + <if-empty field="groupByShippingMethod"/> + <if-empty field="groupByWarehouseArea"/> + <if-empty field="groupByNoOfOrderItems"/> + </and> + </or> + </condition> + <then> + <set field="groupName1" from-field="OrderItemAndFacilityLocation.shipmentMethodTypeId"/> + </then> + </if> + + <if-compare field="groupByWarehouseArea" operator="equals" value="Y"> + <set field="groupName2" from-field="OrderItemAndFacilityLocation.areaId"/> + <set field="locationGroupName" from-field="OrderItemAndFacilityLocation.areaId"/> + </if-compare> + + <if> + <condition> + <and> + <if-compare field="groupByNoOfOrderItems" operator="equals" value="Y"/> + <if-compare field="orderItemCount" operator="less" value="3" type="BigDecimal"/> + </and> + </condition> + <then> + <property-to-field property="FacilityNumberOfItemsLessThanThree" field="noOfOrderItems" resource="ProductUiLabels"/> + <set field="groupName3" value="Items_Less_Than_3"/> + </then> + </if> + + <if> + <condition> + <and> + <if-compare field="groupByNoOfOrderItems" operator="equals" value="Y"/> + <if-compare field="orderItemCount" operator="greater-equals" value="3" type="BigDecimal"/> + </and> + </condition> + <then> + <property-to-field property="FacilityNumberOfItemsThreeOrMore" field="noOfOrderItems" resource="ProductUiLabels"/> + <set field="groupName3" value="Items_Three_Or_More"/> + </then> + </if> + <set field="groupName" value="${groupName1}${groupName2}${groupName3}"/> + + <!-- adds location of item in location list uniquely --> + <if> + <condition> + <and> + <if-compare field="groupByWarehouseArea" operator="equals" value="Y"/> + <not><if-compare-field field="locations" operator="contains" to-field="locationGroupName"/></not> + </and> + </condition> + <then> + <field-to-list field="locationGroupName" list="locations"/> + </then> + </if> + </iterate> + </iterate> + <!-- count no. of locations in location list --> + <set field="locationCount" value="0"/> + <if-not-empty field="locations"> + <set field="locationCount" value="${util:size(locations)}" type="Long"/> + </if-not-empty> + + <!-- set groupName when order items are from different locations --> + <if-compare field="locationCount" operator="greater" value="1" type="Long"> + <set field="groupName" value="MULTI_LOCATIONS"/> + <property-to-field property="FacilityMultipleLocations" field="groupName2" resource="ProductUiLabels"/> + </if-compare> + <clear-field field="locations"/> + <clear-field field="locationCount"/> <iterate entry="orderItemShipGroup" list="orderItemShipGroupList"> <!-- get the order items and the order item inventory res entries --> - - <!-- if a shipmentMethodTypeId was not passed or is the same as the current, then process this order --> <if> <condition> - <and> - <!-- only pick if it is the right shipmentMethodTypeId, if one was passed in --> - <or> - <if-empty field="parameters.shipmentMethodTypeId"/> - <if-compare-field field="parameters.shipmentMethodTypeId" to-field="orderItemShipGroup.shipmentMethodTypeId" operator="equals"/> - </or> + <or> <!-- only pick if now is after the shipAfterDate or the shipAfterDate is empty --> - <or> - <if-empty field="orderItemShipGroup.shipAfterDate"/> - <if-compare-field field="nowTimestamp" to-field="orderItemShipGroup.shipAfterDate" operator="greater-equals"/> - </or> - </and> + <if-empty field="orderItemShipGroup.shipAfterDate"/> + <if-compare-field field="nowTimestamp" to-field="orderItemShipGroup.shipAfterDate" operator="greater-equals"/> + </or> </condition> <then> <!-- get only for current OrderItemShipGroup --> @@ -255,18 +348,17 @@ <set from-field="orderItemShipGrpInvResInfoList" field="orderHeaderInfo.orderItemShipGrpInvResInfoList"/> <!-- pick now, or needs stock move first? --> - <!-- put in pick or move lists for the given shipmentMethodTypeId --> - <set from-field="orderItemShipGroup.shipmentMethodTypeId" field="shipmentMethodTypeId"/> - <if-empty field="pickMoveByShipmentMethodInfoMap.${shipmentMethodTypeId}"> - <get-related-one value-field="orderItemShipGroup" relation-name="ShipmentMethodType" to-value-field="pickMoveByShipmentMethodInfoMap.${shipmentMethodTypeId}.shipmentMethodType"/> + <!-- put in pick or move lists for the groupName prepared according to selected options by user --> + <if-empty field="pickMoveInfoMap.${groupName}.${groupName}"> + <get-related-one value-field="orderItemShipGroup" relation-name="ShipmentMethodType" to-value-field="pickMoveInfoMap.${groupName}.${groupName}.shipmentMethodType"/> </if-empty> <if-compare field="needsStockMove" operator="equals" value="Y"> - <field-to-list field="orderHeaderInfo" list="pickMoveByShipmentMethodInfoMap.${shipmentMethodTypeId}.orderNeedsStockMoveInfoList"/> + <field-to-list field="orderHeaderInfo" list="pickMoveInfoMap.${groupName}.orderNeedsStockMoveInfoList"/> <if-compare field="orderHeader.isRushOrder" operator="equals" value="Y"> <field-to-list field="orderHeaderInfo" list="rushOrderInfo.orderNeedsStockMoveInfoList"/> </if-compare> <else> - <field-to-list field="orderHeaderInfo" list="pickMoveByShipmentMethodInfoMap.${shipmentMethodTypeId}.orderReadyToPickInfoList"/> + <field-to-list field="orderHeaderInfo" list="pickMoveInfoMap.${groupName}.orderReadyToPickInfoList"/> <if-compare field="orderHeader.isRushOrder" operator="equals" value="Y"> <field-to-list field="orderHeaderInfo" list="rushOrderInfo.orderReadyToPickInfoList"/> </if-compare> @@ -278,6 +370,10 @@ <calcop field="numberSoFar" operator="add"><number value="1"/></calcop> </calculate> <log level="info" message="Added order #${orderHeader.orderId} to pick list [${numberSoFar} of ${parameters.maxNumberOfOrders}] - ${pickThisOrder} / ${allPickStarted}"/> + <set field="pickMoveInfoMap.${groupName}.groupName" from-field="groupName"/> + <set field="pickMoveInfoMap.${groupName}.groupName1" from-field="groupName1"/> + <set field="pickMoveInfoMap.${groupName}.groupName2" from-field="groupName2"/> + <set field="pickMoveInfoMap.${groupName}.groupName3" from-field="noOfOrderItems"/> </then> <else> <log level="info" message="Order #${orderHeader.orderId} was not added to pick list [${numberSoFar} of ${parameters.maxNumberOfOrders}] - ${pickThisOrder} / ${allPickStarted}"/> @@ -293,33 +389,41 @@ </if> </iterate> + <!-- prepare a list of group names --> + <if> + <condition> + <not><if-compare-field field="groupNames" operator="contains" to-field="groupName"/></not> + </condition> + <then> + <field-to-list field="groupName" list="groupNames"/> + </then> + </if> + <clear-field field="orderHeaderInfo"/> <clear-field field="orderItemShipGroupList"/> + <clear-field field="orderItemShipGrpInvResList"/> </iterate> - <!-- find all ShipmentMethodType in order by sequenceNum, for each one get the value from the pickMoveByShipmentMethodInfoMap and add it to the pickMoveByShipmentMethodInfoList --> - <entity-condition entity-name="ShipmentMethodType" list="shipmentMethodTypeList"> - <order-by field-name="+sequenceNum"/> - </entity-condition> - - <iterate entry="shipmentMethodType" list="shipmentMethodTypeList"> - <if-not-empty field="pickMoveByShipmentMethodInfoMap.${shipmentMethodType.shipmentMethodTypeId}"> - <field-to-list field="pickMoveByShipmentMethodInfoMap.${shipmentMethodType.shipmentMethodTypeId}" list="pickMoveByShipmentMethodInfoList"/> + <!-- find all groupName, for each one get the value from the pickMoveInfoMap and add it to the pickMoveInfoList --> + <iterate list="groupNames" entry="groupName"> + <if-not-empty field="pickMoveInfoMap.${groupName}"> + <field-to-list field="pickMoveInfoMap.${groupName}" list="pickMoveInfoList"/> </if-not-empty> </iterate> - - <field-to-result field="pickMoveByShipmentMethodInfoList"/> + <clear-field field="groupNames"/> + <field-to-result field="pickMoveInfoList"/> <field-to-result field="rushOrderInfo"/> + </simple-method> <simple-method method-name="assembleOrderHeaderInfoInline" short-description="assembleOrderHeaderInfoInline"> - <!-- This uses pickMoveByShipmentMethodInfoList from the findOrdersToPickMove --> + <!-- This uses pickMoveInfoList from the findOrdersToPickMove --> <!-- This creates orderHeaderInfoList, wrongQuantityReservedList, insufficientQohList and inventoryItems, inventoryItemOrderItems, inventoryItemQuantities --> <!-- if maxNumberOfOrders is passed, get at most that many orders and go over them --> <!-- moved above in findOrdersToPickMove <calculate field="numberSoFar" type="Long"><number value="0"/></calculate> - <iterate entry="pickMoveByShipmentMethodInfo" list="pickMoveByShipmentMethodInfoList"> + <iterate entry="pickMoveInfo" list="pickMoveInfoList"> <if> <condition> <or> @@ -328,7 +432,7 @@ </or> </condition> <then> - <field-to-list field="pickMoveByShipmentMethodInfo" list="limitedPickMoveByShipmentMethodInfoList"/> + <field-to-list field="pickMoveInfo" list="limitedPickMoveInfoList"/> </then> </if> @@ -338,8 +442,8 @@ </iterate> --> - <iterate entry="pickMoveByShipmentMethodInfo" list="pickMoveByShipmentMethodInfoList"> - <iterate entry="orderReadyToPickInfo" list="pickMoveByShipmentMethodInfo.orderReadyToPickInfoList"> + <iterate entry="pickMoveInfo" list="pickMoveInfoList"> + <iterate entry="orderReadyToPickInfo" list="pickMoveInfo.orderReadyToPickInfoList"> <iterate entry="orderItemAndShipGroupAssoc" list="orderReadyToPickInfo.orderItemAndShipGroupAssocList"> <if-compare value="ITEM_APPROVED" operator="equals" field="orderItemAndShipGroupAssoc.statusId"> <calculate field="reservedQuantity"><number value="0"/></calculate> @@ -475,9 +579,9 @@ <set-service-fields map="parameters" service-name="findOrdersToPickMove" to-map="findOrdersToPickMoveMap"/> <call-service service-name="findOrdersToPickMove" in-map-name="findOrdersToPickMoveMap"> - <result-to-field result-name="pickMoveByShipmentMethodInfoList"/> + <result-to-field result-name="pickMoveInfoList"/> </call-service> - <!-- <log level="info" message="pickMoveByShipmentMethodInfoList=${pickMoveByShipmentMethodInfoList}"/> --> + <!-- <log level="info" message="pickMoveInfoList=${pickMoveInfoList}"/> --> <!-- This creates orderHeaderInfoList, wrongQuantityReservedList, insufficientQohList and inventoryItems, inventoryItemOrderItems, inventoryItemQuantities --> <call-simple-method method-name="assembleOrderHeaderInfoInline"/> @@ -1113,7 +1217,7 @@ <set-service-fields map="parameters" service-name="findOrdersToPickMove" to-map="findOrdersToPickMoveMap"/> <call-service service-name="findOrdersToPickMove" in-map-name="findOrdersToPickMoveMap"> - <result-to-field result-name="pickMoveByShipmentMethodInfoList"/> + <result-to-field result-name="pickMoveInfoList"/> </call-service> <!-- This creates orderHeaderInfoList, wrongQuantityReservedList, insufficientQohList and inventoryItems, inventoryItemOrderItems, inventoryItemQuantities --> Modified: ofbiz/trunk/applications/product/servicedef/services_picklist.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/servicedef/services_picklist.xml?rev=762399&r1=762398&r2=762399&view=diff ============================================================================== --- ofbiz/trunk/applications/product/servicedef/services_picklist.xml (original) +++ ofbiz/trunk/applications/product/servicedef/services_picklist.xml Mon Apr 6 15:49:17 2009 @@ -40,8 +40,11 @@ <attribute name="isRushOrder" type="String" mode="IN" optional="true"/> <attribute name="maxNumberOfOrders" type="Long" mode="IN" optional="true"/> <attribute name="orderHeaderList" type="List" mode="IN" optional="true"/> - <attribute name="pickMoveByShipmentMethodInfoList" type="List" mode="OUT" optional="true"/> + <attribute name="pickMoveInfoList" type="List" mode="OUT" optional="true"/> <attribute name="rushOrderInfo" type="Map" mode="OUT" optional="true"/> + <attribute name="groupByNoOfOrderItems" type="String" mode="IN" optional="true"/> + <attribute name="groupByWarehouseArea" type="String" mode="IN" optional="true"/> + <attribute name="groupByShippingMethod" type="String" mode="IN" optional="true"/> </service> <!-- Persisted Picklist Services --> Modified: ofbiz/trunk/applications/product/webapp/facility/facility/PicklistOptions.ftl URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/webapp/facility/facility/PicklistOptions.ftl?rev=762399&r1=762398&r2=762399&view=diff ============================================================================== --- ofbiz/trunk/applications/product/webapp/facility/facility/PicklistOptions.ftl (original) +++ ofbiz/trunk/applications/product/webapp/facility/facility/PicklistOptions.ftl Mon Apr 6 15:49:17 2009 @@ -19,6 +19,31 @@ <div class="screenlet"> <div class="screenlet-title-bar"> <ul> + <li class="h3">${uiLabelMap.FacilitySelectOptionsToGroupBy}</li> + </ul> + <br class="clear"/> + </div> + <form method="post" name="selectFactors" action="<@ofbizUrl>PicklistOptions</@ofbizUrl>"> + <input type="hidden" name="facilityId" value="${facilityId}"/> + <table class="basic-table" cellspacing='0'> + <tr> + <td class='label'>${uiLabelMap.FacilityGroupByShippingMethod}</td> + <td><input type="checkbox" name="groupByShippingMethod" value="Y" <#if "${requestParameters.groupByWarehouseArea?if_exists}" != "Y" && "${requestParameters.groupByNoOfOrderItems?if_exists}" != "Y" || "${requestParameters.groupByShippingMethod?if_exists}" == "Y">checked</#if>/></td> + + <td class='label'>${uiLabelMap.FacilityGroupByWarehouseArea}</td> + <td><input type="checkbox" name="groupByWarehouseArea" value="Y" <#if "${requestParameters.groupByWarehouseArea?if_exists}" == "Y">checked</#if>/></td> + + <td class='label'>${uiLabelMap.FacilityGroupByNoOfOrderItems}</td> + <td><input type="checkbox" name="groupByNoOfOrderItems" value="Y" <#if "${requestParameters.groupByNoOfOrderItems?if_exists}" == "Y">checked</#if>/></td> + </tr> + <tr> </tr> + </table> + <div align ='right'> + <input type="submit" value="Submit" class="buttontext" align='right'/> + </div> + </form> + <div class="screenlet-title-bar"> + <ul> <li class="h3">${uiLabelMap.ProductFindOrdersToPick}</li> </ul> <br class="clear"/> @@ -26,7 +51,7 @@ <div class="screenlet-body"> <table cellspacing="0" class="basic-table"> <tr class="header-row"> - <td>${uiLabelMap.ProductShipmentMethod}</td> + <td>${uiLabelMap.FacilityGroupName}</td> <td>${uiLabelMap.ProductReadyToPick}</td> <td>${uiLabelMap.ProductNeedStockMove}</td> <td> </td> @@ -54,35 +79,60 @@ </td> </tr> </#if> - <#if pickMoveByShipmentMethodInfoList?has_content> + <#if pickMoveInfoList?has_content> <#assign orderReadyToPickInfoListSizeTotal = 0> <#assign orderNeedsStockMoveInfoListSizeTotal = 0> <#assign alt_row = false> - <#list pickMoveByShipmentMethodInfoList as pickMoveByShipmentMethodInfo> - <#assign shipmentMethodType = pickMoveByShipmentMethodInfo.shipmentMethodType?if_exists> - <#assign orderReadyToPickInfoList = pickMoveByShipmentMethodInfo.orderReadyToPickInfoList?if_exists> - <#assign orderNeedsStockMoveInfoList = pickMoveByShipmentMethodInfo.orderNeedsStockMoveInfoList?if_exists> + <#assign seq = 0> + <#list pickMoveInfoList as pickMoveInfo> + <#assign groupName = pickMoveInfo.groupName?if_exists> + <#assign groupName1 = pickMoveInfo.groupName1?if_exists> + <#assign groupName2 = pickMoveInfo.groupName2?if_exists> + <#assign groupName3 = pickMoveInfo.groupName3?if_exists> + <#assign orderReadyToPickInfoList = pickMoveInfo.orderReadyToPickInfoList?if_exists> + <#assign orderNeedsStockMoveInfoList = pickMoveInfo.orderNeedsStockMoveInfoList?if_exists> <#assign orderReadyToPickInfoListSize = (orderReadyToPickInfoList.size())?default(0)> <#assign orderNeedsStockMoveInfoListSize = (orderNeedsStockMoveInfoList.size())?default(0)> <#assign orderReadyToPickInfoListSizeTotal = orderReadyToPickInfoListSizeTotal + orderReadyToPickInfoListSize> <#assign orderNeedsStockMoveInfoListSizeTotal = orderNeedsStockMoveInfoListSizeTotal + orderNeedsStockMoveInfoListSize> + <#assign seq = seq + 1> <tr valign="middle"<#if alt_row> class="alternate-row"</#if>> - <td><a href="<@ofbizUrl>PicklistOptions?viewDetail=${shipmentMethodType.shipmentMethodTypeId?if_exists}&facilityId=${facilityId?if_exists}</@ofbizUrl>" class="buttontext"><#if shipmentMethodType?exists && shipmentMethodType?has_content>${shipmentMethodType.description}<#else>${groupName?if_exists}</#if></a></td> + <td> + <form name= "viewGroupDetail" action ="<@ofbizUrl>PicklistOptions</@ofbizUrl>" method="post"> + <input type ="hidden" name="viewDetail" value= "${groupName?if_exists}"/> + <input type="hidden" name="groupByShippingMethod" value="${requestParameters.groupByShippingMethod?if_exists}"/> + <input type="hidden" name="groupByWarehouseArea" value="${requestParameters.groupByWarehouseArea?if_exists}"/> + <input type="hidden" name="groupByNoOfOrderItems" value="${requestParameters.groupByNoOfOrderItems?if_exists}"/> + <input type="hidden" name="facilityId" value="${facilityId?if_exists}"/> + <table> + <tr> + <#if groupName1?has_content> + <td><a id="one" href="javascript:document.viewGroupDetail.submit()" class="buttontext">${groupName1}</a></td> + </#if> + <#if groupName2?has_content> + <td><a id="two" href="javascript:document.viewGroupDetail.submit()" class="buttontext">${groupName2}</a></td> + </#if> + <#if groupName3?has_content> + <td><a id="three" href="javascript:document.viewGroupDetail.submit()" class="buttontext">${groupName3}</a></td> + </#if> + </tr> + </table> + </form> + </td> <td>${orderReadyToPickInfoListSize}</td> <td>${orderNeedsStockMoveInfoListSize}</td> <td> <#if orderReadyToPickInfoList?has_content> <form method="post" action="<@ofbizUrl>createPicklistFromOrders</@ofbizUrl>"> - <input type="hidden" name="facilityId" value="${facilityId}"/> - <#if shipmentMethodType?exists && shipmentMethodType?has_content> - <input type="hidden" name="shipmentMethodTypeId" value="${shipmentMethodType.shipmentMethodTypeId}"/> - <#else> - <input type="hidden" name="orderIdList" value=""/> - <#assign orderIdsForPickList = orderReadyToPickInfoList?if_exists> - <#list orderIdsForPickList as orderIdForPickList> - <input type="hidden" name="orderIdList" value="${orderIdForPickList.orderHeader.orderId}"/> - </#list> - </#if> + <input type="hidden" name="facilityId" value="${facilityId?if_exists}"/> + <input type="hidden" name="groupByShippingMethod" value="${requestParameters.groupByShippingMethod?if_exists}"/> + <input type="hidden" name="groupByWarehouseArea" value="${requestParameters.groupByWarehouseArea?if_exists}"/> + <input type="hidden" name="groupByNoOfOrderItems" value="${requestParameters.groupByNoOfOrderItems?if_exists}"/> + <input type="hidden" name="orderIdList" value=""/> + <#assign orderIdsForPickList = orderReadyToPickInfoList?if_exists> + <#list orderIdsForPickList as orderIdForPickList> + <input type="hidden" name="orderIdList" value="${orderIdForPickList.orderHeader.orderId}"/> + </#list> <span class="label">${uiLabelMap.ProductPickFirst}</span> <input type="text" size="4" name="maxNumberOfOrders" value="20"/> <input type="submit" value="${uiLabelMap.ProductCreatePicklist}"/> @@ -102,7 +152,7 @@ <td> <#if (orderReadyToPickInfoListSizeTotal > 0)> <form method="post" action="<@ofbizUrl>createPicklistFromOrders</@ofbizUrl>"> - <input type="hidden" name="facilityId" value="${facilityId}"/> + <input type="hidden" name="facilityId" value="${facilityId?if_exists}"/> <span class="label">${uiLabelMap.ProductPickFirst}</span> <input type="text" size="4" name="maxNumberOfOrders" value="20"/> <input type="submit" value="${uiLabelMap.ProductCreatePicklist}"/> @@ -118,15 +168,13 @@ </table> </div> </div> -<br/> - <#assign viewDetail = requestParameters.viewDetail?if_exists> <#if viewDetail?has_content> - <#list pickMoveByShipmentMethodInfoList as pickMoveByShipmentMethodInfo> - <#assign shipmentMethodType = pickMoveByShipmentMethodInfo.shipmentMethodType?if_exists> - <#if shipmentMethodType?if_exists.shipmentMethodTypeId == viewDetail> - <#assign toPickList = pickMoveByShipmentMethodInfo.orderReadyToPickInfoList?if_exists> - </#if> + <#list pickMoveInfoList as pickMoveInfo> + <#assign groupName = pickMoveInfo.groupName?if_exists> + <#if groupName?if_exists == viewDetail> + <#assign toPickList = pickMoveInfo.orderReadyToPickInfoList?if_exists> + </#if> </#list> </#if> @@ -134,7 +182,7 @@ <div class="screenlet"> <div class="screenlet-title-bar"> <ul> - <li class="h3">${shipmentMethodType.description?if_exists} ${uiLabelMap.ProductPickingDetail}</li> + <li class="h3">${uiLabelMap.ProductPickingDetail}</li> </ul> <br class="clear"/> </div> |
Free forum by Nabble | Edit this page |