svn commit: r450960 - in /incubator/ofbiz/trunk/applications/product/webapp/facility: WEB-INF/actions/facility/EditFacilityInventoryItems.bsh facility/FacilityForms.xml

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

svn commit: r450960 - in /incubator/ofbiz/trunk/applications/product/webapp/facility: WEB-INF/actions/facility/EditFacilityInventoryItems.bsh facility/FacilityForms.xml

sichen
Author: sichen
Date: Thu Sep 28 11:27:20 2006
New Revision: 450960

URL: http://svn.apache.org/viewvc?view=rev&rev=450960
Log:
Add ability to look up inventory items by productId in facility manager and link the facility view inventory by product report to it

Modified:
    incubator/ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/facility/EditFacilityInventoryItems.bsh
    incubator/ofbiz/trunk/applications/product/webapp/facility/facility/FacilityForms.xml

Modified: incubator/ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/facility/EditFacilityInventoryItems.bsh
URL: http://svn.apache.org/viewvc/incubator/ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/facility/EditFacilityInventoryItems.bsh?view=diff&rev=450960&r1=450959&r2=450960
==============================================================================
--- incubator/ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/facility/EditFacilityInventoryItems.bsh (original)
+++ incubator/ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/facility/EditFacilityInventoryItems.bsh Thu Sep 28 11:27:20 2006
@@ -24,13 +24,20 @@
 delegator = request.getAttribute("delegator");
 
 String facilityId = request.getParameter("facilityId");
+String productId = request.getParameter("productId");
+
 if (facilityId != null) context.put("facilityId", facilityId);
 
 GenericValue facility = delegator.findByPrimaryKey("Facility", UtilMisc.toMap("facilityId", facilityId));
 if (facility != null) context.put("facility", facility);
 
+findParams = UtilMisc.toMap("facilityId", facilityId);
+if (!UtilValidate.isEmpty(productId)) {
+    findParams.put("productId", productId);
+}
+
 Collection facilityInventoryItems = delegator.findByAnd("InventoryItem",
-        UtilMisc.toMap("facilityId", facilityId),
+        findParams,
         UtilMisc.toList("statusId", "quantityOnHandTotal", "serialNumber"));
 if (facilityInventoryItems != null) context.put("facilityInventoryItems", facilityInventoryItems);
 

Modified: incubator/ofbiz/trunk/applications/product/webapp/facility/facility/FacilityForms.xml
URL: http://svn.apache.org/viewvc/incubator/ofbiz/trunk/applications/product/webapp/facility/facility/FacilityForms.xml?view=diff&rev=450960&r1=450959&r2=450960
==============================================================================
--- incubator/ofbiz/trunk/applications/product/webapp/facility/facility/FacilityForms.xml (original)
+++ incubator/ofbiz/trunk/applications/product/webapp/facility/facility/FacilityForms.xml Thu Sep 28 11:27:20 2006
@@ -67,20 +67,22 @@
     <form name="ListFacilityInventoryByProduct" type="list"
             target="" title="" list-name="inventoryByProduct" paginate-target="ViewFacilityInventoryByProduct"
             default-title-style="tableheadtext" default-widget-style="tabletext" default-tooltip-style="tabletext">
-        <field name="editLink" title="${uiLabelMap.ProductProductId}" widget-style="buttontext">
-            <hyperlink target="/catalog/control/EditProduct?productId=${productId}" target-type="inter-app" description="${productId}" />
+        <field name="items" widget-style="buttontext">
+            <hyperlink target="EditFacilityInventoryItems?productId=${productId}&amp;facilityId=${facilityId}" description="${productId}" link-style="buttontext"/>    
         </field>
-        <field name="productId" title="${uiLabelMap.CommonDescription}" title-area-style="tableheadwide">
-            <display-entity entity-name="Product" description="${internalName}"/>
+        <field name="productId" title="${uiLabelMap.CommonDescription}" widget-area-style="tabletext">
+            <display-entity entity-name="Product" description="${internalName}">
+                <sub-hyperlink target="/catalog/control/EditProduct?productId=${productId}" target-type="inter-app" description="${uiLabelMap.ProductCatalog}" link-style="buttontext"/>
+            </display-entity>
         </field>
+        <field name="totalAvailableToPromise" title="${uiLabelMap.CommonTotal} ${uiLabelMap.ProductAtp}" widget-area-style="tabletextright"><display/></field>
+        <field name="totalQuantityOnHand" title="${uiLabelMap.CommonTotal} ${uiLabelMap.ProductQoh}" widget-area-style="tabletextright"><display/></field>
+        <field name="quantityOnOrder" title="${uiLabelMap.ProductOrderedQuantity}"  widget-area-style="tabletextright"><display/></field>
         <field name="minimumStock" title="${uiLabelMap.ProductMinimumStock}" widget-area-style="tabletextright"><display/></field>
         <field name="reorderQuantity" title="${uiLabelMap.ProductReorderQuantity}" widget-area-style="tabletextright"><display/></field>
         <field name="daysToShip" title="${uiLabelMap.ProductDaysToShip}" widget-area-style="tabletextright"><display/></field>
-        <field name="totalAvailableToPromise" title="${uiLabelMap.CommonTotal} ${uiLabelMap.ProductAtp}" widget-area-style="tabletextright"><display/></field>
-        <field name="totalQuantityOnHand" title="${uiLabelMap.CommonTotal} ${uiLabelMap.ProductQoh}" widget-area-style="tabletextright"><display/></field>
         <field name="offsetQOHQtyAvailable" title="${uiLabelMap.ProductQtyOffsetQOH}" widget-area-style="tabletextright"><display/></field>
         <field name="offsetATPQtyAvailable" title="${uiLabelMap.ProductQtyOffsetATP}" widget-area-style="tabletextright"><display/></field>
-        <field name="quantityOnOrder" title="${uiLabelMap.ProductOrderedQuantity}"  widget-area-style="tabletextright"><display/></field>
     </form>
 
     <form name="SearchInventoryItemsParams" type="single" target="SearchInventoryItems"