CRM-9394
authoryashodha <yashodha.chaku@webaccess.co.in>
Fri, 15 Mar 2013 12:23:36 +0000 (17:53 +0530)
committeryashodha <yashodha.chaku@webaccess.co.in>
Sun, 17 Mar 2013 15:40:14 +0000 (21:10 +0530)
CRM/Report/Form/Event/ParticipantListing.php
CRM/Report/Form/Event/Summary.php
CRM/Report/Form/Pledge/Detail.php
CRM/Report/Form/Pledge/Summary.php

index 99eedc0eb7a7d65e775bcf86557b119e598628d6..bfafd861d949e1b59d853175466caee0a0645c84 100644 (file)
@@ -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();
   }
 
index 768c4bca47a978b6a417b27189e3e77c2abc08d3..2f364c4862c7e87fe69bf4bd813fcc6fd15d7ed8 100644 (file)
@@ -99,7 +99,7 @@ class CRM_Report_Form_Event_Summary extends CRM_Report_Form_Event {
         ),
       ),
     );
-
+    $this->_currencyColumn = 'civicrm_participant_fee_currency';
     parent::__construct();
   }
 
index c21ef72a04110a78125f2f6e9e72aa5838228cdd..07fd06541413a3a49dee2f188834289bf0f21eab 100644 (file)
@@ -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();
   }
 
index 1f85b97894e397420748ccd8125bc9f5501cedcc..1f487fc949d5290d38ac7c6e07252ded9e374c16 100644 (file)
@@ -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