svn commit: r438287 - in /incubator/ofbiz/trunk/applications/order/webapp/ordermgr: WEB-INF/actions/entry/showcart.bsh entry/cart/showcartitems.ftl

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

svn commit: r438287 - in /incubator/ofbiz/trunk/applications/order/webapp/ordermgr: WEB-INF/actions/entry/showcart.bsh entry/cart/showcartitems.ftl

sichen
Author: sichen
Date: Tue Aug 29 16:19:23 2006
New Revision: 438287

URL: http://svn.apache.org/viewvc?rev=438287&view=rev
Log:
Show marketing package atp/qoh from components during order entry if the product is a marketing package

Modified:
    incubator/ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/entry/showcart.bsh
    incubator/ofbiz/trunk/applications/order/webapp/ordermgr/entry/cart/showcartitems.ftl

Modified: incubator/ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/entry/showcart.bsh
URL: http://svn.apache.org/viewvc/incubator/ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/entry/showcart.bsh?rev=438287&r1=438286&r2=438287&view=diff
==============================================================================
--- incubator/ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/entry/showcart.bsh (original)
+++ incubator/ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/entry/showcart.bsh Tue Aug 29 16:19:23 2006
@@ -81,6 +81,9 @@
 inventorySummary = dispatcher.runSync("getProductInventorySummaryForItems", UtilMisc.toMap("orderItems", shoppingCart.makeOrderItems()));
 context.put("availableToPromiseMap", inventorySummary.get("availableToPromiseMap"));
 context.put("quantityOnHandMap", inventorySummary.get("quantityOnHandMap"));
+context.put("mktgPkgATPMap", inventorySummary.get("mktgPkgATPMap"));
+context.put("mktgPkgQOHMap", inventorySummary.get("mktgPkgQOHMap"));
+
 
 // get purchase order item types
 purchaseOrderItemTypeList = delegator.findByAndCache("OrderItemType", UtilMisc.toMap("parentTypeId", "PURCHASE_SPECIFIC"));

Modified: incubator/ofbiz/trunk/applications/order/webapp/ordermgr/entry/cart/showcartitems.ftl
URL: http://svn.apache.org/viewvc/incubator/ofbiz/trunk/applications/order/webapp/ordermgr/entry/cart/showcartitems.ftl?rev=438287&r1=438286&r2=438287&view=diff
==============================================================================
--- incubator/ofbiz/trunk/applications/order/webapp/ordermgr/entry/cart/showcartitems.ftl (original)
+++ incubator/ofbiz/trunk/applications/order/webapp/ordermgr/entry/cart/showcartitems.ftl Tue Aug 29 16:19:23 2006
@@ -85,7 +85,7 @@
                     <#-- this is a non-product item -->
                     <b>${cartLine.getItemTypeDescription()?if_exists}</b> : ${cartLine.getName()?if_exists}
                   </#if>
-                    <#-- display the item''s features -->
+                    <#-- display the item's features -->
                    <#assign features = "">
                    <#if cartLine.getFeaturesForSupplier(dispatcher,shoppingCart.getPartyId())?has_content>
                        <#assign features = cartLine.getFeaturesForSupplier(dispatcher, shoppingCart.getPartyId())>
@@ -132,11 +132,16 @@
             </#if>
             <#-- inventory summary -->
             <#if cartLine.getProductId()?exists>
+              <#assign productId = cartLine.getProductId()>
+              <#assign product = cartLine.getProduct()>
               <tr>
                 <td colspan="2" align="left">
                   <div class="tabletext">
-                    <a href="/catalog/control/EditProductInventoryItems?productId=${cartLine.getProductId()}"><b>${uiLabelMap.ProductInventory}</b></a>:
-                    ATP = ${availableToPromiseMap.get(cartLine.getProductId())}, QOH = ${quantityOnHandMap.get(cartLine.getProductId())}
+                    <a href="/catalog/control/EditProductInventoryItems?productId=${productId}" class="buttontext"><b>${uiLabelMap.ProductInventory}</b></a>:
+                    ${uiLabelMap.ProductAtp} = ${availableToPromiseMap.get(productId)}, ${uiLabelMap.ProductQoh} = ${quantityOnHandMap.get(productId)}
+                    <#if product.productTypeId == "MARKETING_PKG_AUTO">
+                    ${uiLabelMap.ProductMarketingPackageATP} = ${mktgPkgATPMap.get(productId)}, ${uiLabelMap.ProductMarketingPackageQOH} = ${mktgPkgQOHMap.get(productId)}
+                    </#if>
                   </div>
                 </td>
               </tr>