You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by ja...@apache.org on 2007/04/20 15:57:29 UTC

svn commit: r530811 - in /ofbiz/trunk/applications: manufacturing/script/org/ofbiz/manufacturing/jobshopmgt/ manufacturing/servicedef/ manufacturing/webapp/manufacturing/jobshopmgt/ product/data/ product/entitydef/

Author: jacopoc
Date: Fri Apr 20 06:57:27 2007
New Revision: 530811

URL: http://svn.apache.org/viewvc?view=rev&rev=530811
Log:
Added reasonEnumId field to the InventoryItemDetail entity to optionally categorize the reasons for the inventory item detail records. Added an example of its usage in the production run management screen.

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/jobshopmgt/ProductionRunForms.xml
    ofbiz/trunk/applications/product/data/ProductTypeData.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=530811&r1=530810&r2=530811
==============================================================================
--- ofbiz/trunk/applications/manufacturing/script/org/ofbiz/manufacturing/jobshopmgt/ProductionRunServices.xml (original)
+++ ofbiz/trunk/applications/manufacturing/script/org/ofbiz/manufacturing/jobshopmgt/ProductionRunServices.xml Fri Apr 20 06:57:27 2007
@@ -126,6 +126,7 @@
                     <calculate field-name="createDetailMap.quantityOnHandDiff" type="Double">
                         <calcop field-name="parameters.quantityNotIssued" operator="negative"/>
                     </calculate>
+                    <set field="createDetailMap.reasonEnumId" from-field="parameters.reasonEnumId"/>
                     <set field="createDetailMap.description" from-field="parameters.description"/>
                     <call-service service-name="createInventoryItemDetail" in-map-name="createDetailMap"/>
                     <clear-field field-name="createDetailMap"/>
@@ -156,6 +157,7 @@
                     <calculate field-name="createDetailMap.quantityOnHandDiff" type="Double">
                         <calcop field-name="parameters.quantityNotIssued" operator="negative"/>
                     </calculate>
+                    <set field="createDetailMap.reasonEnumId" from-field="parameters.reasonEnumId"/>
                     <set field="createDetailMap.description" from-field="parameters.description"/>
                     <call-service service-name="createInventoryItemDetail" in-map-name="createDetailMap"/>
                     <clear-field field-name="createDetailMap"/>
@@ -219,6 +221,7 @@
                         <calculate field-name="createDetailMap.quantityOnHandDiff" type="Double">
                             <calcop field-name="parameters.deductAmount" operator="negative"/>
                         </calculate>
+                        <set field="createDetailMap.reasonEnumId" from-field="parameters.reasonEnumId"/>
                         <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=530811&r1=530810&r2=530811
==============================================================================
--- ofbiz/trunk/applications/manufacturing/servicedef/services_production_run.xml (original)
+++ ofbiz/trunk/applications/manufacturing/servicedef/services_production_run.xml Fri Apr 20 06:57:27 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="reasonEnumId" type="String" mode="IN" optional="true"/>
         <attribute name="description" type="String" mode="IN" optional="true"/>
     </service>
     <service name="issueInventoryItemToWorkEffort" engine="simple"

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=530811&r1=530810&r2=530811
==============================================================================
--- ofbiz/trunk/applications/manufacturing/webapp/manufacturing/jobshopmgt/ProductionRunForms.xml (original)
+++ ofbiz/trunk/applications/manufacturing/webapp/manufacturing/jobshopmgt/ProductionRunForms.xml Fri Apr 20 06:57:27 2007
@@ -619,6 +619,9 @@
         <field name="workEffortId"><hidden/></field>
         <field name="productionRunId"><hidden/></field>
         <field name="quantityOnHandDiff" title="${uiLabelMap.CommonQuantity}"><display/></field>
+        <field name="reasonEnumId">
+            <display-entity entity-name="Enumeration" key-field-name="enumId" description="${description}"/>
+        </field>
         <field name="description"><display/></field>
     </form>
     <form name="IssueProductionRunComponent" type="single" target="issueProductionRunTaskComponent" title="">
@@ -637,6 +640,14 @@
         </field>
         <field name="productId">
             <lookup target-form-name="LookupProduct"/>
+        </field>
+        <field name="reasonEnumId">
+            <drop-down allow-empty="true">
+                <entity-options entity-name="Enumeration" description="${description}">
+                    <entity-constraint name="enumTypeId" value="IID_REASON"/>
+                    <entity-order-by field-name="description"/>
+                </entity-options>
+            </drop-down>
         </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>

Modified: ofbiz/trunk/applications/product/data/ProductTypeData.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/data/ProductTypeData.xml?view=diff&rev=530811&r1=530810&r2=530811
==============================================================================
--- ofbiz/trunk/applications/product/data/ProductTypeData.xml (original)
+++ ofbiz/trunk/applications/product/data/ProductTypeData.xml Fri Apr 20 06:57:27 2007
@@ -73,6 +73,8 @@
     <Enumeration description="Greater Unit Cost" enumCode="GUNIT_COST" enumId="INVRO_GUNIT_COST" sequenceId="05" enumTypeId="INV_RES_ORDER"/>
     <Enumeration description="Less Unit Cost" enumCode="LUNIT_COST" enumId="INVRO_LUNIT_COST" sequenceId="06" enumTypeId="INV_RES_ORDER"/>
 
+    <EnumerationType description="Inventory Item Detail Reason" enumTypeId="IID_REASON" hasTable="N" parentTypeId=""/>
+
     <EnumerationType description="Product Store Payment Service Type" enumTypeId="PRDS_PAYSVC" hasTable="N" parentTypeId=""/>
     <Enumeration description="Payment Authorization Service" enumCode="PAY_AUTH" enumId="PRDS_PAY_AUTH" sequenceId="01" enumTypeId="PRDS_PAYSVC"/>
     <Enumeration description="Payment Auth Verification Service" enumCode="PAY_AUTH_VERIFY" enumId="PRDS_PAY_AUTH_VERIFY" sequenceId="06" enumTypeId="PRDS_PAYSVC"/>

Modified: ofbiz/trunk/applications/product/entitydef/entitymodel.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/entitydef/entitymodel.xml?view=diff&rev=530811&r1=530810&r2=530811
==============================================================================
--- ofbiz/trunk/applications/product/entitydef/entitymodel.xml (original)
+++ ofbiz/trunk/applications/product/entitydef/entitymodel.xml Fri Apr 20 06:57:27 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="reasonEnumId" type="id"></field>
       <field name="description" type="description"></field>
       <prim-key field="inventoryItemId"/>
       <prim-key field="inventoryItemDetailSeqId"/>
@@ -1230,6 +1231,9 @@
       </relation>
       <relation type="one" fk-name="INV_ITDTL_PHINV" rel-entity-name="PhysicalInventory">
         <key-map field-name="physicalInventoryId"/>
+      </relation>
+      <relation title="Reason" fk-name="INV_ITDTL_REAS" rel-entity-name="Enumeration" type="one">
+        <key-map field-name="reasonEnumId" rel-field-name="enumId"/>
       </relation>
       <relation type="one-nofk" rel-entity-name="InventoryItemVariance">
         <key-map field-name="inventoryItemId"/>