svn commit: r896983 - /ofbiz/trunk/applications/product/webapp/facility/facility/PrintPickSheets.fo.ftl

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

svn commit: r896983 - /ofbiz/trunk/applications/product/webapp/facility/facility/PrintPickSheets.fo.ftl

doogie-3
Author: doogie
Date: Thu Jan  7 19:46:43 2010
New Revision: 896983

URL: http://svn.apache.org/viewvc?rev=896983&view=rev
Log:
Apply slightly modified patch from OFBIZ-3283.

Only print picklist items when the quantity available is more than 0.
Show the proper number to pick based on quantity available. This is very
important for split-ship orders.

Modified:
    ofbiz/trunk/applications/product/webapp/facility/facility/PrintPickSheets.fo.ftl

Modified: ofbiz/trunk/applications/product/webapp/facility/facility/PrintPickSheets.fo.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/webapp/facility/facility/PrintPickSheets.fo.ftl?rev=896983&r1=896982&r2=896983&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/webapp/facility/facility/PrintPickSheets.fo.ftl (original)
+++ ofbiz/trunk/applications/product/webapp/facility/facility/PrintPickSheets.fo.ftl Thu Jan  7 19:46:43 2010
@@ -160,12 +160,17 @@
                                     <#if itemInfo.get("${orderId}")?exists >
                                         <#assign infoItems = itemInfo.get("${orderId}")>
                                         <#list infoItems as infoItem>
-                                            <fo:table-row background-color="${rowColor}">
                                                 <#assign orderItemShipGrpInvRes = infoItem.orderItemShipGrpInvRes>
+                                                <#assign quantityToPick = Static["java.lang.Integer"].parseInt("${orderItemShipGrpInvRes.quantity}") >
+                                                <#if orderItemShipGrpInvRes.quantityNotAvailable?exists >
+                                                        <#assign quantityToPick = quantityToPick - Static["java.lang.Integer"].parseInt("${orderItemShipGrpInvRes.quantityNotAvailable}")>
+                                                </#if>
                                                 <#assign orderItem = orderItemShipGrpInvRes.getRelatedOne("OrderItem")>
                                                 <#assign product = orderItem.getRelatedOne("Product")>
                                                 <#assign supplierProduct = Static["org.ofbiz.entity.util.EntityUtil"].getFirst(product.getRelated("SupplierProduct"))?if_exists>
                                                 <#assign inventoryItem = infoItem.inventoryItem>
+                                            <#if (quantityToPick > 0)>
+                                            <fo:table-row background-color="${rowColor}">
                                                 <#if infoItem.facilityLocation?has_content>
                                                     <#assign facilityLocation = infoItem.facilityLocation>
                                                     <fo:table-cell><fo:block font-size="10pt">${facilityLocation.locationSeqId?default("_NA_")}</fo:block></fo:table-cell>
@@ -179,11 +184,11 @@
                                                 <#else>
                                                     <fo:table-cell><fo:block font-size="10pt">  </fo:block></fo:table-cell>
                                                 </#if>
-                                                <#assign quantity = Static["java.lang.Integer"].parseInt("${orderItemShipGrpInvRes.quantity}")/>
-                                                <#assign totalQty = totalQty + quantity>
-                                                <fo:table-cell><fo:block font-size="10pt">${orderItemShipGrpInvRes.quantity?if_exists} </fo:block></fo:table-cell>
+                                                <#assign totalQty = totalQty + quantityToPick>
+                                                <fo:table-cell><fo:block font-size="10pt">${quantityToPick?if_exists} </fo:block></fo:table-cell>
                                                 <fo:table-cell><fo:block font-size="10pt"><@ofbizCurrency amount=orderItem.unitPrice isoCode=currencyUomId/></fo:block></fo:table-cell>
                                             </fo:table-row>
+                                            </#if>
                                             <#if product.productTypeId == "MARKETING_PKG_AUTO">
                                                 <fo:table-row background-color="${rowColor}">
                                                     <fo:table-cell  number-columns-spanned="6">
@@ -308,4 +313,4 @@
              </fo:page-sequence>
          </#list>
      </fo:root>
- </#escape>
\ No newline at end of file
+ </#escape>