svn commit: r792578 - in /ofbiz/trunk/applications/product: config/ script/org/ofbiz/shipment/picklist/ servicedef/ webapp/facility/facility/ widget/facility/

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r792578 - in /ofbiz/trunk/applications/product: config/ script/org/ofbiz/shipment/picklist/ servicedef/ webapp/facility/facility/ widget/facility/

mor-2
Author: mor
Date: Thu Jul  9 15:19:47 2009
New Revision: 792578

URL: http://svn.apache.org/viewvc?rev=792578&view=rev
Log:
On picking screen, added a new option called No Grouping. This option cannot be used with any other grouping methods (Shipping Method, Warehouse Area and
Number of Order Items) on this screen.

Modified:
    ofbiz/trunk/applications/product/config/ProductUiLabels.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
    ofbiz/trunk/applications/product/widget/facility/FacilityScreens.xml

Modified: ofbiz/trunk/applications/product/config/ProductUiLabels.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/config/ProductUiLabels.xml?rev=792578&r1=792577&r2=792578&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/config/ProductUiLabels.xml (original)
+++ ofbiz/trunk/applications/product/config/ProductUiLabels.xml Thu Jul  9 15:19:47 2009
@@ -108,6 +108,9 @@
         <value xml:lang="zh">没有场所</value>
         <value xml:lang="zh_CN">仓储设施</value>
     </property>
+    <property key="FacilityNoGrouping">
+        <value xml:lang="en">No Grouping</value>
+    </property>
     <property key="FacilityNoOtherShippingMethods">
         <value xml:lang="de">Benutze Voreinstellung: Keine anderen Liefermethoden verfügbar</value>
         <value xml:lang="en">Use Default: No other shipping methods available.</value>

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=792578&r1=792577&r2=792578&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 Thu Jul  9 15:19:47 2009
@@ -67,6 +67,7 @@
         <set field="groupByShippingMethod" from-field="parameters.groupByShippingMethod"/>
         <set field="groupByNoOfOrderItems" from-field="parameters.groupByNoOfOrderItems"/>
         <set field="groupByWarehouseArea" from-field="parameters.groupByWarehouseArea"/>
+        <set field="groupByZero" from-field="parameters.groupByZero"/>
         <now-timestamp field="nowTimestamp"/>
         <if-not-empty field="parameters.orderId">
             <entity-one entity-name="OrderHeader" value-field="orderHeader"/>
@@ -112,9 +113,17 @@
                 <select-field field-name="areaId"/>
             </entity-condition>
             <set field="groupName"/>
-            <set field="groupName1"/>
-            <set field="groupName2"/>
-            <set field="groupName3"/>            
+            <set field="groupName1"/> <!-- Group by Shipping Method -->
+            <set field="groupName2"/> <!-- Group by Warehouse Area -->
+            <set field="groupName3"/> <!-- Group by Number of Order Items -->
+            <set field="groupName4"/> <!-- No Grouping -->
+
+            <!-- If user selects group by zero method, then there is no need to do the grouping -->
+            <if-compare field="groupByZero" operator="equals" value="Y">
+                <set field="groupName4" from-field="orderHeader.orderId"/>
+                <set field="groupName" from-field="orderHeader.orderId"/>
+            <else>
+            
             <iterate list="OrderHeaderAndItemFacilityLocationList" entry="orderHeaderAndItemFacilityLocation">
                 <!-- set groupName for order according to the options selected by the user -->
                 <if>
@@ -125,6 +134,7 @@
                                 <if-empty field="groupByShippingMethod"/>
                                 <if-empty field="groupByWarehouseArea"/>
                                 <if-empty field="groupByNoOfOrderItems"/>
+                                <if-empty field="groupByZero"/>
                             </and>
                         </or>
                     </condition>
@@ -162,6 +172,7 @@
                     </then>
                 </else-if>                      
                 </if>
+
                 <set field="groupName" value="${groupName1}${groupName2}${groupName3}"/>
 
                 <if>
@@ -191,6 +202,9 @@
             </if-compare>
             <clear-field field="locations"/>
             <clear-field field="locationCount"/>
+            </else>
+            </if-compare>
+            <!-- End ZERO Grouping -->
 
             <iterate entry="orderItemShipGroup" list="orderItemShipGroupList">
                 <!-- get the order items and the order item inventory res entries -->
@@ -372,6 +386,7 @@
                                 <set field="pickMoveInfoMap[groupName].groupName1" from-field="groupName1"/>
                                 <set field="pickMoveInfoMap[groupName].groupName2" from-field="groupName2"/>
                                 <set field="pickMoveInfoMap[groupName].groupName3" from-field="noOfOrderItems"/>
