Author: ashish
Date: Tue Nov 10 14:32:53 2009 New Revision: 834479 URL: http://svn.apache.org/viewvc?rev=834479&view=rev Log: Applied patch from jira issue OFBIZ-3173 - Better supportability for products of type MARKETING_PKG_AUTO in order processing and fulfillment process. Following points are covered in this patch: 1) Show associated products for product of type "MARKETING_PKG_AUTO" on order items section of show cart page in order manager application. 2) Marketing packages should only shown backordered when ATP of product which compose Marketing packages product are less than quantity added in cart. 3) Pick sheets should show Products of type Marketing Packages along with the products which compose Marketing Packages. 4) Show link of production run created on order items section of Order detail page while placing order for product of type MARKETING_PKG_AUTO. 5) Product of type Marketing Packages should be shown on Verify Pick Screen along with Products they are composed of. Thanks Divesh for the contribution - this is very nice addition to the trunk. I would be more then happy to see comments / concern from - Jacopo? Scott? Anil? or others? Added: ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/lookup/ ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/lookup/LookupAssociatedProducts.groovy (with props) Modified: ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/jobshopmgt/ProductionRunServices.java ofbiz/trunk/applications/order/config/OrderUiLabels.xml ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/controller.xml ofbiz/trunk/applications/order/webapp/ordermgr/entry/cart/showcartitems.ftl ofbiz/trunk/applications/order/widget/ordermgr/OrderEntryCartScreens.xml ofbiz/trunk/applications/order/widget/ordermgr/OrderEntryForms.xml ofbiz/trunk/applications/product/src/org/ofbiz/product/inventory/InventoryServices.java ofbiz/trunk/applications/product/webapp/facility/facility/PrintPickSheets.fo.ftl ofbiz/trunk/applications/product/webapp/facility/shipment/VerifyPick.ftl ofbiz/trunk/applications/product/widget/facility/ShipmentScreens.xml ofbiz/trunk/specialpurpose/ecommerce/data/DemoProduct.xml Modified: ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/jobshopmgt/ProductionRunServices.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/jobshopmgt/ProductionRunServices.java?rev=834479&r1=834478&r2=834479&view=diff ============================================================================== --- ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/jobshopmgt/ProductionRunServices.java (original) +++ ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/jobshopmgt/ProductionRunServices.java Tue Nov 10 14:32:53 2009 @@ -2392,6 +2392,12 @@ String productionRunId = (String)resultService.get("productionRunId"); result.put("productionRunId", productionRunId); + + try { + delegator.create("WorkOrderItemFulfillment", UtilMisc.toMap("workEffortId", productionRunId, "orderId", orderId, "orderItemSeqId", orderItemSeqId)); + } catch (GenericEntityException e) { + return ServiceUtil.returnError("Error creating a production run for marketing package for order [" + orderId + " " + orderItemSeqId + "]: " + e.getMessage()); + } try { serviceContext.clear(); Modified: ofbiz/trunk/applications/order/config/OrderUiLabels.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/config/OrderUiLabels.xml?rev=834479&r1=834478&r2=834479&view=diff ============================================================================== --- ofbiz/trunk/applications/order/config/OrderUiLabels.xml (original) +++ ofbiz/trunk/applications/order/config/OrderUiLabels.xml Tue Nov 10 14:32:53 2009 @@ -1513,6 +1513,9 @@ <value xml:lang="th">à¸à¸£à¸±à¸à¸à¸£à¸¸à¸à¸à¸³à¸£à¹à¸à¸à¸ªà¸´à¸à¸à¹à¸²</value> <value xml:lang="zh">å·²æ¹åç产åéæ±</value> </property> + <property key="OrderAssociatedProducts"> + <value xml:lang="en">Associated Products</value> + </property> <property key="OrderAuthService"> <value xml:lang="en">Auth Service</value> <value xml:lang="es">Servicio de autentificación</value> @@ -3946,6 +3949,9 @@ <value xml:lang="en">Mark Viewed</value> <value xml:lang="it">Marca come visionato</value> </property> + <property key="OrderMarketingPackageComposedBy"> + <value xml:lang="en">Marketing Package Composed by:</value> + </property> <property key="OrderMethod"> <value xml:lang="cs">Způsob</value> <value xml:lang="de">Methode</value> Added: ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/lookup/LookupAssociatedProducts.groovy URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/lookup/LookupAssociatedProducts.groovy?rev=834479&view=auto ============================================================================== --- ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/lookup/LookupAssociatedProducts.groovy (added) +++ ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/lookup/LookupAssociatedProducts.groovy Tue Nov 10 14:32:53 2009 @@ -0,0 +1,46 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +import javolution.util.FastList; +import org.ofbiz.base.util.UtilValidate; +import org.ofbiz.entity.condition.EntityCondition; +import org.ofbiz.entity.condition.EntityOperator; +import org.ofbiz.entity.util.EntityUtil; + +productId = request.getParameter("productId"); + +if (productId != null) { + product = delegator.findOne("Product", [productId : productId], false); + prodAssocs = product.getRelated("MainProductAssoc"); + if (UtilValidate.isNotEmpty(prodAssocs)) { + products = EntityUtil.filterByAnd(prodAssocs, [EntityCondition.makeCondition("productAssocTypeId", EntityOperator.NOT_EQUAL, "PRODUCT_VARIANT")]); + + if (UtilValidate.isNotEmpty(products)) { + productList = FastList.newInstance(); + products.each { product -> + if (product != null) { + String productIdTo = product.getString("productIdTo"); + prodAssocRecord = delegator.findByAnd("Product", [productId : productIdTo]); + productList.add(EntityUtil.getFirst(prodAssocRecord)); + } + } + context.put("productList",productList); + } + } +} Propchange: ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/lookup/LookupAssociatedProducts.groovy ------------------------------------------------------------------------------ svn:eol-style = native Propchange: ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/lookup/LookupAssociatedProducts.groovy ------------------------------------------------------------------------------ svn:keywords = Date Rev Author URL Id Propchange: ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/lookup/LookupAssociatedProducts.groovy ------------------------------------------------------------------------------ svn:mime-type = text/plain Modified: ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/controller.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/controller.xml?rev=834479&r1=834478&r2=834479&view=diff ============================================================================== --- ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/controller.xml (original) +++ ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/controller.xml Tue Nov 10 14:32:53 2009 @@ -1637,6 +1637,8 @@ <request-map uri="LookupWorkEffort"><security https="true" auth="true"/><response name="success" type="view" value="LookupWorkEffort"/></request-map> <request-map uri="LookupBulkAddProducts"><security https="true" auth="true"/><response name="success" type="view" value="LookupBulkAddProducts"/></request-map> <request-map uri="LookupBulkAddSupplierProducts"><security https="true" auth="true"/><response name="success" type="view" value="LookupBulkAddSupplierProducts"/></request-map> + <request-map uri="LookupAssociatedProducts"><security https="true" auth="true"/><response name="success" type="view" value="LookupAssociatedProducts"/></request-map> + <!-- PDFs --> <request-map uri="order.pdf"><security https="true" auth="true"/><response name="success" type="view" value="OrderPDF"/></request-map> <request-map uri="return.pdf"><security https="true" auth="true"/><response name="success" type="view" value="ReturnPDF"/></request-map> @@ -1840,6 +1842,7 @@ <view-map name="LookupBulkAddProducts" type="screen" page="component://order/widget/ordermgr/OrderEntryCartScreens.xml#LookupBulkAddProducts"/> <view-map name="LookupBulkAddSupplierProducts" type="screen" page="component://order/widget/ordermgr/OrderEntryCartScreens.xml#LookupBulkAddSupplierProducts"/> <view-map name="LookupContent" page="component://content/widget/content/ContentScreens.xml#LookupContent" type="screen"/> + <view-map name="LookupAssociatedProducts" type="screen" page="component://order/widget/ordermgr/OrderEntryCartScreens.xml#LookupAssociatedProducts"/> <!-- PDFs --> <view-map name="OrderPDF" type="screenfop" page="component://order/widget/ordermgr/OrderPrintScreens.xml#OrderPDF" content-type="application/pdf" encoding="none"/> <view-map name="ReturnPDF" type="screenfop" page="component://order/widget/ordermgr/OrderPrintScreens.xml#ReturnPDF" content-type="application/pdf" encoding="none"/> Modified: ofbiz/trunk/applications/order/webapp/ordermgr/entry/cart/showcartitems.ftl URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/webapp/ordermgr/entry/cart/showcartitems.ftl?rev=834479&r1=834478&r2=834479&view=diff ============================================================================== --- ofbiz/trunk/applications/order/webapp/ordermgr/entry/cart/showcartitems.ftl (original) +++ ofbiz/trunk/applications/order/webapp/ordermgr/entry/cart/showcartitems.ftl Tue Nov 10 14:32:53 2009 @@ -18,7 +18,14 @@ --> <#-- Continuation of showcart.ftl: List of order items and forms to modify them. --> - +<#macro showAssoc productAssoc> + <#assign productAssocType = (delegator.findOne("ProductAssocType", {"productAssocTypeId" : productAssoc.productAssocTypeId}, false))/> + <#assign assocProduct = (delegator.findOne("Product", {"productId" : productAssoc.productIdTo}, false))/> + <#if assocProduct?has_content> + <td><a href="<@ofbizUrl>/product?product_id=${productAssoc.productIdTo}</@ofbizUrl>"class="buttontext">${productAssoc.productIdTo}</a></td> + <td>- ${(assocProduct.productName)?if_exists}<i>(${(productAssocType.description)?default("Unknown")})</i></td> + </#if> +</#macro> <div class="screenlet"> <div class="screenlet-title-bar"> <div class='h3'>${uiLabelMap.OrderOrderItems}</div> @@ -144,12 +151,16 @@ ${uiLabelMap.ProductAtp} = ${availableToPromiseMap.get(productId)}, ${uiLabelMap.ProductQoh} = ${quantityOnHandMap.get(productId)} <#if Static["org.ofbiz.common.CommonWorkers"].hasParentType(delegator, "ProductType", "productTypeId", product.productTypeId, "parentTypeId", "MARKETING_PKG")> ${uiLabelMap.ProductMarketingPackageATP} = ${mktgPkgATPMap.get(productId)}, ${uiLabelMap.ProductMarketingPackageQOH} = ${mktgPkgQOHMap.get(productId)} + <#if ( mktgPkgATPMap.get(cartLine.getProductId()) < cartLine.getQuantity()) && (shoppingCart.getOrderType() == 'SALES_ORDER')> + <#assign backOrdered = cartLine.getQuantity() - mktgPkgATPMap.get(cartLine.getProductId())/> + <span style="color: red; font-size: 15px;">[${backOrdered?if_exists} ${uiLabelMap.OrderBackOrdered}]</span> + </#if> </#if> - <#if (availableToPromiseMap.get(cartLine.getProductId()) <= 0) && (shoppingCart.getOrderType() == "SALES_ORDER" && product.productTypeId != "DIGITAL_GOOD")> + <#if (availableToPromiseMap.get(cartLine.getProductId()) <= 0) && (shoppingCart.getOrderType() == 'SALES_ORDER') && product.productTypeId != "DIGITAL_GOOD" && product.productTypeId != "MARKETING_PKG_AUTO" && product.productTypeId != "MARKETING_PKG_PICK"> <span style="color: red;">[${cartLine.getQuantity()} ${uiLabelMap.OrderBackOrdered}]</span> <#else> - <#if (availableToPromiseMap.get(cartLine.getProductId()) < cartLine.getQuantity()) && (shoppingCart.getOrderType() == "SALES_ORDER" && product.productTypeId != "DIGITAL_GOOD")> - <#assign backOrdered = cartLine.getQuantity() - availableToPromiseMap.get(cartLine.getProductId())> + <#if (availableToPromiseMap.get(cartLine.getProductId()) < cartLine.getQuantity()) && (shoppingCart.getOrderType() == 'SALES_ORDER') && product.productTypeId != "DIGITAL_GOOD" && product.productTypeId != "MARKETING_PKG_AUTO" && product.productTypeId != "MARKETING_PKG_PICK"> + <#assign backOrdered = cartLine.getQuantity() - availableToPromiseMap.get(cartLine.getProductId())/> <span style="color: red;">[${backOrdered?if_exists} ${uiLabelMap.OrderBackOrdered}]</span> </#if> </#if> @@ -202,6 +213,27 @@ </table> </td> </tr> + + <#-- Show Associated Products (not for Variants) --> + <#assign itemProductAssocList = cartLine.getProduct().getRelated("MainProductAssoc", + Static["org.ofbiz.base.util.UtilMisc"].toList("productAssocTypeId", "sequenceNum"))?if_exists/> + <#if itemProductAssocList?exists && itemProductAssocList?has_content> + <tr><td colspan="8"><hr /></td></tr> + <tr> + <td>${uiLabelMap.AssociatedProducts}</td> + <td><a href="<@ofbizUrl>LookupAssociatedProducts?productId=${cartLine.getProductId()?if_exists}</@ofbizUrl>" class="buttontext">${uiLabelMap.OrderQuickLookup}</a></td> + </tr> + <#assign relatedProdCount = 0/> + <#list itemProductAssocList?if_exists as itemProductAssoc> + <tr> + <#if "PRODUCT_VARIANT" != itemProductAssoc.productAssocTypeId> + <#assign relatedProdCount = relatedProdCount + 1/> + <#if (relatedProdCount > 3)><#break></#if> + <@showAssoc productAssoc=itemProductAssoc /> + </#if> + </tr> + </#list> + </#if> </table> <#if (cartLine.getIsPromo() && cartLine.getAlternativeOptionProductIds()?has_content)> Modified: ofbiz/trunk/applications/order/widget/ordermgr/OrderEntryCartScreens.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/widget/ordermgr/OrderEntryCartScreens.xml?rev=834479&r1=834478&r2=834479&view=diff ============================================================================== --- ofbiz/trunk/applications/order/widget/ordermgr/OrderEntryCartScreens.xml (original) +++ ofbiz/trunk/applications/order/widget/ordermgr/OrderEntryCartScreens.xml Tue Nov 10 14:32:53 2009 @@ -214,4 +214,22 @@ </widgets> </section> </screen> + <screen name="LookupAssociatedProducts"> + <section> + <actions> + <set field="titleProperty" value="OrderAssociatedProducts"/> + <script location="component://order/webapp/ordermgr/WEB-INF/actions/lookup/LookupAssociatedProducts.groovy"/> + <set field="viewIndex" from-field="parameters.VIEW_INDEX" type="Integer" default-value="0"/> + <set field="viewSize" from-field="parameters.VIEW_SIZE" type="Integer" default-value="10"/> + </actions> + <widgets> + <decorator-screen name="CommonOrderCatalogDecorator" location="component://order/widget/ordermgr/OrderEntryCommonScreens.xml"> + <decorator-section name="body"> + <include-form name="LookupAssociatedProducts" location="component://order/widget/ordermgr/OrderEntryForms.xml"/> + </decorator-section> + </decorator-screen> + </widgets> + </section> + </screen> + </screens> Modified: ofbiz/trunk/applications/order/widget/ordermgr/OrderEntryForms.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/widget/ordermgr/OrderEntryForms.xml?rev=834479&r1=834478&r2=834479&view=diff ============================================================================== --- ofbiz/trunk/applications/order/widget/ordermgr/OrderEntryForms.xml (original) +++ ofbiz/trunk/applications/order/widget/ordermgr/OrderEntryForms.xml Tue Nov 10 14:32:53 2009 @@ -196,5 +196,25 @@ <submit/> </field> </form> + <form name="LookupAssociatedProducts" type="multi" use-row-submit="true" list-name="productList" title="" target="BulkAddProducts" + paginate-target="LookupAssociatedProducts" default-title-style="tableheadtext" default-widget-style="inputBox" default-tooltip-style="tabletext"> + <field name="productId" title="${uiLabelMap.ProductProductId}" widget-style="buttontext"> + <hyperlink description="${productId}" target="/catalog/control/EditProductInventoryItems?productId=${productId}" target-type="inter-app"/> + </field> + <field name="brandName" title="${uiLabelMap.ProductBrandName}"><display/></field> + <field name="internalName"><display/></field> + <field name="quantity" title="${uiLabelMap.OrderQuantity}"> + <text size="5" maxlength="10"/> + </field> + <field name="amount" title="${uiLabelMap.OrderAmount}"> + <text size="5" maxlength="10"/> + </field> + <field name="itemDesiredDeliveryDate" title="${uiLabelMap.OrderDesiredDeliveryDate}"> + <date-time/> + </field> + <field name="submitButton" title="${uiLabelMap.OrderAddToOrder}" widget-style="smallSubmit"> + <submit/> + </field> + </form> </forms> Modified: ofbiz/trunk/applications/product/src/org/ofbiz/product/inventory/InventoryServices.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/src/org/ofbiz/product/inventory/InventoryServices.java?rev=834479&r1=834478&r2=834479&view=diff ============================================================================== --- ofbiz/trunk/applications/product/src/org/ofbiz/product/inventory/InventoryServices.java (original) +++ ofbiz/trunk/applications/product/src/org/ofbiz/product/inventory/InventoryServices.java Tue Nov 10 14:32:53 2009 @@ -673,8 +673,8 @@ // Figure out what the QOH and ATP inventory would be with this associated product BigDecimal currentQuantityOnHandTotal = (BigDecimal) resultOutput.get("quantityOnHandTotal"); BigDecimal currentAvailableToPromiseTotal = (BigDecimal) resultOutput.get("availableToPromiseTotal"); - BigDecimal tmpQuantityOnHandTotal = currentQuantityOnHandTotal.divide(assocQuantity, generalRounding); - BigDecimal tmpAvailableToPromiseTotal = currentAvailableToPromiseTotal.divide(assocQuantity, generalRounding); + BigDecimal tmpQuantityOnHandTotal = currentQuantityOnHandTotal.divideToIntegralValue(assocQuantity, generalRounding); + BigDecimal tmpAvailableToPromiseTotal = currentAvailableToPromiseTotal.divideToIntegralValue(assocQuantity, generalRounding); // reset the minimum QOH and ATP quantities if those quantities for this product are less if (minQuantityOnHandTotal == null || tmpQuantityOnHandTotal.compareTo(minQuantityOnHandTotal) < 0) { 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=834479&r1=834478&r2=834479&view=diff ============================================================================== --- ofbiz/trunk/applications/product/webapp/facility/facility/PrintPickSheets.fo.ftl (original) +++ ofbiz/trunk/applications/product/webapp/facility/facility/PrintPickSheets.fo.ftl Tue Nov 10 14:32:53 2009 @@ -155,11 +155,12 @@ <fo:table-cell><fo:block>${uiLabelMap.OrderUnitPrice}</fo:block></fo:table-cell> </fo:table-row > <#assign totalQty = 0> + <#assign rowColor = "#D4D0C8"/> <#list itemInfoList as itemInfo> <#if itemInfo.get("${orderId}")?exists > <#assign infoItems = itemInfo.get("${orderId}")> <#list infoItems as infoItem> - <fo:table-row> + <fo:table-row background-color="${rowColor}"> <#assign orderItemShipGrpInvRes = infoItem.orderItemShipGrpInvRes> <#assign orderItem = orderItemShipGrpInvRes.getRelatedOne("OrderItem")> <#assign product = orderItem.getRelatedOne("Product")> @@ -167,9 +168,9 @@ <#assign inventoryItem = infoItem.inventoryItem> <#if infoItem.facilityLocation?has_content> <#assign facilityLocation = infoItem.facilityLocation> - <fo:table-cell><fo:block font-size="10pt">${facilityLocation.locationSeqId?if_exists}</fo:block></fo:table-cell> + <fo:table-cell><fo:block font-size="10pt">${facilityLocation.locationSeqId?default("_NA_")}</fo:block></fo:table-cell> <#else> - <fo:table-cell><fo:block> </fo:block></fo:table-cell> + <fo:table-cell><fo:block font-size="10pt">_NA_</fo:block></fo:table-cell> </#if> <fo:table-cell><fo:block font-size="10pt">${product.productId} </fo:block></fo:table-cell> <fo:table-cell><fo:block font-size="10pt">${product.internalName?if_exists} </fo:block></fo:table-cell> @@ -183,12 +184,76 @@ <fo:table-cell><fo:block font-size="10pt">${orderItemShipGrpInvRes.quantity?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> - </#list> - </#if> - </#list> - </fo:table-body> - </fo:table> - </fo:block> + <#if product.productTypeId == "MARKETING_PKG_AUTO"> + <fo:table-row background-color="${rowColor}"> + <fo:table-cell number-columns-spanned="6"> + <fo:block text-align="left" font-weight="bold"> + ${uiLabelMap.OrderMarketingPackageComposedBy} + </fo:block> + </fo:table-cell> + </fo:table-row> + <#assign workOrderItemFulfillments = orderItem.getRelated("WorkOrderItemFulfillment")> + <#if workOrderItemFulfillments?has_content> + <#assign workOrderItemFulfillment = Static["org.ofbiz.entity.util.EntityUtil"].getFirst(workOrderItemFulfillments)/> + <#if workOrderItemFulfillment?has_content> + <#assign workEffort = workOrderItemFulfillment.getRelatedOne("WorkEffort")/> + <#if workEffort?has_content> + <#assign workEffortTask = Static["org.ofbiz.entity.util.EntityUtil"].getFirst(delegator.findByAnd("WorkEffort", {"workEffortParentId" : workEffort.workEffortId}))/> + <#if workEffortTask?has_content> + <#assign workEffortInventoryAssigns = workEffortTask.getRelated("WorkEffortInventoryAssign")/> + <#if workEffortInventoryAssigns?has_content> + <#list workEffortInventoryAssigns as workEffortInventoryAssign> + <#assign inventoryItem = workEffortInventoryAssign.getRelatedOne("InventoryItem")/> + <#assign product = inventoryItem.getRelatedOne("Product")/> + <fo:table-row background-color="${rowColor}"> + <#-- bin location --> + <fo:table-cell ><fo:block font-size="10pt"><#if inventoryItem?exists>${inventoryItem.locationSeqId?default("_NA_")}</#if></fo:block></fo:table-cell> + + <#-- product ID --> + <#if product?has_content> + <fo:table-cell ><fo:block font-size="10pt">${product.productId}</fo:block></fo:table-cell> + <#else> + <fo:table-cell ><fo:block font-size="10pt">[N/A]</fo:block></fo:table-cell> + </#if> + + <#-- product name --> + <#if product?has_content> + <fo:table-cell ><fo:block font-size="10pt">${product.productName?default(product.internalName?default("[Not Internal Name Set!]"))?xml}</fo:block></fo:table-cell> + <#else> + <fo:table-cell ><fo:block font-size="10pt">[N/A]</fo:block></fo:table-cell> + </#if> + + <#-- supplier --> + <#if vendor?has_content > + <fo:table-cell><fo:block font-size="10pt">${vendor.supplierProductId?if_exists}</fo:block></fo:table-cell> + <#else> + <fo:table-cell><fo:block font-size="10pt"> </fo:block></fo:table-cell> + </#if> + + <#-- quantity --> + <fo:table-cell><fo:block font-size="10pt">${workEffortInventoryAssign.quantity?if_exists}</fo:block></fo:table-cell> + + <#-- unit price --> + <fo:table-cell ><fo:block></fo:block></fo:table-cell> + </fo:table-row> + </#list> + </#if> + </#if> + </#if> + </#if> + </#if> + </#if> + <#if rowColor == "#D4D0C8"> + <#assign rowColor = "white"/> + <#else> + <#assign rowColor = "#D4D0C8"/> + </#if> + </#list> + </#if> + </#list> + </fo:table-body> + </fo:table> + </fo:block> <fo:block text-align="right"> <fo:table> Modified: ofbiz/trunk/applications/product/webapp/facility/shipment/VerifyPick.ftl URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/webapp/facility/shipment/VerifyPick.ftl?rev=834479&r1=834478&r2=834479&view=diff ============================================================================== --- ofbiz/trunk/applications/product/webapp/facility/shipment/VerifyPick.ftl (original) +++ ofbiz/trunk/applications/product/webapp/facility/shipment/VerifyPick.ftl Tue Nov 10 14:32:53 2009 @@ -261,6 +261,39 @@ <input type="hidden" name="prd_${rowKey}" value="${(orderItem.productId)?if_exists}"/> <input type="hidden" name="ite_${rowKey}" value="${(orderItem.orderItemSeqId)?if_exists}"/> </tr> + <#assign workOrderItemFulfillments = orderItem.getRelated("WorkOrderItemFulfillment")/> + <#if workOrderItemFulfillments?has_content> + <#assign workOrderItemFulfillment = Static["org.ofbiz.entity.util.EntityUtil"].getFirst(workOrderItemFulfillments)/> + <#if workOrderItemFulfillment?has_content> + <#assign workEffort = workOrderItemFulfillment.getRelatedOne("WorkEffort")/> + <#if workEffort?has_content> + <#assign workEffortTask = Static["org.ofbiz.entity.util.EntityUtil"].getFirst(delegator.findByAnd("WorkEffort", Static["org.ofbiz.base.util.UtilMisc"].toMap("workEffortParentId", workEffort.workEffortId)))/> + <#if workEffortTask?has_content> + <#assign workEffortInventoryAssigns = workEffortTask.getRelated("WorkEffortInventoryAssign")/> + <#if workEffortInventoryAssigns?has_content> + <tr> + <th colspan="8"> + ${uiLabelMap.OrderMarketingPackageComposedBy} + </th> + </tr> + <tr><td colspan="8"><hr /></td></tr> + <#list workEffortInventoryAssigns as workEffortInventoryAssign> + <#assign inventoryItem = workEffortInventoryAssign.getRelatedOne("InventoryItem")/> + <#assign product = inventoryItem.getRelatedOne("Product")/> + <tr> + <td colspan="2"></td> + <td>${product.productId?default("N/A")}</td> + <td>${product.internalName?if_exists}</td> + <td></td> + <td align="right">${workEffortInventoryAssign.quantity?if_exists}</td> + </tr> + </#list> + <tr><td colspan="8"><hr /></td></tr> + </#if> + </#if> + </#if> + </#if> + </#if> <#assign rowKey = rowKey + 1> </#list> </#if> Modified: ofbiz/trunk/applications/product/widget/facility/ShipmentScreens.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/widget/facility/ShipmentScreens.xml?rev=834479&r1=834478&r2=834479&view=diff ============================================================================== --- ofbiz/trunk/applications/product/widget/facility/ShipmentScreens.xml (original) +++ ofbiz/trunk/applications/product/widget/facility/ShipmentScreens.xml Tue Nov 10 14:32:53 2009 @@ -269,6 +269,7 @@ <screen name="VerifyPick"> <section> <actions> + <property-map resource="OrderUiLabels" map-name="uiLabelMap" global="true"/> <set field="titleProperty" value="ProductVerifyPick"/> <set field="headerItem" value="shipment"/> <script location="component://product/webapp/facility/WEB-INF/actions/shipment/VerifyPick.groovy"/> Modified: ofbiz/trunk/specialpurpose/ecommerce/data/DemoProduct.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/ecommerce/data/DemoProduct.xml?rev=834479&r1=834478&r2=834479&view=diff ============================================================================== --- ofbiz/trunk/specialpurpose/ecommerce/data/DemoProduct.xml (original) +++ ofbiz/trunk/specialpurpose/ecommerce/data/DemoProduct.xml Tue Nov 10 14:32:53 2009 @@ -357,7 +357,7 @@ <Product productId="GZ-BASKET" productTypeId="MARKETING_PKG_AUTO" productName="Gizmo Basket" internalName="Auto-Assembled Gizmo Basket" description="Auto-Assembled Gizmo Basket. Automatically assembled each time it's ordered." longDescription="Auto-Assembled Gizmo Basket. This item will be automatically assembled with production runs every time it's ordered, and the inventory counts for it are based on the quantity available and on hand for the component items." - taxable="Y" chargeShipping="Y" autoCreateKeywords="Y" isVirtual="N" isVariant="N"/> + taxable="Y" chargeShipping="Y" autoCreateKeywords="Y" isVirtual="N" isVariant="N" requireInventory="N"/> <ProductPrice productId="GZ-BASKET" productPricePurposeId="PURCHASE" productPriceTypeId="DEFAULT_PRICE" currencyUomId="USD" productStoreGroupId="_NA_" price="150" fromDate="2001-05-13 12:00:00.0"/> <ProductPrice productId="GZ-BASKET" productPricePurposeId="PURCHASE" productPriceTypeId="LIST_PRICE" currencyUomId="USD" productStoreGroupId="_NA_" price="165" fromDate="2001-05-13 12:00:00.0"/> <ProductAssoc productId="GZ-BASKET" productIdTo="GZ-1000" productAssocTypeId="MANUF_COMPONENT" quantity="1" fromDate="2001-05-13 12:00:00.0"/> @@ -635,6 +635,9 @@ <ProductFacility productId="WG-9943-B4" facilityId="WebStoreWarehouse" minimumStock="2" reorderQuantity="10" daysToShip="1"/> <ProductFacility productId="WG-9943-S3" facilityId="WebStoreWarehouse" minimumStock="2" reorderQuantity="10" daysToShip="1"/> <ProductFacility productId="WG-9943-S4" facilityId="WebStoreWarehouse" minimumStock="2" reorderQuantity="10" daysToShip="1"/> + <ProductFacility productId="GZ-1000" facilityId="WebStoreWarehouse" minimumStock="2" reorderQuantity="10" daysToShip="1"/> + <ProductFacility productId="GZ-1001" facilityId="WebStoreWarehouse" minimumStock="2" reorderQuantity="10" daysToShip="1"/> + <ProductFacility productId="GZ-1004" facilityId="WebStoreWarehouse" minimumStock="2" reorderQuantity="10" daysToShip="1"/> <ProductFacilityLocation productId="GZ-2644" facilityId="WebStoreWarehouse" locationSeqId="TLTLTLUL01"/> <ProductFacilityLocation productId="GZ-2644" facilityId="WebStoreWarehouse" locationSeqId="TLTLTLLL01" minimumStock="2" moveQuantity="5"/> @@ -644,6 +647,9 @@ <ProductFacilityLocation productId="WG-1111" facilityId="WebStoreWarehouse" locationSeqId="TLTLTLLL03" minimumStock="2" moveQuantity="5"/> <ProductFacilityLocation productId="WG-5569" facilityId="WebStoreWarehouse" locationSeqId="TLTLTLUL04"/> <ProductFacilityLocation productId="WG-5569" facilityId="WebStoreWarehouse" locationSeqId="TLTLTLLL04" minimumStock="5" moveQuantity="20"/> + <ProductFacilityLocation productId="GZ-1000" facilityId="WebStoreWarehouse" locationSeqId="TLTLTLUL01" minimumStock="5" moveQuantity="20"/> + <ProductFacilityLocation productId="GZ-1001" facilityId="WebStoreWarehouse" locationSeqId="TLTLTLLL02" minimumStock="5" moveQuantity="20"/> + <ProductFacilityLocation productId="GZ-1004" facilityId="WebStoreWarehouse" locationSeqId="TLTLTLLL04" minimumStock="5" moveQuantity="20"/> <!-- some default inventory quantities, things are a bit underutilized without these... --> <InventoryItem facilityId="WebStoreWarehouse" locationSeqId="TLTLTLUL01" @@ -685,6 +691,14 @@ <InventoryItemDetail inventoryItemId="9023" inventoryItemDetailSeqId="0001" effectiveDate="2001-05-13 12:00:00.0" availableToPromiseDiff="8" quantityOnHandDiff="8"/> <InventoryItem facilityId="WebStoreWarehouse" inventoryItemId="9024" inventoryItemTypeId="NON_SERIAL_INV_ITEM" productId="GZ-1006-4" ownerPartyId="Company" currencyUomId="USD" unitCost="2.4"/> <InventoryItemDetail inventoryItemId="9024" inventoryItemDetailSeqId="0001" effectiveDate="2001-05-13 12:00:00.0" availableToPromiseDiff="8" quantityOnHandDiff="8"/> + + <InventoryItem facilityId="WebStoreWarehouse" inventoryItemId="9026" inventoryItemTypeId="NON_SERIAL_INV_ITEM" productId="GZ-1000" ownerPartyId="Company" currencyUomId="USD" unitCost="2.4"/> + <InventoryItemDetail inventoryItemId="9026" inventoryItemDetailSeqId="0001" effectiveDate="2001-05-13 12:00:00.0" availableToPromiseDiff="8" quantityOnHandDiff="8"/> + <InventoryItem facilityId="WebStoreWarehouse" inventoryItemId="9027" inventoryItemTypeId="NON_SERIAL_INV_ITEM" productId="GZ-1001" ownerPartyId="Company" currencyUomId="USD" unitCost="2.4"/> + <InventoryItemDetail inventoryItemId="9027" inventoryItemDetailSeqId="0001" effectiveDate="2001-05-13 12:00:00.0" availableToPromiseDiff="8" quantityOnHandDiff="8"/> + <InventoryItem facilityId="WebStoreWarehouse" inventoryItemId="9028" inventoryItemTypeId="NON_SERIAL_INV_ITEM" productId="GZ-1004" ownerPartyId="Company" currencyUomId="USD" unitCost="2.4"/> + <InventoryItemDetail inventoryItemId="9028" inventoryItemDetailSeqId="0001" effectiveDate="2001-05-13 12:00:00.0" availableToPromiseDiff="8" quantityOnHandDiff="8"/> + <!-- Some additional test promotions --> <!-- GWP example on >$100 purchase --> |
Free forum by Nabble | Edit this page |