svn commit: r494138 - in /ofbiz/trunk/applications/product: config/ webapp/facility/WEB-INF/ webapp/facility/WEB-INF/actions/inventory/ webapp/facility/facility/ widget/facility/

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

svn commit: r494138 - in /ofbiz/trunk/applications/product: config/ webapp/facility/WEB-INF/ webapp/facility/WEB-INF/actions/inventory/ webapp/facility/facility/ widget/facility/

sichen
Author: sichen
Date: Mon Jan  8 10:24:13 2007
New Revision: 494138

URL: http://svn.apache.org/viewvc?view=rev&rev=494138
Log:
Screen to do mass physical inventory variance (i.e., on multiple inventory items).

Added:
    ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/inventory/FindFacilityPhysicalInventory.bsh
Modified:
    ofbiz/trunk/applications/product/config/ProductUiLabels.properties
    ofbiz/trunk/applications/product/webapp/facility/WEB-INF/controller.xml
    ofbiz/trunk/applications/product/webapp/facility/facility/FacilityForms.xml
    ofbiz/trunk/applications/product/widget/facility/FacilityScreens.xml
    ofbiz/trunk/applications/product/widget/facility/Menus.xml

Modified: ofbiz/trunk/applications/product/config/ProductUiLabels.properties
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/config/ProductUiLabels.properties?view=diff&rev=494138&r1=494137&r2=494138
==============================================================================
--- ofbiz/trunk/applications/product/config/ProductUiLabels.properties (original)
+++ ofbiz/trunk/applications/product/config/ProductUiLabels.properties Mon Jan  8 10:24:13 2007
@@ -908,6 +908,7 @@
 ProductPersons=persons
 ProductPerUnitPrice=Per Unit Price
 ProductPhoneNumbers=Phone Numbers
+ProductPhysicalInventory=Physical Inventory
 ProductPhysicalInventoryVariance=(This can be changed by doing a physical inventory variance below)
 ProductPhysicalInventoryVariances=Physical Inventory Variances
 ProductPick=Pick

