Add contribution recurring column, group by, filter
authorLars SG <lars@wildsight.ca>
Tue, 27 Apr 2021 15:37:47 +0000 (09:37 -0600)
committerLars SG <lars@wildsight.ca>
Tue, 27 Apr 2021 15:37:47 +0000 (09:37 -0600)
CRM/Report/Form/Contribute/Summary.php

index c73da90e77d44734ea3c68d345b9dd1b0045b326..c82396201cb7bba5545da43f32c0723cb8f0fb2c 100644 (file)
@@ -142,6 +142,11 @@ class CRM_Report_Form_Contribute_Summary extends CRM_Report_Form {
           'non_deductible_amount' => [
             'title' => ts('Non-deductible Amount'),
           ],
+          'contribution_recur_id' => [
+            'title' => ts('Contribution Recurring'),
+            'dbAlias' => '!ISNULL(contribution_civireport.contribution_recur_id)',
+            'type' => CRM_Utils_Type::T_BOOLEAN,
+          ],
         ],
         'grouping' => 'contri-fields',
         'filters' => [
@@ -180,6 +185,17 @@ class CRM_Report_Form_Contribute_Summary extends CRM_Report_Form {
             'options' => CRM_Contribute_PseudoConstant::contributionPage(),
             'type' => CRM_Utils_Type::T_INT,
           ],
+          'contribution_recur_id' => [
+            'title' => ts('Contribution Recurring'),
+            'operatorType' => CRM_Report_Form::OP_SELECT,
+            'type' => CRM_Utils_Type::T_BOOLEAN,
+            'options' => [
+              '' => ts('Any'),
+              TRUE => ts('Yes'),
+              FALSE => ts('No'),
+            ],
+            'dbAlias' => '!ISNULL(contribution_civireport.contribution_recur_id)',
+          ],
           'total_amount' => [
             'title' => ts('Contribution Amount'),
           ],
@@ -225,6 +241,11 @@ class CRM_Report_Form_Contribute_Summary extends CRM_Report_Form {
             'options' => CRM_Contribute_PseudoConstant::contributionPage(),
             'type' => CRM_Utils_Type::T_INT,
           ],
+          'contribution_recur_id' => [
+            'title' => ts('Contribution Recurring'),
+            'type' => CRM_Utils_Type::T_BOOLEAN,
+            'dbAlias' => '!ISNULL(contribution_civireport.contribution_recur_id)',
+          ],
         ],
       ],
       'civicrm_financial_trxn' => [