From 6183cbd15a9761ea1db1ba1c644c00e6f83fb186 Mon Sep 17 00:00:00 2001 From: Seamus Lee Date: Fri, 23 Oct 2015 03:31:14 +0000 Subject: [PATCH] CRM-17436 Make the Date and time filter on ContributionAggregate search aware of time filtering --- CRM/Contact/Form/Search/Custom/ContributionAggregate.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/CRM/Contact/Form/Search/Custom/ContributionAggregate.php b/CRM/Contact/Form/Search/Custom/ContributionAggregate.php index ed46a04fb2..568f43567a 100644 --- a/CRM/Contact/Form/Search/Custom/ContributionAggregate.php +++ b/CRM/Contact/Form/Search/Custom/ContributionAggregate.php @@ -200,12 +200,15 @@ civicrm_contact AS contact_a {$this->_aclFrom} $clauses[] = "contrib.contact_id = contact_a.id"; $clauses[] = "contrib.is_test = 0"; - $startDate = CRM_Utils_Date::processDate($this->_formValues['start_date']); + $startTime = isset($this->_formValues['start_date_time']) ? $this->_formValues['start_date_time'] : '12:00AM'; + $endTime = isset($this->formValues['end_date_time']) ? $this->formValues['end_date_time'] : '11:59PM'; + + $startDate = CRM_Utils_Date::processDate($this->_formValues['start_date'], $startTime); if ($startDate) { $clauses[] = "contrib.receive_date >= $startDate"; } - $endDate = CRM_Utils_Date::processDate($this->_formValues['end_date']); + $endDate = CRM_Utils_Date::processDate($this->_formValues['end_date'], $endTime); if ($endDate) { $clauses[] = "contrib.receive_date <= $endDate"; } -- 2.25.1