svn commit: r660846 - in /ofbiz/trunk/applications/manufacturing: src/org/ofbiz/manufacturing/jobshopmgt/ webapp/manufacturing/WEB-INF/actions/jobshopmgt/ webapp/manufacturing/jobshopmgt/

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

svn commit: r660846 - in /ofbiz/trunk/applications/manufacturing: src/org/ofbiz/manufacturing/jobshopmgt/ webapp/manufacturing/WEB-INF/actions/jobshopmgt/ webapp/manufacturing/jobshopmgt/

jacopoc
Author: jacopoc
Date: Wed May 28 00:46:40 2008
New Revision: 660846

URL: http://svn.apache.org/viewvc?rev=660846&view=rev
Log:
Added partial support for lot id in production runs.

Modified:
    ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/jobshopmgt/ProductionRunEvents.java
    ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/jobshopmgt/ProductionRunDeclaration.bsh
    ofbiz/trunk/applications/manufacturing/webapp/manufacturing/jobshopmgt/ProductionRunForms.xml

Modified: ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/jobshopmgt/ProductionRunEvents.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/jobshopmgt/ProductionRunEvents.java?rev=660846&r1=660845&r2=660846&view=diff
==============================================================================
--- ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/jobshopmgt/ProductionRunEvents.java (original)
+++ ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/jobshopmgt/ProductionRunEvents.java Wed May 28 00:46:40 2008
@@ -87,6 +87,7 @@
             Map inputMap = UtilMisc.toMap("workEffortId", parameters.get("workEffortId"), "inventoryItemTypeId", parameters.get("inventoryItemTypeId"));
             inputMap.put("componentsLocationMap", componentsLocationMap);
             inputMap.put("quantity", quantity);
+            inputMap.put("lotId", parameters.get("lotId"));
             inputMap.put("userLogin", userLogin);
             Map result = dispatcher.runSync("productionRunDeclareAndProduce", inputMap);
         } catch (GenericServiceException e) {

Modified: ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/jobshopmgt/ProductionRunDeclaration.bsh
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/jobshopmgt/ProductionRunDeclaration.bsh?rev=660846&r1=660845&r2=660846&view=diff
==============================================================================
--- ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/jobshopmgt/ProductionRunDeclaration.bsh (original)
+++ ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/jobshopmgt/ProductionRunDeclaration.bsh Wed May 28 00:46:40 2008
@@ -70,6 +70,11 @@
         // Find the inventory items produced
         List inventoryItems = delegator.findByAnd("WorkEffortInventoryProduced", UtilMisc.toMap("workEffortId", productionRunId));
         context.put("inventoryItems", inventoryItems);
+        if (UtilValidate.isNotEmpty(inventoryItems)) {
+            GenericValue lastWorkEffortInventoryProduced = (GenericValue)inventoryItems.get(inventoryItems.size() - 1);
+            GenericValue lastInventoryItem = lastWorkEffortInventoryProduced.getRelatedOne("InventoryItem");
+            context.put("lastLotId", lastInventoryItem.getString("lotId"));
+        }
 
         // Find if the production run can produce inventory.
         Double quantityProduced = productionRun.getGenericValue().getDouble("quantityProduced");

Modified: ofbiz/trunk/applications/manufacturing/webapp/manufacturing/jobshopmgt/ProductionRunForms.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/manufacturing/webapp/manufacturing/jobshopmgt/ProductionRunForms.xml?rev=660846&r1=660845&r2=660846&view=diff
==============================================================================
--- ofbiz/trunk/applications/manufacturing/webapp/manufacturing/jobshopmgt/ProductionRunForms.xml (original)
+++ ofbiz/trunk/applications/manufacturing/webapp/manufacturing/jobshopmgt/ProductionRunForms.xml Wed May 28 00:46:40 2008
@@ -130,6 +130,7 @@
         <field name="inventoryItemId" widget-style="buttontext">
             <hyperlink target="/facility/control/EditInventoryItem?inventoryItemId=${inventoryItemId}" description="${inventoryItemId}" also-hidden="false" target-type="inter-app"/>
         </field>
+        <field name="lotId" entry-name="inventoryItemId"><display-entity entity-name="InventoryItem" key-field-name="inventoryItemId" description="${lotId} "/></field>
         <field name="creationDate" entry-name="inventoryItemId"><display-entity entity-name="InventoryItem" key-field-name="inventoryItemId" description="${datetimeReceived}"/></field>
     </form>
     
@@ -249,6 +250,7 @@
                 <entity-options entity-name="InventoryItemType" description="${description}"/>
             </drop-down>
         </field>
+        <field name="lotId"><text default-value="${lastLotId}"/></field>
         <field name="submitButton" title="${uiLabelMap.CommonAdd}">
             <submit button-type="button"/>
         </field>
@@ -262,6 +264,7 @@
                 <entity-options entity-name="InventoryItemType" description="${description}"/>
             </drop-down>
         </field>
+        <field name="lotId"><text default-value="${lastLotId}"/></field>
     </form>
     <form name="ProductionRunDeclareAndProduceBottom" skip-start="true" type="multi" title="" list-name="productionRunComponentsDataReadyForIssuance"
         odd-row-style="alternate-row" default-table-style="basic-table hover-bar">