From bcb4b43ee959b92fc2b7fdbb4a22bf07b1092165 Mon Sep 17 00:00:00 2001 From: yashodha Date: Tue, 21 Jun 2016 12:18:49 +0530 Subject: [PATCH] CRM-18982: Pledge report: cannot add results to a group ---------------------------------------- * CRM-18982: https://issues.civicrm.org/jira/browse/CRM-18982 --- CRM/Report/Form/Pledge/Detail.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CRM/Report/Form/Pledge/Detail.php b/CRM/Report/Form/Pledge/Detail.php index 7d4ba3b08c..3417da4f6d 100644 --- a/CRM/Report/Form/Pledge/Detail.php +++ b/CRM/Report/Form/Pledge/Detail.php @@ -292,6 +292,7 @@ class CRM_Report_Form_Pledge_Detail extends CRM_Report_Form { public function statistics(&$rows) { $statistics = parent::statistics($rows); //regenerate the from field without extra left join on pledge payments + $totalPaid = $this->_totalPaid; $this->_totalPaid = FALSE; $this->from(); $this->customDataFrom(); @@ -340,6 +341,11 @@ class CRM_Report_Form_Pledge_Detail extends CRM_Report_Form { ); } } + // reset from clause + if ($totalPaid) { + $this->_totalPaid = TRUE; + $this->from(); + } return $statistics; } -- 2.25.1