From db9386287932f4984eb9a8e095a3d93969dcf231 Mon Sep 17 00:00:00 2001 From: Eileen McNaughton Date: Mon, 1 May 2023 12:18:10 +1200 Subject: [PATCH] Use purify rather than escape to preserve currency --- CRM/Report/Form/Contribute/Summary.php | 2 ++ templates/CRM/Report/Form/Statistics.tpl | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CRM/Report/Form/Contribute/Summary.php b/CRM/Report/Form/Contribute/Summary.php index a9c0877878..cdddb8f720 100644 --- a/CRM/Report/Form/Contribute/Summary.php +++ b/CRM/Report/Form/Contribute/Summary.php @@ -763,6 +763,7 @@ class CRM_Report_Form_Contribute_Summary extends CRM_Report_Form { $statistics['counts']['count'] = [ 'title' => ts('Total Contributions'), 'value' => $count, + 'type' => CRM_Utils_Type::T_INT, ]; $statistics['counts']['avg'] = [ 'title' => ts('Average'), @@ -789,6 +790,7 @@ class CRM_Report_Form_Contribute_Summary extends CRM_Report_Form { $statistics['counts']['soft_count'] = [ 'title' => ts('Total Soft Credits'), 'value' => $softCount, + 'type' => CRM_Utils_Type::T_INT, ]; $statistics['counts']['soft_avg'] = [ 'title' => ts('Average Soft Credit'), diff --git a/templates/CRM/Report/Form/Statistics.tpl b/templates/CRM/Report/Form/Statistics.tpl index 104f95466a..e4625d9ab4 100644 --- a/templates/CRM/Report/Form/Statistics.tpl +++ b/templates/CRM/Report/Form/Statistics.tpl @@ -40,7 +40,7 @@ {if $row.type eq 1024} {$row.value|crmMoney|escape} {elseif $row.type eq 2} - {$row.value|escape} + {$row.value|purify} {else} {$row.value|crmNumberFormat|escape} {/if} -- 2.25.1