From f3bc9ff5ff46f12e8981122818eb086a41931235 Mon Sep 17 00:00:00 2001 From: yashodha Date: Tue, 12 Mar 2013 19:39:37 +0530 Subject: [PATCH] CRM-9394 --- CRM/Report/Form/Contribute/Detail.php | 9 ++++++--- CRM/Report/Form/Contribute/TopDonor.php | 15 ++++++++------- CRM/Report/Form/Pledge/Detail.php | 3 ++- CRM/Report/Form/Pledge/Pbnp.php | 15 ++++++++------- 4 files changed, 24 insertions(+), 18 deletions(-) diff --git a/CRM/Report/Form/Contribute/Detail.php b/CRM/Report/Form/Contribute/Detail.php index 1340c7588f..6602807d3c 100644 --- a/CRM/Report/Form/Contribute/Detail.php +++ b/CRM/Report/Form/Contribute/Detail.php @@ -205,10 +205,12 @@ class CRM_Report_Form_Contribute_Detail extends CRM_Report_Form { array('operatorType' => CRM_Report_Form::OP_DATE), 'currency' => array('title' => 'Currency', - 'operatorType' => CRM_Utils_Type::T_STRING, + 'operatorType' => CRM_Report_Form::OP_MULTISELECT, + 'options' => CRM_Core_PseudoConstant::currencySymbols('name','name'), + 'type' => CRM_Utils_Type::T_STRING, ), - 'financial_type_id' => - array( 'title' => ts( 'Financial Type' ), + 'financial_type_id' => + array( 'title' => ts( 'Financial Type' ), 'operatorType' => CRM_Report_Form::OP_MULTISELECT, 'options' => CRM_Contribute_PseudoConstant::financialType(), 'type' => CRM_Utils_Type::T_INT, @@ -488,6 +490,7 @@ class CRM_Report_Form_Contribute_Detail extends CRM_Report_Form { $group = "\nGROUP BY {$this->_aliases['civicrm_contribution']}.currency"; $sql = "{$select} {$this->_from} {$this->_where} {$group}"; + crm_core_error::Debug( $sql); $dao = CRM_Core_DAO::executeQuery($sql); while ($dao->fetch()) { diff --git a/CRM/Report/Form/Contribute/TopDonor.php b/CRM/Report/Form/Contribute/TopDonor.php index d22af1f0d8..af070cdf76 100644 --- a/CRM/Report/Form/Contribute/TopDonor.php +++ b/CRM/Report/Form/Contribute/TopDonor.php @@ -96,20 +96,21 @@ class CRM_Report_Form_Contribute_TopDonor extends CRM_Report_Form { 'operatorType' => CRM_Report_Form::OP_DATE, ), 'currency' => - array('title' => ts('Currency'), - 'default' => NULL, + array('title' => 'Currency', + 'operatorType' => CRM_Report_Form::OP_MULTISELECT, + 'options' => CRM_Core_PseudoConstant::currencySymbols('name','name'), 'type' => CRM_Utils_Type::T_STRING, - ), + ), 'total_range' => array('title' => ts('Show no. of Top Donors'), 'type' => CRM_Utils_Type::T_INT, 'default_op' => 'eq', ), - 'financial_type_id' => - array( 'name' => 'financial_type_id', - 'title' => ts( 'Financial Type' ), + 'financial_type_id' => + array( 'name' => 'financial_type_id', + 'title' => ts( 'Financial Type' ), 'operatorType' => CRM_Report_Form::OP_MULTISELECT, - 'options' => CRM_Contribute_PseudoConstant::financialType( ) + 'options' => CRM_Contribute_PseudoConstant::financialType( ) ), 'contribution_status_id' => array('title' => ts('Donation Status'), diff --git a/CRM/Report/Form/Pledge/Detail.php b/CRM/Report/Form/Pledge/Detail.php index a0f727b218..c21ef72a04 100644 --- a/CRM/Report/Form/Pledge/Detail.php +++ b/CRM/Report/Form/Pledge/Detail.php @@ -134,7 +134,8 @@ class CRM_Report_Form_Pledge_Detail extends CRM_Report_Form { ), 'currency' => array('title' => 'Currency', - 'default' => NULL, + 'operatorType' => CRM_Report_Form::OP_MULTISELECT, + 'options' => CRM_Core_PseudoConstant::currencySymbols('name','name'), 'type' => CRM_Utils_Type::T_STRING, ), 'sid' => diff --git a/CRM/Report/Form/Pledge/Pbnp.php b/CRM/Report/Form/Pledge/Pbnp.php index 61961fcdc3..659c8b4ce2 100644 --- a/CRM/Report/Form/Pledge/Pbnp.php +++ b/CRM/Report/Form/Pledge/Pbnp.php @@ -74,8 +74,8 @@ class CRM_Report_Form_Pledge_Pbnp extends CRM_Report_Form { array('title' => ts('Pledge Made'), 'required' => TRUE, ), - 'financial_type_id' => - array( 'title' => ts('Financial Type'), + 'financial_type_id' => + array( 'title' => ts('Financial Type'), 'requried' => TRUE, ), 'amount' => @@ -101,13 +101,14 @@ class CRM_Report_Form_Pledge_Pbnp extends CRM_Report_Form { ), 'currency' => array('title' => 'Currency', - 'default' => NULL, - 'type' => CRM_Utils_Type::T_STRING, + 'operatorType' => CRM_Report_Form::OP_MULTISELECT, + 'options' => CRM_Core_PseudoConstant::currencySymbols('name','name'), + 'type' => CRM_Utils_Type::T_STRING, ), - 'financial_type_id' => - array( 'title' => ts('Financial Type'), + 'financial_type_id' => + array( 'title' => ts('Financial Type'), 'operatorType' => CRM_Report_Form::OP_MULTISELECT, - 'options' => CRM_Contribute_PseudoConstant::financialType(), + 'options' => CRM_Contribute_PseudoConstant::financialType(), ), ), 'grouping' => 'pledge-fields', -- 2.25.1