Author: jleroux
Date: Tue Dec 16 15:29:31 2014 New Revision: 1645977 URL: http://svn.apache.org/r1645977 Log: Completes r1645954, I got a power outage here and things got complicated :/ Modified: ofbiz/branches/release13.07/applications/accounting/src/org/ofbiz/accounting/payment/PaymentWorker.java ofbiz/branches/release13.07/applications/party/src/org/ofbiz/party/contact/ContactMechServices.java Modified: ofbiz/branches/release13.07/applications/accounting/src/org/ofbiz/accounting/payment/PaymentWorker.java URL: http://svn.apache.org/viewvc/ofbiz/branches/release13.07/applications/accounting/src/org/ofbiz/accounting/payment/PaymentWorker.java?rev=1645977&r1=1645976&r2=1645977&view=diff ============================================================================== --- ofbiz/branches/release13.07/applications/accounting/src/org/ofbiz/accounting/payment/PaymentWorker.java (original) +++ ofbiz/branches/release13.07/applications/accounting/src/org/ofbiz/accounting/payment/PaymentWorker.java Tue Dec 16 15:29:31 2014 @@ -29,6 +29,7 @@ import javolution.util.FastList; import javolution.util.FastMap; import org.ofbiz.base.util.Debug; +import org.ofbiz.base.util.UtilDateTime; import org.ofbiz.base.util.UtilFormatOut; import org.ofbiz.base.util.UtilMisc; import org.ofbiz.base.util.UtilNumber; @@ -161,8 +162,8 @@ public class PaymentWorker { paymentAddresses = delegator.findByAnd("PartyContactWithPurpose", UtilMisc.toMap("partyId", partyId, "contactMechPurposeTypeId", "PAYMENT_LOCATION"), UtilMisc.toList("-purposeFromDate"), false); - paymentAddresses = EntityUtil.filterByDate(paymentAddresses, null, "contactFromDate", "contactThruDate", true); - paymentAddresses = EntityUtil.filterByDate(paymentAddresses, null, "purposeFromDate", "purposeThruDate", true); + paymentAddresses = EntityUtil.filterByDate(paymentAddresses, UtilDateTime.nowTimestamp(), "contactFromDate", "contactThruDate", true); + paymentAddresses = EntityUtil.filterByDate(paymentAddresses, UtilDateTime.nowTimestamp(), "purposeFromDate", "purposeThruDate", true); } catch (GenericEntityException e) { Debug.logError(e, "Trouble getting PartyContactWithPurpose view entity list", module); } Modified: ofbiz/branches/release13.07/applications/party/src/org/ofbiz/party/contact/ContactMechServices.java URL: http://svn.apache.org/viewvc/ofbiz/branches/release13.07/applications/party/src/org/ofbiz/party/contact/ContactMechServices.java?rev=1645977&r1=1645976&r2=1645977&view=diff ============================================================================== --- ofbiz/branches/release13.07/applications/party/src/org/ofbiz/party/contact/ContactMechServices.java (original) +++ ofbiz/branches/release13.07/applications/party/src/org/ofbiz/party/contact/ContactMechServices.java Tue Dec 16 15:29:31 2014 @@ -813,8 +813,8 @@ public class ContactMechServices { Map<String, String> pcmpFindMap = UtilMisc.toMap("partyId", partyId, "contactMechId", contactMechId, "contactMechPurposeTypeId", contactMechPurposeTypeId); //Debug.logInfo("pcmpFindMap = " + pcmpFindMap, module); List<GenericValue> allPCWPs = delegator.findByAnd("PartyContactWithPurpose", pcmpFindMap, null, false); - allPCWPs = EntityUtil.filterByDate(allPCWPs, null, "contactFromDate", "contactThruDate", true); - allPCWPs = EntityUtil.filterByDate(allPCWPs, null, "purposeFromDate", "purposeThruDate", true); + allPCWPs = EntityUtil.filterByDate(allPCWPs, UtilDateTime.nowTimestamp(), "contactFromDate", "contactThruDate", true); + allPCWPs = EntityUtil.filterByDate(allPCWPs, UtilDateTime.nowTimestamp(), "purposeFromDate", "purposeThruDate", true); tempVal = EntityUtil.getFirst(allPCWPs); } catch (GenericEntityException e) { @@ -876,8 +876,8 @@ public class ContactMechServices { Map<String, String> pcmpFindMap = UtilMisc.toMap("partyId", partyId, "contactMechId", contactMechId, "contactMechPurposeTypeId", contactMechPurposeTypeId); //Debug.logInfo("pcmpFindMap = " + pcmpFindMap, module); List<GenericValue> allPCWPs = delegator.findByAnd("PartyContactWithPurpose", pcmpFindMap, null, false); - allPCWPs = EntityUtil.filterByDate(allPCWPs, null, "contactFromDate", "contactThruDate", true); - allPCWPs = EntityUtil.filterByDate(allPCWPs, null, "purposeFromDate", "purposeThruDate", true); + allPCWPs = EntityUtil.filterByDate(allPCWPs, UtilDateTime.nowTimestamp(), "contactFromDate", "contactThruDate", true); + allPCWPs = EntityUtil.filterByDate(allPCWPs, UtilDateTime.nowTimestamp(), "purposeFromDate", "purposeThruDate", true); tempVal = EntityUtil.getFirst(allPCWPs); } catch (GenericEntityException e) { |
Free forum by Nabble | Edit this page |