Author: jacopoc
Date: Thu Nov 26 17:27:22 2009 New Revision: 884653 URL: http://svn.apache.org/viewvc?rev=884653&view=rev Log: Hidden marketing package specific information for non marketing package products in the inventory page. Modified: ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/product/EditProductInventoryItems.groovy ofbiz/trunk/applications/product/webapp/catalog/product/ProductInventorySummary.ftl Modified: ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/product/EditProductInventoryItems.groovy URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/product/EditProductInventoryItems.groovy?rev=884653&r1=884652&r2=884653&view=diff ============================================================================== --- ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/product/EditProductInventoryItems.groovy (original) +++ ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/product/EditProductInventoryItems.groovy Thu Nov 26 17:27:22 2009 @@ -22,6 +22,8 @@ import org.ofbiz.product.inventory.InventoryWorker if (product) { + boolean isMarketingPackage = CommonWorkers.hasParentType(delegator, "ProductType", "productTypeId", product.productTypeId, "parentTypeId", "MARKETING_PKG"); + context.isMarketingPackage = (isMarketingPackage? "true": "false"); //If product is virtual gather summary data from variants if (product.isVirtual && "Y".equals(product.isVirtual)) { //Get the virtual product feature types @@ -86,7 +88,7 @@ quantitySummary.totalAvailableToPromise = resultOutput.availableToPromiseTotal; // if the product is a MARKETING_PKG_AUTO/PICK, then also get the quantity which can be produced from components - if (CommonWorkers.hasParentType(delegator, "ProductType", "productTypeId", product.productTypeId, "parentTypeId", "MARKETING_PKG")) { + if (isMarketingPackage) { resultOutput = dispatcher.runSync("getMktgPackagesAvailable", [productId : productId, facilityId : facility.facilityId]); quantitySummary.mktgPkgQOH = resultOutput.quantityOnHandTotal; quantitySummary.mktgPkgATP = resultOutput.availableToPromiseTotal; @@ -94,7 +96,7 @@ quantitySummaryByFacility.put(facility.facilityId, quantitySummary); } - + productInventoryItems = delegator.findByAnd("InventoryItem", [productId : productId], ['facilityId', '-datetimeReceived', '-inventoryItemId']); Modified: ofbiz/trunk/applications/product/webapp/catalog/product/ProductInventorySummary.ftl URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/webapp/catalog/product/ProductInventorySummary.ftl?rev=884653&r1=884652&r2=884653&view=diff ============================================================================== --- ofbiz/trunk/applications/product/webapp/catalog/product/ProductInventorySummary.ftl (original) +++ ofbiz/trunk/applications/product/webapp/catalog/product/ProductInventorySummary.ftl Thu Nov 26 17:27:22 2009 @@ -31,8 +31,10 @@ <td><b>${uiLabelMap.ProductFacility}</b></td> <td><b>${uiLabelMap.ProductAtp}</b></td> <td><b>${uiLabelMap.ProductQoh}</b></td> + <#if isMarketingPackage == "true"> <td><b>${uiLabelMap.ProductMarketingPackageATP}</b></td> <td><b>${uiLabelMap.ProductMarketingPackageQOH}</b></td> + </#if> <td><b>${uiLabelMap.ProductIncomingShipments}</b></td> <td><b>${uiLabelMap.ProductIncomingProductionRuns}</b></td> <td><b>${uiLabelMap.ProductOutgoingProductionRuns}</b></td> @@ -58,8 +60,10 @@ <a href="/facility/control/ReceiveInventory?facilityId=${facilityId}&productId=${productId}&externLoginKey=${externalLoginKey}" class="buttontext">${uiLabelMap.ProductInventoryReceive}</a></td> <td><#if totalAvailableToPromise?exists>${totalAvailableToPromise}<#else> </#if></td> <td><#if totalQuantityOnHand?exists>${totalQuantityOnHand}<#else> </#if></td> + <#if isMarketingPackage == "true"> <td><#if mktgPkgATP?exists>${mktgPkgATP}<#else> </#if></td> <td><#if mktgPkgQOH?exists>${mktgPkgQOH}<#else> </#if></td> + </#if> <td> <#if incomingShipmentAndItemList?has_content> <#list incomingShipmentAndItemList as incomingShipmentAndItem> @@ -90,6 +94,7 @@ </#if> </td> </tr> + </#if> <#-- toggle the row color --> <#if rowClass == "2"> |
Free forum by Nabble | Edit this page |