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 2010/02/25 16:11:02 UTC
svn commit: r916313 -
/ofbiz/trunk/applications/product/script/org/ofbiz/shipment/shipment/ShipmentServices.xml
Author: jacopoc
Date: Thu Feb 25 15:11:02 2010
New Revision: 916313
URL: http://svn.apache.org/viewvc?rev=916313&view=rev
Log:
Misc enhancements to the way the calendar events associated to shipments are automatically updated when a shipment is updated.
Modified:
ofbiz/trunk/applications/product/script/org/ofbiz/shipment/shipment/ShipmentServices.xml
Modified: ofbiz/trunk/applications/product/script/org/ofbiz/shipment/shipment/ShipmentServices.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/script/org/ofbiz/shipment/shipment/ShipmentServices.xml?rev=916313&r1=916312&r2=916313&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/script/org/ofbiz/shipment/shipment/ShipmentServices.xml (original)
+++ ofbiz/trunk/applications/product/script/org/ofbiz/shipment/shipment/ShipmentServices.xml Thu Feb 25 15:11:02 2010
@@ -49,7 +49,7 @@
estimatedArrivalDate: estimatedArrivalWorkEffId
-->
<if-not-empty field="parameters.estimatedShipDate">
- <set value="Shipment #${newEntity.shipmentId} Ship" field="shipWorkEffortMap.workEffortName"/>
+ <set value="Shipment #${newEntity.shipmentId} ${newEntity.primaryOrderId} Ship" field="shipWorkEffortMap.workEffortName"/>
<set value="EVENT" field="shipWorkEffortMap.workEffortTypeId"/>
<set value="CAL_TENTATIVE" field="shipWorkEffortMap.currentStatusId"/>
<set from-field="parameters.estimatedShipDate" field="shipWorkEffortMap.estimatedStartDate"/>
@@ -68,7 +68,7 @@
</if-not-empty>
</if-not-empty>
<if-not-empty field="parameters.estimatedArrivalDate">
- <set value="Shipment #${newEntity.shipmentId} Arrival" field="arrivalWorkEffortMap.workEffortName"/>
+ <set value="Shipment #${newEntity.shipmentId} ${newEntity.primaryOrderId} Arrival" field="arrivalWorkEffortMap.workEffortName"/>
<set value="EVENT" field="arrivalWorkEffortMap.workEffortTypeId"/>
<set value="CAL_TENTATIVE" field="arrivalWorkEffortMap.currentStatusId"/>
<set from-field="parameters.estimatedArrivalDate" field="arrivalWorkEffortMap.estimatedStartDate"/>
@@ -163,6 +163,15 @@
<not><if-empty field="parameters.originFacilityId"/></not>
<if-compare-field field="parameters.originFacilityId" to-field="lookedUpValue.originFacilityId" operator="not-equals"/>
</and>
+ <and>
+ <not><if-empty field="parameters.statusId"/></not>
+ <if-compare-field field="parameters.statusId" to-field="lookedUpValue.statusId" operator="not-equals"/>
+ <or>
+ <if-compare field="parameters.statusId" value="SHIPMENT_CANCELLED" operator="equals"/>
+ <if-compare field="parameters.statusId" value="SHIPMENT_PACKED" operator="equals"/>
+ <if-compare field="parameters.statusId" value="SHIPMENT_SHIPPED" operator="equals"/>
+ </or>
+ </and>
</or>
</condition>
<then>
@@ -173,6 +182,25 @@
<set from-field="parameters.estimatedShipDate" field="estShipWe.estimatedStartDate"/>
<set from-field="parameters.estimatedShipDate" field="estShipWe.estimatedCompletionDate"/>
<set from-field="parameters.originFacilityId" field="estShipWe.facilityId"/>
+ <if>
+ <condition>
+ <and>
+ <not><if-empty field="parameters.statusId"/></not>
+ <if-compare-field field="parameters.statusId" to-field="lookedUpValue.statusId" operator="not-equals"/>
+ </and>
+ </condition>
+ <then>
+ <if-compare field="parameters.statusId" value="SHIPMENT_CANCELLED" operator="equals">
+ <set value="CAL_CANCELLED" field="estShipWe.currentStatusId"/>
+ </if-compare>
+ <if-compare field="parameters.statusId" value="SHIPMENT_PACKED" operator="equals">
+ <set value="CAL_CONFIRMED" field="estShipWe.currentStatusId"/>
+ </if-compare>
+ <if-compare field="parameters.statusId" value="SHIPMENT_SHIPPED" operator="equals">
+ <set value="CAL_COMPLETED" field="estShipWe.currentStatusId"/>
+ </if-compare>
+ </then>
+ </if>
<set-service-fields service-name="updateWorkEffort" map="estShipWe" to-map="estShipWeUpdMap"/>
<call-service service-name="updateWorkEffort" in-map-name="estShipWeUpdMap"/>
</if-not-empty>