Author: hansbak
Date: Mon May 25 04:58:14 2009
New Revision: 778278
URL:
http://svn.apache.org/viewvc?rev=778278&view=revLog:
corrected error in getting email from party
Modified:
ofbiz/trunk/applications/party/script/org/ofbiz/party/party/PartyServices.xml
Modified: ofbiz/trunk/applications/party/script/org/ofbiz/party/party/PartyServices.xml
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/script/org/ofbiz/party/party/PartyServices.xml?rev=778278&r1=778277&r2=778278&view=diff==============================================================================
--- ofbiz/trunk/applications/party/script/org/ofbiz/party/party/PartyServices.xml (original)
+++ ofbiz/trunk/applications/party/script/org/ofbiz/party/party/PartyServices.xml Mon May 25 04:58:14 2009
@@ -659,10 +659,12 @@
<simple-method method-name="getPartyEmail" short-description="Get the email of the party">
<!-- first try to find primary email Address when not found get other email -->
- <entity-and entity-name="PartyContactMechPurpose" list="emailAddresses" filter-by-date="true">
+ <entity-and entity-name="PartyContactWithPurpose" list="emailAddressesPurposes">
<field-map field-name="partyId" from-field="parameters.partyId"/>
<field-map field-name="contactMechPurposeTypeId" from-field="PRIMARY_EMAIL"/>
</entity-and>
+ <filter-list-by-date list="emailAddressesPurposes" to-list="emailAddressesPurposes1" from-field-name="purposeFromDate" thru-field-name="purposeThruDate"/>
+ <filter-list-by-date list="emailAddressesPurposes1" to-list="emailAddresses" from-field-name="contactFromDate" thru-field-name="contactThruDate"/>
<!-- any other email -->
<if-empty field="emailAddresses">
<entity-and entity-name="PartyAndContactMech" list="emailAddresses" filter-by-date="true">