'civicrm_contact' => array(
'dao' => 'CRM_Contact_DAO_Contact',
'grouping' => 'contact-fields',
- 'fields' => array(
- 'sort_name' => array(
- 'title' => ts('Contact Name'),
- 'no_repeat' => TRUE,
- 'default' => TRUE,
- ),
- 'display_name' => array(
- 'title' => ts('Display Name'),
- 'no_repeat' => TRUE,
- ),
- 'addressee_display' => array(
- 'title' => ts('Addressee Name'),
- 'no_repeat' => TRUE,
- ),
- 'id' => array(
- 'no_display' => TRUE,
- 'required' => TRUE,
- ),
- 'contact_type' => array(
- 'title' => ts('Contact Type'),
- 'no_repeat' => TRUE,
- ),
- 'contact_sub_type' => array(
- 'title' => ts('Contact Subtype'),
- 'no_repeat' => TRUE,
- ),
+ 'fields' => array_merge(
+ $this->getBasicContactFields(),
+ array(
+ 'sort_name' => array(
+ 'title' => ts('Contact Name'),
+ 'no_repeat' => TRUE,
+ 'default' => TRUE,
+ ),
+ )
),
- 'filters' => array(
- 'percentage_change' => array(
- 'title' => ts('Percentage Change'),
- 'type' => CRM_Utils_Type::T_INT,
- 'operatorType' => CRM_Report_Form::OP_INT,
- 'name' => 'percentage_change',
- 'dbAlias' => '( ( contribution_civireport2.total_amount_sum - contribution_civireport1.total_amount_sum ) * 100 / contribution_civireport1.total_amount_sum )',
- ),
+ 'filters' => array_merge(
+ $this->getBasicContactFilters(array('deceased' => NULL)),
+ array(
+ 'percentage_change' => array(
+ 'title' => ts('Percentage Change'),
+ 'type' => CRM_Utils_Type::T_INT,
+ 'operatorType' => CRM_Report_Form::OP_INT,
+ 'name' => 'percentage_change',
+ 'dbAlias' => '( ( contribution_civireport2.total_amount_sum - contribution_civireport1.total_amount_sum ) * 100 / contribution_civireport1.total_amount_sum )',
+ ),
+ )
),
'group_bys' => array(
'id' => array(
),
'grouping' => 'contact-fields',
),
- 'civicrm_address' => array(
- 'dao' => 'CRM_Core_DAO_Address',
- 'grouping' => 'contact-fields',
- 'fields' => array(
- 'street_address' => array('title' => ts('Street Address')),
- 'supplemental_address_1' => array('title' => ts('Supplemental Address 1')),
- 'city' => array('title' => ts('City')),
- 'country_id' => array('title' => ts('Country')),
- 'state_province_id' => array('title' => ts('State/Province')),
- 'postal_code' => array('title' => ts('Postal Code')),
- ),
- 'group_bys' => array(
- 'country_id' => array('title' => ts('Country')),
- 'state_province_id' => array(
- 'title' => ts('State/Province'),
- ),
- ),
- ),
'civicrm_financial_type' => array(
'dao' => 'CRM_Financial_DAO_FinancialType',
'fields' => array('financial_type' => array('title' => ts('Financial Type'))),
),
'group_bys' => array('contribution_source' => NULL),
),
- );
+ ) + $this->addAddressFields(TRUE, FALSE, TRUE, array('country_id' => FALSE));
$this->_groupFilter = TRUE;
$this->_tagFilter = TRUE;
$rules = array(
'id' => array(
'sort_name',
+ 'exposed_id',
'display_name',
'addressee_display',
'contact_type',
'state_province_id',
'country_id',
'city',
+ 'county_id',
'street_address',
'supplemental_address_1',
+ 'supplemental_address_2',
+ 'supplemental_address_3',
+ 'street_number',
+ 'street_name',
+ 'street_unit',
'postal_code',
+ 'postal_code_suffix',
+ 'prefix_id',
+ 'first_name',
+ 'nick_name',
+ 'middle_name',
+ 'last_name',
+ 'suffix_id',
+ 'postal_greeting_display',
+ 'email_greeting_display',
+ 'addressee_display',
+ 'gender_id',
+ 'birth_date',
+ 'age',
+ 'job_title',
+ 'organization_name',
+ 'external_identifier',
+ 'do_not_email',
+ 'do_not_phone',
+ 'do_not_mail',
+ 'do_not_sms',
+ 'is_opt_out',
+ 'is_deceased',
+ 'preferred_language',
),
'country_id' => array('country_id'),
'state_province_id' => array('country_id', 'state_province_id'),