From 9bf1940a0f5789d143edc271b1eb1df933178f3e Mon Sep 17 00:00:00 2001 From: yashodha Date: Fri, 15 Mar 2013 17:53:36 +0530 Subject: [PATCH] CRM-9394 --- CRM/Report/Form/Event/ParticipantListing.php | 12 ++++++++++++ CRM/Report/Form/Event/Summary.php | 2 +- CRM/Report/Form/Pledge/Detail.php | 1 + CRM/Report/Form/Pledge/Summary.php | 16 ++++++++++++++-- 4 files changed, 28 insertions(+), 3 deletions(-) diff --git a/CRM/Report/Form/Event/ParticipantListing.php b/CRM/Report/Form/Event/ParticipantListing.php index 99eedc0eb7..bfafd861d9 100644 --- a/CRM/Report/Form/Event/ParticipantListing.php +++ b/CRM/Report/Form/Event/ParticipantListing.php @@ -138,6 +138,10 @@ class CRM_Report_Form_Event_ParticipantListing extends CRM_Report_Form_Event { 'role_id' => array('title' => ts('Role'), 'default' => TRUE, ), + 'fee_currency' => array( + 'required' => TRUE, + 'no_display' => TRUE, + ), 'participant_fee_level' => NULL, 'participant_fee_amount' => NULL, 'participant_register_date' => array('title' => ts('Registration Date')), @@ -166,6 +170,13 @@ class CRM_Report_Form_Event_ParticipantListing extends CRM_Report_Form_Event { 'title' => ' Registration Date', 'operatorType' => CRM_Report_Form::OP_DATE, ), + 'fee_currency' => + array('title' => 'Currency', + 'operatorType' => CRM_Report_Form::OP_MULTISELECT, + 'options' => CRM_Core_OptionGroup::values('currencies_enabled'), + 'type' => CRM_Utils_Type::T_STRING, + ), + ), 'order_bys' => array( @@ -223,6 +234,7 @@ class CRM_Report_Form_Event_ParticipantListing extends CRM_Report_Form_Event { ), ), ); + $this->_currencyColumn = 'civicrm_participant_fee_currency'; parent::__construct(); } diff --git a/CRM/Report/Form/Event/Summary.php b/CRM/Report/Form/Event/Summary.php index 768c4bca47..2f364c4862 100644 --- a/CRM/Report/Form/Event/Summary.php +++ b/CRM/Report/Form/Event/Summary.php @@ -99,7 +99,7 @@ class CRM_Report_Form_Event_Summary extends CRM_Report_Form_Event { ), ), ); - + $this->_currencyColumn = 'civicrm_participant_fee_currency'; parent::__construct(); } diff --git a/CRM/Report/Form/Pledge/Detail.php b/CRM/Report/Form/Pledge/Detail.php index c21ef72a04..07fd065414 100644 --- a/CRM/Report/Form/Pledge/Detail.php +++ b/CRM/Report/Form/Pledge/Detail.php @@ -184,6 +184,7 @@ class CRM_Report_Form_Pledge_Detail extends CRM_Report_Form { ) + $this->addAddressFields(FALSE, FALSE); $this->_tagFilter = TRUE; + $this->_currencyColumn = 'civicrm_pledge_currency'; parent::__construct(); } diff --git a/CRM/Report/Form/Pledge/Summary.php b/CRM/Report/Form/Pledge/Summary.php index 1f85b97894..1f487fc949 100644 --- a/CRM/Report/Form/Pledge/Summary.php +++ b/CRM/Report/Form/Pledge/Summary.php @@ -95,6 +95,10 @@ class CRM_Report_Form_Pledge_Summary extends CRM_Report_Form { 'no_display' => TRUE, 'required' => FALSE, ), + 'currency' => array( + 'required' => TRUE, + 'no_display' => TRUE, + ), 'amount' => array('title' => ts('Pledge Amount'), 'required' => TRUE, @@ -137,6 +141,12 @@ class CRM_Report_Form_Pledge_Summary extends CRM_Report_Form { array('title' => ts('Pledged Amount'), 'operatorType' => CRM_Report_Form::OP_INT, ), + 'currency' => + array('title' => 'Currency', + 'operatorType' => CRM_Report_Form::OP_MULTISELECT, + 'options' => CRM_Core_OptionGroup::values('currencies_enabled'), + 'type' => CRM_Utils_Type::T_STRING, + ), 'sid' => array( 'name' => 'status_id', @@ -169,7 +179,7 @@ class CRM_Report_Form_Pledge_Summary extends CRM_Report_Form { 'total_paid' => array( 'title' => ts('Total Amount Paid'), - 'type' => CRM_Utils_Type::T_MONEY, + 'type' => CRM_Utils_Type::T_STRING, 'dbAlias' => 'sum(pledge_payment_civireport.actual_amount)', ), ), @@ -193,6 +203,7 @@ class CRM_Report_Form_Pledge_Summary extends CRM_Report_Form { ) + $this->addAddressFields(); $this->_tagFilter = TRUE; + $this->_currencyColumn = 'civicrm_pledge_currency'; parent::__construct(); } @@ -298,6 +309,7 @@ class CRM_Report_Form_Pledge_Summary extends CRM_Report_Form { "; $sql = "{$select} {$this->_from} {$this->_where}"; + $dao = CRM_Core_DAO::executeQuery($sql); if ($dao->fetch()) { @@ -381,7 +393,7 @@ class CRM_Report_Form_Pledge_Summary extends CRM_Report_Form { $entryFound = FALSE; $checkList = array(); $display_flag = $prev_cid = $cid = 0; - + crm_Core_error::Debug('$rows', $rows); foreach ($rows as $rowNum => $row) { // convert display name to links -- 2.25.1