Added: ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/inventory/FindFacilityPhysicalInventory.bsh
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/inventory/FindFacilityPhysicalInventory.bsh?view=auto&rev=494138
==============================================================================
--- ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/inventory/FindFacilityPhysicalInventory.bsh (added)
+++ ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/inventory/FindFacilityPhysicalInventory.bsh Mon Jan  8 10:24:13 2007
@@ -0,0 +1,40 @@
+/*
+ *
+ * Copyright 2001-2006 The Apache Software Foundation
+ *
+ * Licensed 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 org.ofbiz.base.util.*;
+import org.ofbiz.entity.condition.*;
+
+// fields to search by
+productId = parameters.get("productId");
+internalName = parameters.get("internalName");
+
+// build conditions
+conditions = UtilMisc.toList(
+        new EntityExpr("facilityId", EntityOperator.EQUALS, parameters.get("facilityId")),
+        new EntityExpr("inventoryItemTypeId", EntityOperator.EQUALS, "NON_SERIAL_INV_ITEM")
+        );
+if (productId != null && productId.trim().length() != 0) {
+    conditions.add( new EntityExpr("productId", EntityOperator.LIKE, productId.trim() + "%") );
+}
+if (internalName != null && internalName.trim().length() != 0) {
+    conditions.add( new EntityExpr("internalName", true, EntityOperator.LIKE, internalName.trim() + "%", true) );
+}
+
+if (conditions.size() > 2) {
+    physicalInventory = delegator.findByAnd("ProductInventoryItem", conditions, UtilMisc.toList("productId"));
+    context.put("physicalInventory", physicalInventory);
+}

Modified: ofbiz/trunk/applications/product/webapp/facility/WEB-INF/controller.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/webapp/facility/WEB-INF/controller.xml?view=diff&rev=494138&r1=494137&r2=494138
==============================================================================
--- ofbiz/trunk/applications/product/webapp/facility/WEB-INF/controller.xml (original)
+++ ofbiz/trunk/applications/product/webapp/facility/WEB-INF/controller.xml Mon Jan  8 10:24:13 2007
@@ -477,7 +477,19 @@
         <response name="success" type="view" value="EditInventoryItem"/>
         <response name="error" type="view" value="EditInventoryItem"/>
     </request-map>
+    <request-map uri="createPhysicalVariances">
+        <security https="true" auth="true"/>
+        <event type="service-multi" path="" invoke="createPhysicalInventoryAndVariance"/>
+        <response name="success" type="view" value="FindFacilityPhysicalInventory"/>
+        <response name="error" type="view" value="FindFacilityPhysicalInventory"/>
+    </request-map>
 
+    <request-map uri="FindFacilityPhysicalInventory">
+        <security https="true" auth="true"/>
+        <response name="success" type="view" value="FindFacilityPhysicalInventory"/>
+    </request-map>
+
+    
     <!-- ================ Inventory Transfer Requests ================= -->
     <request-map uri="TransferInventoryItem">
         <security https="true" auth="true"/>
@@ -1013,6 +1025,8 @@
     <view-map name="ReceiveInventory" type="screen" page="component://product/widget/facility/FacilityScreens.xml#ReceiveInventory"/>
     <view-map name="ReceiveReturn" type="screen" page="component://product/widget/facility/FacilityScreens.xml#ReceiveReturn"/>
 
+    <view-map name="FindFacilityPhysicalInventory" type="screen" page="component://product/widget/facility/FacilityScreens.xml#FindFacilityPhysicalInventory"/>
+    
     <view-map name="PicklistOptions" type="screen" page="component://product/widget/facility/FacilityScreens.xml#PicklistOptions"/>
     <view-map name="PicklistManage" type="screen" page="component://product/widget/facility/FacilityScreens.xml#PicklistManage"/>
     <view-map name="PickMoveStock" type="screen" page="component://product/widget/facility/FacilityScreens.xml#PickMoveStock"/>

Modified: ofbiz/trunk/applications/product/webapp/facility/facility/FacilityForms.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/webapp/facility/facility/FacilityForms.xml?view=diff&rev=494138&r1=494137&r2=494138
==============================================================================
--- ofbiz/trunk/applications/product/webapp/facility/facility/FacilityForms.xml (original)
+++ ofbiz/trunk/applications/product/webapp/facility/facility/FacilityForms.xml Mon Jan  8 10:24:13 2007
@@ -201,4 +201,43 @@
             <submit/>
         </field>
     </form>
+
+    <form name="FindPhysicalInventory" type="single"
+            target="FindFacilityPhysicalInventory" title=""
+            default-title-style="tableheadtext" default-widget-style="tabletext" default-tooltip-style="tabletext">
+        <field name="facilityId"><hidden/></field>
+        <field name="productId" title="${uiLabelMap.ProductProductId}" widget-style="inputBox">
+            <text/>
+        </field>
+        <field name="internalName" title="${uiLabelMap.ProductInternalName}" widget-style="inputBox">
+            <text/>
+        </field>
+        <field name="submitButton" title="${uiLabelMap.CommonFind}" widget-style="smallSubmit">
+            <submit/>
+        </field>
+    </form>
+    <form name="ListPhysicalInventory" type="multi" list-name="physicalInventory" target="createPhysicalVariances?facilityId=${parameters.facilityId}&amp;productId=${parameters.productId}&amp;internalName=${parameters.internalName}"
+        use-row-submit="true"
+        default-title-style="tableheadtext" default-widget-style="tabletext" default-tooltip-style="tabletext" separate-columns="true">
+        <field name="inventoryItemId" widget-style="buttontext">
+            <hyperlink description="${inventoryItemId}" target="EditInventoryItem?inventoryItemId=${inventoryItemId}"/>
+        </field>
+        <field name="productId" widget-style="buttontext">
+            <hyperlink description="${productId}" target="/catalog/control/EditProductInventoryItems?productId=${productId}" target-type="inter-app"/>
+        </field>
+        <field name="internalName"><display/></field>
+        <field name="availableToPromiseTotal"><display/></field>
+        <field name="quantityOnHandTotal"><display/></field>
+        <field name="varianceReasonId">
+            <drop-down allow-empty="false">
+                <entity-options entity-name="VarianceReason" description="${description}"/>
+            </drop-down>
+        </field>
+        <field name="availableToPromiseVar"><text/></field>
+        <field name="quantityOnHandVar"><text/></field>
+        <field name="_rowSubmit" title="${uiLabelMap.CommonSelect}"><check/></field>
+        <field name="submitButton" title="${uiLabelMap.CommonSubmit}" widget-style="smallSubmit">
+            <submit/>
+        </field>
+    </form>
 </forms>

Modified: ofbiz/trunk/applications/product/widget/facility/FacilityScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/widget/facility/FacilityScreens.xml?view=diff&rev=494138&r1=494137&r2=494138
==============================================================================
--- ofbiz/trunk/applications/product/widget/facility/FacilityScreens.xml (original)
+++ ofbiz/trunk/applications/product/widget/facility/FacilityScreens.xml Mon Jan  8 10:24:13 2007
@@ -496,6 +496,26 @@
             </widgets>
         </section>
     </screen>
+    <screen name="FindFacilityPhysicalInventory">
+        <section>
+            <actions>
+                <set field="titleProperty" value="PageTitleFindFacilityPhysicalInventory"/>
+                <set field="headerItem" value="facility"/>
+                <set field="tabButtonItem" value="FindFacilityPhysicalInventory"/>
+                <script location="component://product/webapp/facility/WEB-INF/actions/inventory/FindFacilityPhysicalInventory.bsh"/>
+
+            </actions>
+            <widgets>
+                <decorator-screen name="CommonFacilityDecorator" location="${parameters.commonFacilityDecoratorLocation}">
+                    <decorator-section name="body">
+                            <include-form name="FindPhysicalInventory" location="component://product/webapp/facility/facility/FacilityForms.xml"/>
+                            <include-form name="ListPhysicalInventory" location="component://product/webapp/facility/facility/FacilityForms.xml"/>
+                    </decorator-section>
+                </decorator-screen>
+            </widgets>
+        </section>
+    </screen>
+
     <screen name="TransferInventoryItem">
         <section>
             <actions>

Modified: ofbiz/trunk/applications/product/widget/facility/Menus.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/widget/facility/Menus.xml?view=diff&rev=494138&r1=494137&r2=494138
==============================================================================
--- ofbiz/trunk/applications/product/widget/facility/Menus.xml (original)
+++ ofbiz/trunk/applications/product/widget/facility/Menus.xml Mon Jan  8 10:24:13 2007
@@ -40,6 +40,9 @@
         <menu-item name="ReceiveInventory" title="${uiLabelMap.ProductInventoryReceive}">
             <link target="ReceiveInventory?facilityId=${facilityId}"/>
         </menu-item>
+        <menu-item name="PhysicalInventory" title="${uiLabelMap.ProductPhysicalInventory}">
+            <link target="FindFacilityPhysicalInventory?facilityId=${facilityId}"/>
+        </menu-item>
         <menu-item name="FindFacilityTransfers" title="${uiLabelMap.ProductInventoryXfers}">
             <link target="FindFacilityTransfers?facilityId=${facilityId}"/>
         </menu-item>
@@ -62,4 +65,4 @@
             <link target="FindShipment?originFacilityId=${facilityId}&amp;lookupFlag=Y"/>
         </menu-item>
     </menu>
-</menus>
\ No newline at end of file
+</menus>