Author: sichen
Date: Tue Aug 29 15:09:12 2006 New Revision: 438253 URL: http://svn.apache.org/viewvc?rev=438253&view=rev Log: Separate columns to show ATP/QOH available from components for marketing packages on the Catalog Manager's product inventory page Modified: incubator/ofbiz/trunk/applications/product/config/ProductUiLabels.properties incubator/ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/product/EditProductInventoryItems.bsh incubator/ofbiz/trunk/applications/product/webapp/catalog/product/EditProductInventoryItems.ftl Modified: incubator/ofbiz/trunk/applications/product/config/ProductUiLabels.properties URL: http://svn.apache.org/viewvc/incubator/ofbiz/trunk/applications/product/config/ProductUiLabels.properties?rev=438253&r1=438252&r2=438253&view=diff ============================================================================== --- incubator/ofbiz/trunk/applications/product/config/ProductUiLabels.properties (original) +++ incubator/ofbiz/trunk/applications/product/config/ProductUiLabels.properties Tue Aug 29 15:09:12 2006 @@ -701,6 +701,8 @@ ProductMakeTop=MakeTop ProductMaintenance=Maintenance ProductManufacturing=Manufacturing +ProductMarketingPackageATP=ATP from Components +ProductMarketingPackageQOH=QOH from Components ProductMarkAsAccepted=Mark as Accepted ProductMaximum=Maximum ProductMaximumPrice=Maximum Price Modified: incubator/ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/product/EditProductInventoryItems.bsh URL: http://svn.apache.org/viewvc/incubator/ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/product/EditProductInventoryItems.bsh?rev=438253&r1=438252&r2=438253&view=diff ============================================================================== --- incubator/ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/product/EditProductInventoryItems.bsh (original) +++ incubator/ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/product/EditProductInventoryItems.bsh Tue Aug 29 15:09:12 2006 @@ -73,20 +73,27 @@ dispatcher = request.getAttribute("dispatcher"); Map contextInput = null; Map resultOutput = null; - // For every warehouse the product's atp and qoh + + // inventory quantity summary by facility: For every warehouse the product's atp and qoh // are obtained (calling the "getInventoryAvailableByFacility" service) while (facilityIterator.hasNext()) { facility = facilityIterator.next(); contextInput = UtilMisc.toMap("productId", productId, "facilityId", facility.getString("facilityId")); - if ("MARKETING_PKG_AUTO".equals(product.getString("productTypeId"))) { - resultOutput = dispatcher.runSync("getMktgPackagesAvailable", contextInput); - } else { - resultOutput = dispatcher.runSync("getInventoryAvailableByFacility", contextInput); - } + resultOutput = dispatcher.runSync("getInventoryAvailableByFacility", contextInput); + quantitySummary = new HashMap(); quantitySummary.put("facilityId", facility.getString("facilityId")); quantitySummary.put("totalQuantityOnHand", resultOutput.get("quantityOnHandTotal")); quantitySummary.put("totalAvailableToPromise", resultOutput.get("availableToPromiseTotal")); + + // if the product is a MARKETING_PKG_AUTO, then also get the quantity which can be produced from components + if ("MARKETING_PKG_AUTO".equals(product.getString("productTypeId"))) { + contextInput = UtilMisc.toMap("productId",productId, "facilityId", facility.getString("facilityId")); + resultOutput = dispatcher.runSync("getMktgPackagesAvailable", contextInput); + quantitySummary.put("mktgPkgQOH", resultOutput.get("quantityOnHandTotal")); + quantitySummary.put("mktgPkgATP", resultOutput.get("availableToPromiseTotal")); + } + quantitySummaryByFacility.put(facility.getString("facilityId"), quantitySummary); } Modified: incubator/ofbiz/trunk/applications/product/webapp/catalog/product/EditProductInventoryItems.ftl URL: http://svn.apache.org/viewvc/incubator/ofbiz/trunk/applications/product/webapp/catalog/product/EditProductInventoryItems.ftl?rev=438253&r1=438252&r2=438253&view=diff ============================================================================== --- incubator/ofbiz/trunk/applications/product/webapp/catalog/product/EditProductInventoryItems.ftl (original) +++ incubator/ofbiz/trunk/applications/product/webapp/catalog/product/EditProductInventoryItems.ftl Tue Aug 29 15:09:12 2006 @@ -25,6 +25,8 @@ <td><div class="tabletext"><b>${uiLabelMap.ProductFacility}</b></div></td> <td><div class="tabletext"><b>${uiLabelMap.ProductAtp}</b></div></td> <td><div class="tabletext"><b>${uiLabelMap.ProductQoh}</b></div></td> + <td><div class="tabletext"><b>${uiLabelMap.ProductMarketingPackageATP}</b></div></td> + <td><div class="tabletext"><b>${uiLabelMap.ProductMarketingPackageQOH}</b></div></td> <td><div class="tabletext"><b>${uiLabelMap.ProductIncomingShipments}</b></div></td> <td><div class="tabletext"><b>${uiLabelMap.ProductIncomingProductionRuns}</b></div></td> <td><div class="tabletext"><b>${uiLabelMap.ProductOutgoingProductionRuns}</b></div></td> @@ -36,6 +38,8 @@ <#assign manufacturingOutQuantitySummary = manufacturingOutQuantitySummaryByFacility.get(facilityId)?if_exists> <#assign totalQuantityOnHand = quantitySummary.totalQuantityOnHand?if_exists> <#assign totalAvailableToPromise = quantitySummary.totalAvailableToPromise?if_exists> + <#assign mktgPkgATP = quantitySummary.mktgPkgATP?if_exists> + <#assign mktgPkgQOH = quantitySummary.mktgPkgQOH?if_exists> <#assign incomingShipmentAndItemList = quantitySummary.incomingShipmentAndItemList?if_exists> <#assign incomingProductionRunList = manufacturingInQuantitySummary.incomingProductionRunList?if_exists> <#assign incomingQuantityTotal = manufacturingInQuantitySummary.estimatedQuantityTotal?if_exists> @@ -46,6 +50,8 @@ <td><div class="tabletext">${(facility.facilityName)?if_exists} [${facilityId?default("[No Facility]")}]</div></td> <td><div class="tabletext"><#if totalAvailableToPromise?exists>${totalAvailableToPromise}<#else> </#if></div></td> <td><div class="tabletext"><#if totalQuantityOnHand?exists>${totalQuantityOnHand}<#else> </#if></div></td> + <td><div class="tabletext"><#if mktgPkgATP?exists>${mktgPkgATP}<#else> </#if></div></td> + <td><div class="tabletext"><#if mktgPkgQOH?exists>${mktgPkgQOH}<#else> </#if></div></td> <td> <#if incomingShipmentAndItemList?has_content> <#list incomingShipmentAndItemList as incomingShipmentAndItem> |
Free forum by Nabble | Edit this page |