svn commit: r529589 - in /ofbiz/trunk/applications: manufacturing/script/org/ofbiz/manufacturing/jobshopmgt/ manufacturing/servicedef/ manufacturing/webapp/manufacturing/WEB-INF/actions/jobshopmgt/ manufacturing/webapp/manufacturing/jobshopmgt/ product...

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

svn commit: r529589 - in /ofbiz/trunk/applications: manufacturing/script/org/ofbiz/manufacturing/jobshopmgt/ manufacturing/servicedef/ manufacturing/webapp/manufacturing/WEB-INF/actions/jobshopmgt/ manufacturing/webapp/manufacturing/jobshopmgt/ product...

jacopoc
Author: jacopoc
Date: Tue Apr 17 06:05:44 2007
New Revision: 529589

URL: http://svn.apache.org/viewvc?view=rev&rev=529589
Log:
Added 'description' field to the InventoryItemDetail entity; the field can be used to further describe the detail record (such as the reason for an issuance).
Implemented code and artifacts to populate this new field when production run issuances are done.

Modified:
    ofbiz/trunk/applications/manufacturing/script/org/ofbiz/manufacturing/jobshopmgt/ProductionRunServices.xml
    ofbiz/trunk/applications/manufacturing/servicedef/services_production_run.xml
    ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/jobshopmgt/ProductionRunDeclaration.bsh
    ofbiz/trunk/applications/manufacturing/webapp/manufacturing/jobshopmgt/ProductionRunForms.xml
    ofbiz/trunk/applications/product/entitydef/entitymodel.xml

Modified: ofbiz/trunk/applications/manufacturing/script/org/ofbiz/manufacturing/jobshopmgt/ProductionRunServices.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/manufacturing/script/org/ofbiz/manufacturing/jobshopmgt/ProductionRunServices.xml?view=diff&rev=529589&r1=529588&r2=529589
==============================================================================
--- ofbiz/trunk/applications/manufacturing/script/org/ofbiz/manufacturing/jobshopmgt/ProductionRunServices.xml (original)
+++ ofbiz/trunk/applications/manufacturing/script/org/ofbiz/manufacturing/jobshopmgt/ProductionRunServices.xml Tue Apr 17 06:05:44 2007
@@ -40,6 +40,7 @@
                         <set from-field="workEffort" field="callSvcMap.workEffort"/>
                         <set from-field="component" field="callSvcMap.workEffortGoodStandard"/>
                         <set from-field="reserveOrderEnumId" field="callSvcMap.reserveOrderEnumId"/>
+                        <set field="callSvcMap.description" value="BOM Part"/>
                         <call-service service-name="issueProductionRunTaskComponent" in-map-name="callSvcMap"/>
 
                         <set value="WEGS_COMPLETED" field="component.statusId"/>
@@ -125,8 +126,8 @@
                     <calculate field-name="createDetailMap.quantityOnHandDiff" type="Double">
                         <calcop field-name="parameters.quantityNotIssued" operator="negative"/>
                     </calculate>
+                    <set field="createDetailMap.description" from-field="parameters.description"/>
                     <call-service service-name="createInventoryItemDetail" in-map-name="createDetailMap"/>
-
                     <clear-field field-name="createDetailMap"/>
                 <else>
                     <!-- no non-ser inv item, create a non-ser InventoryItem with availableToPromise = -quantityNotIssued -->
@@ -155,8 +156,8 @@
                     <calculate field-name="createDetailMap.quantityOnHandDiff" type="Double">
                         <calcop field-name="parameters.quantityNotIssued" operator="negative"/>
                     </calculate>
+                    <set field="createDetailMap.description" from-field="parameters.description"/>
                     <call-service service-name="createInventoryItemDetail" in-map-name="createDetailMap"/>
-
                     <clear-field field-name="createDetailMap"/>
                 </else>
                 </if-not-empty>
@@ -218,6 +219,7 @@
                         <calculate field-name="createDetailMap.quantityOnHandDiff" type="Double">
                             <calcop field-name="parameters.deductAmount" operator="negative"/>
                         </calculate>
+                        <set field="createDetailMap.description" from-field="parameters.description"/>
                         <call-service service-name="createInventoryItemDetail" in-map-name="createDetailMap"/>
                         <clear-field field-name="createDetailMap"/>
                         