+                                <set field="pickMoveInfoMap[groupName].groupName4" from-field="groupName4"/>
                             </then>
                             <else>
                                 <log level="info" message="Order #${orderHeader.orderId} was not added to pick list [${numberSoFar} of ${parameters.maxNumberOfOrders}] - ${pickThisOrder} / ${allPickStarted}"/>

Modified: ofbiz/trunk/applications/product/servicedef/services_picklist.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/servicedef/services_picklist.xml?rev=792578&r1=792577&r2=792578&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/servicedef/services_picklist.xml (original)
+++ ofbiz/trunk/applications/product/servicedef/services_picklist.xml Thu Jul  9 15:19:47 2009
@@ -45,6 +45,7 @@
         <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"/>
+        <attribute name="groupByZero" type="String" mode="IN" optional="true"/>
         <attribute name="orderId" type="String" mode="IN" optional="true"/>
     </service>
 
@@ -71,6 +72,7 @@
         <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"/>
+        <attribute name="groupByZero" type="String" mode="IN" optional="true"/>
         <attribute name="pickMoveInfoList" type="List" mode="OUT" optional="true"/>
         <attribute name="orderId" type="String" mode="IN" optional="true"/>
     </service>

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=792578&r1=792577&r2=792578&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/webapp/facility/facility/PicklistOptions.ftl (original)
+++ ofbiz/trunk/applications/product/webapp/facility/facility/PicklistOptions.ftl Thu Jul  9 15:19:47 2009
@@ -16,6 +16,7 @@
 specific language governing permissions and limitations
 under the License.
 -->
+
 <div class="screenlet">
     <div class="screenlet-title-bar">
         <ul>
@@ -28,13 +29,16 @@
         <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><input type="checkbox" name="groupByShippingMethod" id="groupByShippingMethod" value="Y" <#if "${requestParameters.groupByWarehouseArea?if_exists}" != "Y" && "${requestParameters.groupByNoOfOrderItems?if_exists}" != "Y" && "${requestParameters.groupByZero?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><input type="checkbox" name="groupByWarehouseArea" id="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>
+                <td><input type="checkbox" name="groupByNoOfOrderItems" id="groupByNoOfOrderItems" value="Y" <#if "${requestParameters.groupByNoOfOrderItems?if_exists}" == "Y">checked</#if>/></td>
+
+                <td class='label'>${uiLabelMap.FacilityNoGrouping}</td>
+                <td><input type="checkbox" name="groupByZero" id="groupByZero" value="Y" <#if "${requestParameters.groupByZero?if_exists}" == "Y">checked</#if>/></td>
             </tr>
             <tr>&nbsp;</tr>
         </table>
@@ -54,9 +58,13 @@
         </div>
         <table cellspacing="0" class="basic-table">
             <tr class="header-row">
+                <#if requestParameters.groupByZero?exists && requestParameters.groupByZero == "Y">
+                <td>${uiLabelMap.OrderOrder} #</td>
+                <#else>
                 <td>${uiLabelMap.ProductShipmentMethod}</td>
                 <td>${uiLabelMap.ProductWarehouseArea}</td>
                 <td>${uiLabelMap.ProductNumberOfOrderItems}</td>
+                </#if>
                 <td>${uiLabelMap.ProductReadyToPick}</td>
                 <td>${uiLabelMap.ProductNeedStockMove}</td>
                 <td>&nbsp;</td>
@@ -95,6 +103,7 @@
                     <#assign groupName1 = pickMoveInfo.groupName1?if_exists>
                     <#assign groupName2 = pickMoveInfo.groupName2?if_exists>
                     <#assign groupName3 = pickMoveInfo.groupName3?if_exists>
+                    <#assign groupName4 = pickMoveInfo.groupName4?if_exists>
                     <#assign orderReadyToPickInfoList = pickMoveInfo.orderReadyToPickInfoList?if_exists>
                     <#assign orderNeedsStockMoveInfoList = pickMoveInfo.orderNeedsStockMoveInfoList?if_exists>
                     <#assign orderReadyToPickInfoListSize = (orderReadyToPickInfoList.size())?default(0)>
@@ -107,7 +116,9 @@
                             <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="groupByZero" value="${requestParameters.groupByZero?if_exists}"/>
                             <input type="hidden" name="facilityId" value="${facilityId?if_exists}"/>
+                            <#if !groupName4?has_content>
                             <td>
                                 <#if groupName1?has_content>
                                     <a href="javascript:document.viewGroupDetail_${pickMoveInfo_index}.submit()" class="buttontext">${groupName1}</a>
