svn commit: r1799767 - /ofbiz/ofbiz-framework/trunk/applications/product/minilang/shipment/shipment/ShipmentServices.xml

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

svn commit: r1799767 - /ofbiz/ofbiz-framework/trunk/applications/product/minilang/shipment/shipment/ShipmentServices.xml

jleroux@apache.org
Author: jleroux
Date: Sat Jun 24 12:00:25 2017
New Revision: 1799767

URL: http://svn.apache.org/viewvc?rev=1799767&view=rev
Log:
Fixed: CreateShipment code logic error
(OFBIZ-9425)

Service createShipment can create both sales and purchase shipment with
workeffort.
For sales shipment it creates SHIPMENT_OUTBOUND type work effort
For purchase shipment it creates SHIPMENT_INBOUND type work effort.

The maps used are shipWorkEffortMap to create outbound work effort and
arrivalWorkEffortMap to create inbound shipment.

Which work effort will be created decided by the condition whether parameters.
estimatedShipDate is coming or parameters.estimatedArrivalDate is coming.

With existing logic the workEffort.workEffortTypeId, workEffort.currentStatusId
and workEffort.workEffortPurposeTypeId is not persist into db as values set
into the wrong map.


Thanks: Wai for report and patch, Rishi Solanki for clear explanation

Modified:
    ofbiz/ofbiz-framework/trunk/applications/product/minilang/shipment/shipment/ShipmentServices.xml

Modified: ofbiz/ofbiz-framework/trunk/applications/product/minilang/shipment/shipment/ShipmentServices.xml
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/applications/product/minilang/shipment/shipment/ShipmentServices.xml?rev=1799767&r1=1799766&r2=1799767&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/applications/product/minilang/shipment/shipment/ShipmentServices.xml (original)
+++ ofbiz/ofbiz-framework/trunk/applications/product/minilang/shipment/shipment/ShipmentServices.xml Sat Jun 24 12:00:25 2017
@@ -81,10 +81,10 @@ under the License.
                         <if-compare field="shipmentTypeId" operator="equals" value="SALES_RETURN"/>
                     </or>
                 </condition>
-                <then><set field="shipWorkEffortMap.workEffortTypeId" value="SHIPMENT_INBOUND"/></then>
+                <then><set field="arrivalWorkEffortMap.workEffortTypeId" value="SHIPMENT_INBOUND"/></then>
             </if>
-            <set value="CAL_TENTATIVE" field="shipWorkEffortMap.currentStatusId"/>
-            <set value="WEPT_WAREHOUSING" field="shipWorkEffortMap.workEffortPurposeTypeId"/>
+            <set value="CAL_TENTATIVE" field="arrivalWorkEffortMap.currentStatusId"/>
+            <set value="WEPT_WAREHOUSING" field="arrivalWorkEffortMap.workEffortPurposeTypeId"/>
             <set from-field="parameters.estimatedArrivalDate" field="arrivalWorkEffortMap.estimatedStartDate"/>
             <set from-field="parameters.estimatedArrivalDate" field="arrivalWorkEffortMap.estimatedCompletionDate"/>
             <set from-field="parameters.destinationFacilityId" field="arrivalWorkEffortMap.facilityId"/>