Modified: ofbiz/trunk/applications/manufacturing/servicedef/services_production_run.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/manufacturing/servicedef/services_production_run.xml?view=diff&rev=529589&r1=529588&r2=529589
==============================================================================
--- ofbiz/trunk/applications/manufacturing/servicedef/services_production_run.xml (original)
+++ ofbiz/trunk/applications/manufacturing/servicedef/services_production_run.xml Tue Apr 17 06:05:44 2007
@@ -150,6 +150,7 @@
         <attribute name="workEffort" type="GenericValue" mode="IN" optional="true"/>
         <attribute name="workEffortGoodStandard" type="GenericValue" mode="IN" optional="true"/>
         <attribute name="reserveOrderEnumId" type="String" mode="IN" optional="true"/>
+        <attribute name="description" type="String" mode="IN" optional="true"/>
     </service>
     <service name="issueInventoryItemToWorkEffort" engine="simple"
                 location="org/ofbiz/manufacturing/jobshopmgt/ProductionRunServices.xml" invoke="issueInventoryItemToWorkEffort" auth="false">

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?view=diff&rev=529589&r1=529588&r2=529589
==============================================================================
--- 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 Tue Apr 17 06:05:44 2007
@@ -163,8 +163,8 @@
             GenericValue task = (GenericValue)tasksIt.next();
             if (task.getString("currentStatusId").equals("PRUN_RUNNING")) {
                 List components = delegator.findByAnd("WorkEffortGoodStandard", UtilMisc.toMap("workEffortId", task.getString("workEffortId"), "workEffortGoodStdTypeId", "PRUNT_PROD_NEEDED"));
-                List issuances = delegator.findByAnd("WorkEffortInventoryAssign", UtilMisc.toMap("workEffortId", task.getString("workEffortId")));
-                if (components.size() > 0 && issuances.size() == 0) {
+                List notIssued = EntityUtil.filterByAnd(components, UtilMisc.toMap("statusId", "WEGS_CREATED"));
+                if (components.size() > 0 && notIssued.size() > 0) {
                     issueTaskId = task.getString("workEffortId");
                 }
                 if (issueTaskId == null) {

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?view=diff&rev=529589&r1=529588&r2=529589
==============================================================================
--- ofbiz/trunk/applications/manufacturing/webapp/manufacturing/jobshopmgt/ProductionRunForms.xml (original)
+++ ofbiz/trunk/applications/manufacturing/webapp/manufacturing/jobshopmgt/ProductionRunForms.xml Tue Apr 17 06:05:44 2007
@@ -619,6 +619,7 @@
         <field name="workEffortId"><hidden/></field>
         <field name="productionRunId"><hidden/></field>
         <field name="quantityOnHandDiff" title="${uiLabelMap.CommonQuantity}"><display/></field>
+        <field name="description"><display/></field>
     </form>
     <form name="IssueProductionRunComponent" type="single" target="issueProductionRunTaskComponent" title="">
         <auto-fields-service service-name="issueProductionRunTaskComponent"/>
@@ -637,6 +638,7 @@
         <field name="productId">
             <lookup target-form-name="LookupProduct"/>
         </field>
+        <field name="description"><text default-value="Replace Defective Part"/></field>
         <field name="submitButton" title="${uiLabelMap.CommonAdd}" widget-style="smallSubmit"><submit button-type="button"/></field>
     </form>
 </forms>

Modified: ofbiz/trunk/applications/product/entitydef/entitymodel.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/entitydef/entitymodel.xml?view=diff&rev=529589&r1=529588&r2=529589
==============================================================================
--- ofbiz/trunk/applications/product/entitydef/entitymodel.xml (original)
+++ ofbiz/trunk/applications/product/entitydef/entitymodel.xml Tue Apr 17 06:05:44 2007
@@ -1195,6 +1195,7 @@
       <field name="itemIssuanceId" type="id"></field>
       <field name="receiptId" type="id"></field>
       <field name="physicalInventoryId" type="id"></field>
+      <field name="description" type="description"></field>
       <prim-key field="inventoryItemId"/>
       <prim-key field="inventoryItemDetailSeqId"/>
       <relation type="one" fk-name="INV_ITDTL_INVIT" rel-entity-name="InventoryItem">