@@ -123,9 +134,26 @@
                                     <a href="javascript:document.viewGroupDetail_${pickMoveInfo_index}.submit()" class="buttontext">${groupName3}</a></td>
                                 </#if>
                             </td>
+                            <#else>
+                            <td>
+                              <a href="javascript:document.viewGroupDetail_${pickMoveInfo_index}.submit()" class="buttontext">${groupName4}</a>
+                            </td>
+                            </#if>
                         </form>
-                        <td>${orderReadyToPickInfoListSize}</td>
-                        <td>${orderNeedsStockMoveInfoListSize}</td>
+                        <td>
+                          <#if groupName4?has_content>
+                            <#if orderReadyToPickInfoListSize == 0 >${uiLabelMap.CommonN}<#else>${uiLabelMap.CommonY}</#if>
+                          <#else>
+                            ${orderReadyToPickInfoListSize}
+                          </#if>
+                        </td>
+                        <td>
+                          <#if groupName4?has_content>
+                            <#if orderNeedsStockMoveInfoListSize == 0>${uiLabelMap.CommonN}<#else>${uiLabelMap.CommonY}</#if>
+                          <#else>
+                              ${orderNeedsStockMoveInfoListSize}
+                          </#if>
+                        </td>
                         <td>
                             <#if orderReadyToPickInfoList?has_content>
                                 <form method="post" action="<@ofbizUrl>createPicklistFromOrders</@ofbizUrl>">
@@ -133,13 +161,16 @@
                                     <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="groupByZero" value="${requestParameters.groupByZero?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>
+                                    <#if !groupName4?has_content>
                                     <span class="label">${uiLabelMap.ProductPickFirst}</span>
                                     <input type="text" size="4" name="maxNumberOfOrders" value="20"/>
+                                    </#if>
                                     <input type="submit" value="${uiLabelMap.ProductCreatePicklist}"/>
                                 </form>
                             <#else>
@@ -154,8 +185,14 @@
                                     <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="groupByZero" value="${requestParameters.groupByZero?if_exists}"/>
+                                    <#if groupName4?has_content>
+                                      <input type="hidden" name="maxNumberOfOrdersToPrint" value="1"/>
+                                      <input type="hidden" name="orderId" value="${groupName4}"/>
+                                    <#else>
                                     <span class="label">${uiLabelMap.FormFieldTitle_printPickSheetFirst}</span>
                                     <input type="text" size="4" name="maxNumberOfOrdersToPrint" value="20"/>
+                                    </#if>
                                     <input type="submit" value="${uiLabelMap.FormFieldTitle_printPickSheet}"/>
                                 </form>
                             <#else>
@@ -166,6 +203,7 @@
                     <#-- toggle the row color -->
                     <#assign alt_row = !alt_row>
                 </#list>
+                <#if !groupName4?has_content>
                 <tr<#if !alt_row> class="alternate-row"</#if>>
                     <th>${uiLabelMap.CommonAllMethods}</div></th>
                     <td>&nbsp;</td>
@@ -197,6 +235,7 @@
                       </#if>
                     </td>
                 </tr>
+                </#if>
             <#else>
                 <tr><td colspan="4"><h3>${uiLabelMap.ProductNoOrdersFoundReadyToPickOrNeedStockMoves}.</h3></td></tr>
             </#if>

Modified: ofbiz/trunk/applications/product/widget/facility/FacilityScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/widget/facility/FacilityScreens.xml?rev=792578&r1=792577&r2=792578&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/widget/facility/FacilityScreens.xml (original)
+++ ofbiz/trunk/applications/product/widget/facility/FacilityScreens.xml Thu Jul  9 15:19:47 2009
@@ -1179,8 +1179,16 @@
                 <set field="tabButtonItem" value="PicklistOptions"/>
 
                 <set field="facilityId" from-field="parameters.facilityId"/>
+                <set field="groupByShippingMethod" from-field="parameters.groupByShippingMethod"/>
+                <set field="groupByWarehouseArea" from-field="parameters.groupByWarehouseArea"/>
+                <set field="groupByNoOfOrderItems" from-field="parameters.groupByNoOfOrderItems"/>
+                <set field="groupByZero" from-field="parameters.groupByZero"/>
                 <service service-name="findOrdersToPickMove">
                     <field-map field-name="facilityId"/>
+                    <field-map field-name="groupByShippingMethod"/>
+                    <field-map field-name="groupByWarehouseArea"/>
+                    <field-map field-name="groupByNoOfOrderItems"/>
+                    <field-map field-name="groupByZero"/>
                 </service>
 
                 <entity-condition entity-name="Picklist" list="picklistActiveList">