Author: mor
Date: Wed Apr 22 12:19:39 2009 New Revision: 767482 URL: http://svn.apache.org/viewvc?rev=767482&view=rev Log: User can print pick sheets for each order in a group which will show detailed information of each order like shipping method, and number of order items in each order, Product ID and supplier Product ID. Patch from Arun Patidar (reviewed and tested by Pranay Pandey), part of OFBIZ-2225 (https://issues.apache.org/jira/browse/OFBIZ-2225) Modified: ofbiz/trunk/applications/order/config/OrderUiLabels.xml ofbiz/trunk/applications/order/entitydef/entitymodel.xml 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/WEB-INF/controller.xml ofbiz/trunk/applications/product/webapp/facility/facility/PicklistOptions.ftl ofbiz/trunk/applications/product/widget/facility/FacilityScreens.xml Modified: ofbiz/trunk/applications/order/config/OrderUiLabels.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/config/OrderUiLabels.xml?rev=767482&r1=767481&r2=767482&view=diff ============================================================================== --- ofbiz/trunk/applications/order/config/OrderUiLabels.xml (original) +++ ofbiz/trunk/applications/order/config/OrderUiLabels.xml Wed Apr 22 12:19:39 2009 @@ -6173,6 +6173,9 @@ <value xml:lang="th">à¸à¸²à¸£à¸à¸±à¸à¸ªà¸£à¸£à¸£à¸²à¸¢à¸à¸²à¸£à¸ªà¸±à¸à¸à¸·à¹à¸</value> <value xml:lang="zh">åæ£è®¢å</value> </property> + <property key="OrderPickedBy"> + <value xml:lang="en">Picked By</value> + </property> <property key="OrderPieces"> <value xml:lang="cs">ks</value> <value xml:lang="de">Stücke</value> @@ -9116,6 +9119,9 @@ <value xml:lang="zh">å ¶å®è®¢åè°æ´å计</value> <value xml:lang="zh_CN">å ¶ä»è°æ´æ»è®¡</value> </property> + <property key="OrderTotalNoOfItems"> + <value xml:lang="en">Total No. Of Items</value> + </property> <property key="OrderTotalQty"> <value xml:lang="de">Total Menge</value> <value xml:lang="en">Total Qty</value> Modified: ofbiz/trunk/applications/order/entitydef/entitymodel.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/entitydef/entitymodel.xml?rev=767482&r1=767481&r2=767482&view=diff ============================================================================== --- ofbiz/trunk/applications/order/entitydef/entitymodel.xml (original) +++ ofbiz/trunk/applications/order/entitydef/entitymodel.xml Wed Apr 22 12:19:39 2009 @@ -339,6 +339,7 @@ <field name="orderDate" type="date-time"></field> <field name="priority" type="indicator"><description>Sets priority for Inventory Reservation</description></field> <field name="entryDate" type="date-time"></field> + <field name="pickSheetPrintedDate" type="date-time"><description>This will be set to a date when pick sheet of the order is printed</description></field> <field name="visitId" type="id"></field> <field name="statusId" type="id"></field> <field name="createdBy" type="id-vlong"></field> Modified: ofbiz/trunk/applications/product/config/ProductUiLabels.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/config/ProductUiLabels.xml?rev=767482&r1=767481&r2=767482&view=diff ============================================================================== --- ofbiz/trunk/applications/product/config/ProductUiLabels.xml (original) +++ ofbiz/trunk/applications/product/config/ProductUiLabels.xml Wed Apr 22 12:19:39 2009 @@ -2413,6 +2413,12 @@ <value xml:lang="th">à¸à¸£à¸°à¹à¸ à¸à¸£à¸²à¸¢à¸à¸²à¸£à¸ªà¸£à¹à¸²à¸à¸ªà¸´à¸à¸à¹à¸²</value> <value xml:lang="zh">产åé ç½®æç»ç±»å</value> </property> + <property key="FormFieldTitle_printPickSheet"> + <value xml:lang="en">Print Pick Sheet</value> + </property> + <property key="FormFieldTitle_printPickSheetFirst"> + <value xml:lang="en">Print First</value> + </property> <property key="FormFieldTitle_productContentTypeId"> <value xml:lang="de">Produkt Inhalt Typ ID</value> <value xml:lang="en">Product Content Type Id</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=767482&r1=767481&r2=767482&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 Wed Apr 22 12:19:39 2009 @@ -672,7 +672,50 @@ </if-not-empty> </simple-method> - <!-- Picklist --> + <!-- print pick sheet --> + <simple-method method-name="printPickSheets" short-description="Print pick sheets for orders"> + <now-timestamp field="nowTimestamp"/> + <set-service-fields service-name="findOrdersToPickMove" map="parameters" to-map="findOrdersToPickMoveMap"/> + + <call-service service-name="findOrdersToPickMove" in-map-name="findOrdersToPickMoveMap"> + <result-to-field result-name="pickMoveInfoList"/> + </call-service> + + <if-not-empty field="parameters.printGroupName"> + <set field="printGroupName" from-field="parameters.printGroupName"/> + <iterate list="pickMoveInfoList" entry="pickMoveInfo"> + <set field="groupName" from-field="pickMoveInfo.groupName"/> + <if-compare-field field="groupName" operator="equals" to-field="printGroupName"> + <list-to-list list="pickMoveInfo.orderReadyToPickInfoList" to-list="toPrintList"/> + </if-compare-field> + </iterate> + <else> + <iterate list="pickMoveInfoList" entry="pickMoveInfo"> + <list-to-list list="pickMoveInfo.orderReadyToPickInfoList" to-list="toPrintList"/> + </iterate> + </else> + </if-not-empty> + <set field="printListCounter" value="0" type="Long"/> + <iterate list="toPrintList" entry="toPrint"> + <if> + <condition> + <or> + <if-empty field="parameters.maxNumberOfOrdersToPrint"/> + <if-compare-field field="printListCounter" operator="less" to-field="parameters.maxNumberOfOrdersToPrint" type="Long"/> + </or> + </condition> + <then> + <set field="orderHeaderMap.orderId" from-field="toPrint.orderHeader.orderId"/> + <set field="orderHeaderMap.pickSheetPrintedDate" from-field="nowTimestamp"/> + <call-service service-name="updateOrderHeader" in-map-name="orderHeaderMap"/> + <set field="printListCounter" value="${printListCounter + 1}" type="Long"/> + </then> + </if> + </iterate> + <field-to-result field="pickMoveInfoList" result-name="pickMoveInfoList"/> + </simple-method> + + <!-- Picklist --> <simple-method method-name="createPicklist" short-description="Create Picklist"> <check-permission permission="FACILITY" action="_CREATE"> <fail-message message="Security Error: to run createPicklist you must have the FACILITY_CREATE or FACILITY_ADMIN permission"/> Modified: ofbiz/trunk/applications/product/servicedef/services_picklist.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/servicedef/services_picklist.xml?rev=767482&r1=767481&r2=767482&view=diff ============================================================================== --- ofbiz/trunk/applications/product/servicedef/services_picklist.xml (original) +++ ofbiz/trunk/applications/product/servicedef/services_picklist.xml Wed Apr 22 12:19:39 2009 @@ -60,6 +60,19 @@ <attribute name="picklistId" type="String" mode="OUT" optional="false"/> </service> + <service name="printPickSheets" engine="simple" + location="component://product/script/org/ofbiz/shipment/picklist/PicklistServices.xml" invoke="printPickSheets"> + <description>Print pick sheets for orders</description> + <permission-service service-name="facilityGenericPermission" main-action="CREATE"/> + <attribute name="facilityId" type="String" mode="IN" optional="false"/> + <attribute name="maxNumberOfOrdersToPrint" type="Long" mode="IN" optional="true"/> + <attribute name="printGroupName" type="String" mode="IN" 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"/> + <attribute name="pickMoveInfoList" type="List" mode="OUT" optional="false"/> + </service> + <service name="getPicklistDisplayInfo" engine="simple" location="component://product/script/org/ofbiz/shipment/picklist/PicklistServices.xml" invoke="getPicklistDisplayInfo"> <description>Create Picklist From Orders</description> Modified: ofbiz/trunk/applications/product/webapp/facility/WEB-INF/controller.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/webapp/facility/WEB-INF/controller.xml?rev=767482&r1=767481&r2=767482&view=diff ============================================================================== --- ofbiz/trunk/applications/product/webapp/facility/WEB-INF/controller.xml (original) +++ ofbiz/trunk/applications/product/webapp/facility/WEB-INF/controller.xml Wed Apr 22 12:19:39 2009 @@ -647,6 +647,10 @@ <response name="success" type="view" value="PickMoveStock"/> <response name="error" type="view" value="PickMoveStock"/> </request-map> + <request-map uri="PrintPickSheets"> + <security https="true" auth="true"/> + <response name="success" type="view" value="PrintPickSheets.pdf"/> + </request-map> <!-- ================ Picking Verify Requests ================= --> <request-map uri="VerifyPick"> @@ -1209,6 +1213,7 @@ <view-map name="PickMoveStock" type="screen" page="component://product/widget/facility/FacilityScreens.xml#PickMoveStock"/> <view-map name="PickMoveStockSimple" type="screen" page="component://product/widget/facility/FacilityScreens.xml#PickMoveStockSimple"/> <view-map name="PicklistReport.pdf" type="screenfop" page="component://product/widget/facility/FacilityScreens.xml#PicklistReport.fo" content-type="application/pdf" encoding="none"/> + <view-map name="PrintPickSheets.pdf" type="screenfop" page="component://product/widget/facility/FacilityScreens.xml#PrintPickSheets.fo" content-type="application/pdf" encoding="none"/> <view-map name="FindFacilityGroup" type="screen" page="component://product/widget/facility/FacilityGroupScreens.xml#FindFacilityGroup"/> <view-map name="EditFacilityGroup" type="screen" page="component://product/widget/facility/FacilityGroupScreens.xml#EditFacilityGroup"/> 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=767482&r1=767481&r2=767482&view=diff ============================================================================== --- ofbiz/trunk/applications/product/webapp/facility/facility/PicklistOptions.ftl (original) +++ ofbiz/trunk/applications/product/webapp/facility/facility/PicklistOptions.ftl Wed Apr 22 12:19:39 2009 @@ -55,6 +55,8 @@ <td>${uiLabelMap.ProductReadyToPick}</td> <td>${uiLabelMap.ProductNeedStockMove}</td> <td> </td> + <td> </td> + <td> </td> </tr> <#if rushOrderInfo?has_content> <#assign orderReadyToPickInfoList = rushOrderInfo.orderReadyToPickInfoList?if_exists> @@ -141,6 +143,22 @@ </#if> </td> + <td> + <#if orderReadyToPickInfoList?has_content> + <form method="post" action="<@ofbizUrl>PrintPickSheets</@ofbizUrl>"> + <input type="hidden" name="printGroupName" value="${groupName?if_exists}"/> + <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}"/> + <span class="label">${uiLabelMap.FormFieldTitle_printPickSheetFirst}</span> + <input type="text" size="4" name="maxNumberOfOrdersToPrint" value="20"/> + <input type="submit" value="${uiLabelMap.FormFieldTitle_printPickSheet}"/> + </form> + <#else> + + </#if> + </td> </tr> <#-- toggle the row color --> <#assign alt_row = !alt_row> @@ -161,6 +179,18 @@ </#if> </td> + <td> + <#if (orderReadyToPickInfoListSizeTotal > 0)> + <form method="post" action="<@ofbizUrl>PrintPickSheets</@ofbizUrl>"> + <input type="hidden" name="facilityId" value="${facilityId?if_exists}"/> + <span class="label">${uiLabelMap.FormFieldTitle_printPickSheetFirst}</span> + <input type="text" size="4" name="maxNumberOfOrdersToPrint" value="20"/> + <input type="submit" value="${uiLabelMap.FormFieldTitle_printPickSheet}"/> + </form> + <#else> + + </#if> + </td> </tr> <#else> <tr><td colspan="4"><h3>${uiLabelMap.ProductNoOrdersFoundReadyToPickOrNeedStockMoves}.</h3></td></tr> Modified: ofbiz/trunk/applications/product/widget/facility/FacilityScreens.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/widget/facility/FacilityScreens.xml?rev=767482&r1=767481&r2=767482&view=diff ============================================================================== --- ofbiz/trunk/applications/product/widget/facility/FacilityScreens.xml (original) +++ ofbiz/trunk/applications/product/widget/facility/FacilityScreens.xml Wed Apr 22 12:19:39 2009 @@ -1204,6 +1204,23 @@ </widgets> </section> </screen> + <screen name="PrintPickSheets.fo"> + <section> + <actions> + <property-map resource="OrderUiLabels" map-name="uiLabelMap" global="true"/> + <property-map resource="ProductUiLabels" map-name="uiLabelMap" global="true"/> + <set field="facilityId" from-field="parameters.facilityId"/> + <service service-name="printPickSheets"/> + <script location="component://product/webapp/facility/WEB-INF/actions/shipment/PrintPickSheets.groovy"/> + <script location="component://order/webapp/ordermgr/WEB-INF/actions/order/CompanyHeader.groovy"/> + </actions> + <widgets> + <platform-specific> + <xsl-fo><html-template location="component://product/webapp/facility/facility/PrintPickSheets.fo.ftl"/></xsl-fo> + </platform-specific> + </widgets> + </section> + </screen> <screen name="PicklistManage"> <section> <actions> |
Free forum by Nabble | Edit this page |