From bec9ef327419077151e72a76cc6d7b1eed555af6 Mon Sep 17 00:00:00 2001 From: Deepak Srivastava Date: Thu, 6 Jun 2013 19:12:19 +0530 Subject: [PATCH] CRM-12490, section header fixes ---------------------------------------- * CRM-12490: Add Soft Credit data to the Contribution Detail Report http://issues.civicrm.org/jira/browse/CRM-12490 --- CRM/Report/Form/Contribute/Detail.php | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/CRM/Report/Form/Contribute/Detail.php b/CRM/Report/Form/Contribute/Detail.php index bf94aca5ce..38d96aa54a 100644 --- a/CRM/Report/Form/Contribute/Detail.php +++ b/CRM/Report/Form/Contribute/Detail.php @@ -861,7 +861,7 @@ WHERE civicrm_contribution_contribution_id={$row['civicrm_contribution_contribu $query = "select " . implode(", ", $ifnulls) - ."$addtotals, count(*) as ct from ($sql) as subquery group by ". implode(", ", $sectionAliases); + ."$addtotals, count(*) as ct from civireport_contribution_detail_temp3 group by ". implode(", ", $sectionAliases); // initialize array of total counts $sumcontribs = $totals = array(); $dao = CRM_Core_DAO::executeQuery($query); @@ -895,10 +895,17 @@ WHERE civicrm_contribution_contribution_id={$row['civicrm_contribution_contribu } if ($showsumcontribs) { $totalandsum = array(); + $title = ts('contributions / soft-credits'); + if (CRM_Utils_Array::value('contribution_or_soft_value', $this->_params) == 'contributions_only') { + $title = ts('contributions'); + } else if (CRM_Utils_Array::value('contribution_or_soft_value', $this->_params) == 'soft_credits_only') { + $title = ts('soft-credits'); + } foreach ($totals as $key => $total) { - $totalandsum[$key] = ts("%1 contributions: %2", array( + $totalandsum[$key] = ts("%1 %2: %3", array( 1 => $total, - 2 => CRM_Utils_Money::format($sumcontribs[$key]) + 2 => $title, + 3 => CRM_Utils_Money::format($sumcontribs[$key]) )); } $this->assign('sectionTotals', $totalandsum); -- 2.25.1