OFBIZ-285 - Get shipment phone number from shipment partyIdTo.

git-svn-id: https://svn.apache.org/repos/asf/incubator/ofbiz/trunk@443454 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Si Chen
2006-09-14 20:08:17 +00:00
parent e11e542ae9
commit 2ab6efea5d
@@ -421,7 +421,18 @@ under the License.
<if-not-empty field-name="destTelecomOrderContactMech">
<set from-field="destTelecomOrderContactMech.contactMechId" field="shipment.destinationTelecomNumberId"/>
<else>
<log level="warning" message="Cannot find a shipping destination phone number for ${shipment.primaryOrderId}"/>
<!-- use the first unexpired phone number of the shipment partyIdTo -->
<entity-and entity-name="PartyAndTelecomNumber" list-name="phoneNumbers">
<field-map field-name="partyId" env-name="shipment.partyIdTo"/>
</entity-and>
<filter-list-by-date list-name="phoneNumbers"/>
<first-from-list entry-name="phoneNumber" list-name="phoneNumbers"/>
<if-not-empty field-name="phoneNumber">
<set from-field="phoneNumber.contactMechId" field="shipment.destinationTelecomNumberId"/>
<else>
<log level="warning" message="Cannot find a shipping destination phone number for ${shipment.primaryOrderId}"/>
</else>
</if-not-empty>
</else>
</if-not-empty>
</if-empty>