svn commit: r419258 - in /incubator/ofbiz/trunk/applications: manufacturing/script/org/ofbiz/manufacturing/jobshopmgt/ProductionRunServices.xml manufacturing/src/org/ofbiz/manufacturing/jobshopmgt/ProductionRunServices.java order/data/OrderTypeData.xml

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

svn commit: r419258 - in /incubator/ofbiz/trunk/applications: manufacturing/script/org/ofbiz/manufacturing/jobshopmgt/ProductionRunServices.xml manufacturing/src/org/ofbiz/manufacturing/jobshopmgt/ProductionRunServices.java order/data/OrderTypeData.xml

jacopoc
Author: jacopoc
Date: Wed Jul  5 08:39:26 2006
New Revision: 419258

URL: http://svn.apache.org/viewvc?rev=419258&view=rev
Log:
Misc bug fixes for the return marketing package feature.

Modified:
    incubator/ofbiz/trunk/applications/manufacturing/script/org/ofbiz/manufacturing/jobshopmgt/ProductionRunServices.xml
    incubator/ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/jobshopmgt/ProductionRunServices.java
    incubator/ofbiz/trunk/applications/order/data/OrderTypeData.xml

Modified: incubator/ofbiz/trunk/applications/manufacturing/script/org/ofbiz/manufacturing/jobshopmgt/ProductionRunServices.xml
URL: http://svn.apache.org/viewvc/incubator/ofbiz/trunk/applications/manufacturing/script/org/ofbiz/manufacturing/jobshopmgt/ProductionRunServices.xml?rev=419258&r1=419257&r2=419258&view=diff
==============================================================================
--- incubator/ofbiz/trunk/applications/manufacturing/script/org/ofbiz/manufacturing/jobshopmgt/ProductionRunServices.xml (original)
+++ incubator/ofbiz/trunk/applications/manufacturing/script/org/ofbiz/manufacturing/jobshopmgt/ProductionRunServices.xml Wed Jul  5 08:39:26 2006
@@ -253,12 +253,20 @@
                 </and>
             </condition>
             <then>
-                <if-compare-field field-name="parameters.quantity" operator="greater" to-field-name="inventoryItem.quantityOnHandTotal" type="Double">
-                    <set from-field="inventoryItem.quantityOnHandTotal" field="deductAmount"/>
-                <else>
-                    <set from-field="parameters.quantity" field="deductAmount"/>
-                </else>
-                </if-compare-field>
+                <if>
+                    <condition>
+                        <or>
+                            <if-empty field-name="parameters.quantity"/>
+                            <if-compare field-name="parameters.quantity" operator="greater" to-field-name="inventoryItem.quantityOnHandTotal" type="Double"/>
+                        </or>
+                    </condition>
+                    <then>
+                        <set from-field="inventoryItem.quantityOnHandTotal" field="deductAmount"/>
+                    </then>
+                    <else>
+                        <set from-field="parameters.quantity" field="deductAmount"/>
+                    </else>
+                </if>
 
                 <!-- create WorkEffortInventoryAssign record -->
                 <set from-field="parameters.workEffortId" field="issuanceCreateMap.workEffortId"/>

Modified: incubator/ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/jobshopmgt/ProductionRunServices.java
URL: http://svn.apache.org/viewvc/incubator/ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/jobshopmgt/ProductionRunServices.java?rev=419258&r1=419257&r2=419258&view=diff
==============================================================================
--- incubator/ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/jobshopmgt/ProductionRunServices.java (original)
+++ incubator/ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/jobshopmgt/ProductionRunServices.java Wed Jul  5 08:39:26 2006
@@ -2277,7 +2277,7 @@
                 serviceContext.put("quantity", quantity);
             }
             resultService = dispatcher.runSync("issueInventoryItemToWorkEffort", serviceContext);
-            Double issuedQuantity = (Double)resultService.get("issuedQuantity");
+            Double issuedQuantity = (Double)resultService.get("quantityIssued");
             // TODO: get the package's unit cost
             serviceContext.clear();
             serviceContext = UtilMisc.toMap("productId", inventoryItem.getString("productId"),

Modified: incubator/ofbiz/trunk/applications/order/data/OrderTypeData.xml
URL: http://svn.apache.org/viewvc/incubator/ofbiz/trunk/applications/order/data/OrderTypeData.xml?rev=419258&r1=419257&r2=419258&view=diff
==============================================================================
--- incubator/ofbiz/trunk/applications/order/data/OrderTypeData.xml (original)
+++ incubator/ofbiz/trunk/applications/order/data/OrderTypeData.xml Wed Jul  5 08:39:26 2006
@@ -204,6 +204,7 @@
 
     <!-- maps order item types and order adjustment types to return item types and return adjustment types -->
     <ReturnItemTypeMap returnHeaderTypeId="CUSTOMER_RETURN" returnItemMapKey="FINISHED_GOOD" returnItemTypeId="RET_FPROD_ITEM"/>
+    <ReturnItemTypeMap returnHeaderTypeId="MARKETING_PKG_AUTO" returnItemMapKey="FINISHED_GOOD" returnItemTypeId="RET_FPROD_ITEM"/>
     <ReturnItemTypeMap returnHeaderTypeId="CUSTOMER_RETURN" returnItemMapKey="DIGITAL_GOOD" returnItemTypeId="RET_DPROD_ITEM"/>
     <ReturnItemTypeMap returnHeaderTypeId="CUSTOMER_RETURN" returnItemMapKey="FINDIG_GOOD" returnItemTypeId="RET_FDPROD_ITEM"/>
     <ReturnItemTypeMap returnHeaderTypeId="CUSTOMER_RETURN" returnItemMapKey="PROMOTION_ADJUSTMENT" returnItemTypeId="RET_PROMOTION_ADJ"/>