From f98dd91bb9b2b745efaa2612aaea983231f133a6 Mon Sep 17 00:00:00 2001 From: Brian Shaughnessy Date: Wed, 12 Jun 2013 10:54:00 -0400 Subject: [PATCH] CRM-12798 contact detail report date filter --- CRM/Report/Form/Contact/Detail.php | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/CRM/Report/Form/Contact/Detail.php b/CRM/Report/Form/Contact/Detail.php index 36fa06bc0d..4dbfb3b3f3 100644 --- a/CRM/Report/Form/Contact/Detail.php +++ b/CRM/Report/Form/Contact/Detail.php @@ -520,8 +520,15 @@ class CRM_Report_Form_Contact_Detail extends CRM_Report_Form { if (array_key_exists('filters', $table)) { foreach ($table['filters'] as $fieldName => $field) { $clause = NULL; - $op = CRM_Utils_Array::value("{$fieldName}_op", $this->_params); - if ($op) { + if (CRM_Utils_Array::value('operatorType', $field) & CRM_Report_Form::OP_DATE) { + $relative = CRM_Utils_Array::value("{$fieldName}_relative", $this->_params); + $from = CRM_Utils_Array::value("{$fieldName}_from", $this->_params); + $to = CRM_Utils_Array::value("{$fieldName}_to", $this->_params); + + $clause = $this->dateClause($field['dbAlias'], $relative, $from, $to); + } + else { + $op = CRM_Utils_Array::value("{$fieldName}_op", $this->_params); $clause = $this->whereClause($field, $op, CRM_Utils_Array::value("{$fieldName}_value", $this->_params), -- 2.25.1