CRM-9394
authoryashodha <yashodha.chaku@webaccess.co.in>
Tue, 12 Mar 2013 14:09:37 +0000 (19:39 +0530)
committeryashodha <yashodha.chaku@webaccess.co.in>
Tue, 12 Mar 2013 14:09:37 +0000 (19:39 +0530)
CRM/Report/Form/Contribute/Detail.php
CRM/Report/Form/Contribute/TopDonor.php
CRM/Report/Form/Pledge/Detail.php
CRM/Report/Form/Pledge/Pbnp.php

index 1340c7588f78a699d839f9201a94a38d6764e63c..6602807d3c206dd6c3ff2524f2f51586c6e580ee 100644 (file)
@@ -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()) {
index d22af1f0d84d4a6786ba5b9b7464a7c44f2e9526..af070cdf761e64c9574ce93986c5ca440459cb92 100644 (file)
@@ -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'),
index a0f727b218f3c0a3ac81b3f23092c2434cb85eff..c21ef72a04110a78125f2f6e9e72aa5838228cdd 100644 (file)
@@ -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' =>
index 61961fcdc3ed6fa48f272cf3cd5713403cd7012d..659c8b4ce211971a59ab39e06070696185177054 100644 (file)
@@ -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',