CRM-19636, fixed db error for Top Donor report when filtered using Contact Name,...
authorPradeep Nayak <pradpnayak@gmail.com>
Fri, 11 Nov 2016 13:04:34 +0000 (18:34 +0530)
committerPradeep Nayak <pradpnayak@gmail.com>
Thu, 17 Nov 2016 06:34:52 +0000 (12:04 +0530)
----------------------------------------
* CRM-19636: DB error on Top Donor Report
  https://issues.civicrm.org/jira/browse/CRM-19636

CRM/Report/Form/Contribute/TopDonor.php

index ff22f62f1fd37b308fec3d6fb6b9eb61de55fecd..077a45b896b7751f156b54349dad8c57dc2b592f 100644 (file)
@@ -106,6 +106,20 @@ class CRM_Report_Form_Contribute_TopDonor extends CRM_Report_Form {
           ),
         ),
         'filters' => array(
+          'sort_name' => array(
+            'title' => ts('Contact Name'),
+            'type' => CRM_Utils_Type::T_STRING,
+            'operator' => 'like',
+          ),
+          'id' => array(
+            'title' => ts('Contact ID'),
+            'type' => CRM_Utils_Type::T_INT,
+            'no_display' => TRUE,
+          ),
+          'birth_date' => array(
+            'title' => ts('Birth Date'),
+            'operatorType' => CRM_Report_Form::OP_DATE,
+          ),
           'gender_id' => array(
             'title' => ts('Gender'),
             'operatorType' => CRM_Report_Form::OP_MULTISELECT,
@@ -118,13 +132,6 @@ class CRM_Report_Form_Contribute_TopDonor extends CRM_Report_Form {
             'title' => ts('Contact Subtype'),
           ),
         ),
-        'filters' => array(
-          'gender_id' => array(
-            'title' => ts('Gender'),
-            'operatorType' => CRM_Report_Form::OP_MULTISELECT,
-            'options' => CRM_Core_PseudoConstant::get('CRM_Contact_DAO_Contact', 'gender_id'),
-          ),
-        ),
       ),
       'civicrm_line_item' => array(
         'dao' => 'CRM_Price_DAO_LineItem',
@@ -150,28 +157,6 @@ class CRM_Report_Form_Contribute_TopDonor extends CRM_Report_Form {
           ),
         ),
         'filters' => array(
-          'sort_name' => array(
-            'title' => ts('Participant Name'),
-            'type' => CRM_Utils_Type::T_STRING,
-            'operator' => 'like',
-          ),
-          'id' => array(
-            'title' => ts('Contact ID'),
-            'type' => CRM_Utils_Type::T_INT,
-            'no_display' => TRUE,
-          ),
-          'birth_date' => array(
-            'title' => ts('Birth Date'),
-            'operatorType' => CRM_Report_Form::OP_DATE,
-          ),
-          'contact_type' => array(
-            'title' => ts('Contact Type'),
-            'type' => CRM_Utils_Type::T_STRING,
-          ),
-          'contact_sub_type' => array(
-            'title' => ts('Contact Subtype'),
-            'type' => CRM_Utils_Type::T_STRING,
-          ),
           'receive_date' => array(
             'default' => 'this.year',
             'operatorType' => CRM_Report_Form::OP_DATE,