Author: ashish
Date: Sat Sep 20 15:53:00 2014
New Revision: 1626463
URL:
http://svn.apache.org/r1626463Log:
Applied bug fix from jira issue - OFBIZ-5261- Party contact expiration and its hidden problems.
Thanks Mridul for providing the patch. Committing missing file from previous commit i.e GoogleCheckoutHelper.java.
Modified:
ofbiz/trunk/specialpurpose/googlecheckout/src/org/ofbiz/googlecheckout/GoogleCheckoutHelper.java
Modified: ofbiz/trunk/specialpurpose/googlecheckout/src/org/ofbiz/googlecheckout/GoogleCheckoutHelper.java
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/googlecheckout/src/org/ofbiz/googlecheckout/GoogleCheckoutHelper.java?rev=1626463&r1=1626462&r2=1626463&view=diff==============================================================================
--- ofbiz/trunk/specialpurpose/googlecheckout/src/org/ofbiz/googlecheckout/GoogleCheckoutHelper.java (original)
+++ ofbiz/trunk/specialpurpose/googlecheckout/src/org/ofbiz/googlecheckout/GoogleCheckoutHelper.java Sat Sep 20 15:53:00 2014
@@ -555,8 +555,10 @@ public class GoogleCheckoutHelper {
String contactMechPurposeTypeId = getAddressType(addrType);
// check to make sure the purpose doesn't already exist
- List<GenericValue> values = delegator.findByAnd("PartyContactMechPurpose", UtilMisc.toMap("partyId", partyId,
+ List<GenericValue> values = delegator.findByAnd("PartyContactWithPurpose", UtilMisc.toMap("partyId", partyId,
"contactMechId", contactMechId, "contactMechPurposeTypeId", contactMechPurposeTypeId), null, false);
+ values = EntityUtil.filterByDate(values, null, "contactFromDate", "contactThruDate", true);
+ values = EntityUtil.filterByDate(values, null, "purposeFromDate", "purposeThruDate", true);
if (UtilValidate.isEmpty(values)) {
Map<String, Object> addPurposeMap = FastMap.newInstance();