You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by as...@apache.org on 2014/09/20 17:53:00 UTC

svn commit: r1626463 - /ofbiz/trunk/specialpurpose/googlecheckout/src/org/ofbiz/googlecheckout/GoogleCheckoutHelper.java

Author: ashish
Date: Sat Sep 20 15:53:00 2014
New Revision: 1626463

URL: http://svn.apache.org/r1626463
Log:
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();