3 +--------------------------------------------------------------------+
5 +--------------------------------------------------------------------+
6 | Copyright CiviCRM LLC (c) 2004-2018 |
7 +--------------------------------------------------------------------+
8 | This file is a part of CiviCRM. |
10 | CiviCRM is free software; you can copy, modify, and distribute it |
11 | under the terms of the GNU Affero General Public License |
12 | Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
14 | CiviCRM is distributed in the hope that it will be useful, but |
15 | WITHOUT ANY WARRANTY; without even the implied warranty of |
16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
17 | See the GNU Affero General Public License for more details. |
19 | You should have received a copy of the GNU Affero General Public |
20 | License and the CiviCRM Licensing Exception along |
21 | with this program; if not, contact CiviCRM LLC |
22 | at info[AT]civicrm[DOT]org. If you have questions about the |
23 | GNU Affero General Public License or the licensing of CiviCRM, |
24 | see the CiviCRM license FAQ at http://civicrm.org/licensing |
25 +--------------------------------------------------------------------+
31 * @copyright CiviCRM LLC (c) 2004-2018
33 class CRM_Report_Form_Event_ParticipantListing
extends CRM_Report_Form_Event
{
35 protected $_summary = NULL;
37 protected $_contribField = FALSE;
38 protected $_groupFilter = TRUE;
39 protected $_tagFilter = TRUE;
40 protected $_balance = FALSE;
41 protected $activeCampaigns;
43 protected $_customGroupExtends = array(
50 public $_drilldownReport = array('event/income' => 'Link to Detail Report');
55 public function __construct() {
56 $this->_autoIncludeIndexedFieldsAsOrderBys
= 1;
58 // Check if CiviCampaign is a) enabled and b) has active campaigns
59 $config = CRM_Core_Config
::singleton();
60 $campaignEnabled = in_array("CiviCampaign", $config->enableComponents
);
61 if ($campaignEnabled) {
62 $getCampaigns = CRM_Campaign_BAO_Campaign
::getPermissionedCampaigns(NULL, NULL, TRUE, FALSE, TRUE);
63 $this->activeCampaigns
= $getCampaigns['campaigns'];
64 asort($this->activeCampaigns
);
67 $this->_columns
= array(
68 'civicrm_contact' => array(
69 'dao' => 'CRM_Contact_DAO_Contact',
70 'fields' => array_merge(array(
71 // CRM-17115 - to avoid changing report output at this stage re-instate
72 // old field name for sort name
73 'sort_name_linked' => array(
74 'title' => ts('Participant Name'),
77 'dbAlias' => 'contact_civireport.sort_name',
79 $this->getBasicContactFields(),
81 'age_at_event' => array(
82 'title' => ts('Age at Event'),
83 'dbAlias' => 'TIMESTAMPDIFF(YEAR, contact_civireport.birth_date, event_civireport.start_date)',
87 'grouping' => 'contact-fields',
90 'title' => ts('Last Name, First Name'),
92 'default_weight' => '0',
93 'default_order' => 'ASC',
95 'first_name' => array(
96 'name' => 'first_name',
97 'title' => ts('First Name'),
100 'name' => 'gender_id',
101 'title' => ts('Gender'),
103 'birth_date' => array(
104 'name' => 'birth_date',
105 'title' => ts('Birth Date'),
107 'age_at_event' => array(
108 'name' => 'age_at_event',
109 'title' => ts('Age at Event'),
111 'contact_type' => array(
112 'title' => ts('Contact Type'),
114 'contact_sub_type' => array(
115 'title' => ts('Contact Subtype'),
118 'filters' => CRM_Report_Form
::getBasicContactFilters(),
120 'civicrm_email' => array(
121 'dao' => 'CRM_Core_DAO_Email',
124 'title' => ts('Email'),
128 'grouping' => 'contact-fields',
131 'title' => ts('Participant E-mail'),
132 'operator' => 'like',
137 $this->_columns +
= $this->getAddressColumns();
138 $this->_columns +
= array(
139 'civicrm_participant' => array(
140 'dao' => 'CRM_Event_DAO_Participant',
142 'participant_id' => array('title' => ts('Participant ID')),
143 'participant_record' => array(
145 'no_display' => TRUE,
150 'type' => CRM_Utils_Type
::T_STRING
,
152 'status_id' => array(
153 'title' => ts('Status'),
157 'title' => ts('Role'),
160 'fee_currency' => array(
162 'no_display' => TRUE,
164 'registered_by_id' => array(
165 'title' => ts('Registered by Participant ID'),
168 'title' => ts('Source'),
170 'participant_fee_level' => NULL,
171 'participant_fee_amount' => array('title' => ts('Participant Fee')),
172 'participant_register_date' => array('title' => ts('Registration Date')),
173 'total_paid' => array(
174 'title' => ts('Total Paid'),
175 'dbAlias' => 'IFNULL(SUM(ft.total_amount), 0)',
179 'title' => ts('Balance'),
180 'dbAlias' => 'participant_civireport.fee_amount - IFNULL(SUM(ft.total_amount), 0)',
184 'grouping' => 'event-fields',
187 'name' => 'event_id',
188 'title' => ts('Event'),
189 'operatorType' => CRM_Report_Form
::OP_ENTITYREF
,
190 'type' => CRM_Utils_Type
::T_INT
,
191 'attributes' => array(
193 'select' => array('minimumInputLength' => 0),
197 'name' => 'status_id',
198 'title' => ts('Participant Status'),
199 'type' => CRM_Utils_Type
::T_INT
,
200 'operatorType' => CRM_Report_Form
::OP_MULTISELECT
,
201 'options' => CRM_Event_PseudoConstant
::participantStatus(NULL, NULL, 'label'),
205 'title' => ts('Participant Role'),
206 'operatorType' => CRM_Report_Form
::OP_MULTISELECT
,
207 'options' => CRM_Event_PseudoConstant
::participantRole(),
209 'participant_register_date' => array(
210 'title' => ts('Registration Date'),
211 'operatorType' => CRM_Report_Form
::OP_DATE
,
213 'fee_currency' => array(
214 'title' => ts('Fee Currency'),
215 'operatorType' => CRM_Report_Form
::OP_MULTISELECT
,
216 'options' => CRM_Core_OptionGroup
::values('currencies_enabled'),
218 'type' => CRM_Utils_Type
::T_STRING
,
220 'registered_by_id' => array(
221 'title' => ts('Registered by Participant ID'),
222 'type' => CRM_Utils_Type
::T_STRING
,
223 'operator' => 'like',
226 'title' => ts('Source'),
227 'type' => CRM_Utils_Type
::T_STRING
,
228 'operator' => 'like',
231 'order_bys' => array(
232 'participant_register_date' => array(
233 'title' => ts('Registration Date'),
234 'default_weight' => '1',
235 'default_order' => 'ASC',
238 'title' => ts('Event'),
239 'default_weight' => '1',
240 'default_order' => 'ASC',
244 'civicrm_phone' => array(
245 'dao' => 'CRM_Core_DAO_Phone',
248 'title' => ts('Phone'),
253 'grouping' => 'contact-fields',
255 'civicrm_event' => array(
256 'dao' => 'CRM_Event_DAO_Event',
258 'event_type_id' => array(
259 'title' => ts('Event Type'),
261 'event_start_date' => array(
262 'title' => ts('Event Start Date'),
264 'event_end_date' => array(
265 'title' => ts('Event End Date'),
268 'grouping' => 'event-fields',
271 'name' => 'event_type_id',
272 'title' => ts('Event Type'),
273 'type' => CRM_Utils_Type
::T_INT
,
274 'operatorType' => CRM_Report_Form
::OP_MULTISELECT
,
275 'options' => CRM_Core_OptionGroup
::values('event_type'),
277 'event_start_date' => array(
278 'title' => ts('Event Start Date'),
279 'operatorType' => CRM_Report_Form
::OP_DATE
,
281 'event_end_date' => array(
282 'title' => ts('Event End Date'),
283 'operatorType' => CRM_Report_Form
::OP_DATE
,
286 'order_bys' => array(
287 'event_type_id' => array(
288 'title' => ts('Event Type'),
289 'default_weight' => '2',
290 'default_order' => 'ASC',
292 'event_start_date' => array(
293 'title' => ts('Event Start Date'),
297 'civicrm_note' => array(
298 'dao' => 'CRM_Core_DAO_Note',
300 'participant_note' => array(
302 'title' => ts('Participant Note'),
306 'civicrm_contribution' => array(
307 'dao' => 'CRM_Contribute_DAO_Contribution',
309 'contribution_id' => array(
311 'no_display' => TRUE,
313 'csv_display' => TRUE,
314 'title' => ts('Contribution ID'),
316 'financial_type_id' => array('title' => ts('Financial Type')),
317 'receive_date' => array('title' => ts('Payment Date')),
318 'contribution_status_id' => array('title' => ts('Contribution Status')),
319 'payment_instrument_id' => array('title' => ts('Payment Type')),
320 'contribution_source' => array(
322 'title' => ts('Contribution Source'),
326 'no_display' => TRUE,
329 'fee_amount' => array('title' => ts('Transaction Fee')),
330 'net_amount' => NULL,
332 'grouping' => 'contrib-fields',
334 'receive_date' => array(
335 'title' => ts('Payment Date'),
336 'operatorType' => CRM_Report_Form
::OP_DATE
,
338 'financial_type_id' => array(
339 'title' => ts('Financial Type'),
340 'type' => CRM_Utils_Type
::T_INT
,
341 'operatorType' => CRM_Report_Form
::OP_MULTISELECT
,
342 'options' => CRM_Contribute_PseudoConstant
::financialType(),
345 'title' => ts('Contribution Currency'),
346 'operatorType' => CRM_Report_Form
::OP_MULTISELECT
,
347 'options' => CRM_Core_OptionGroup
::values('currencies_enabled'),
349 'type' => CRM_Utils_Type
::T_STRING
,
351 'payment_instrument_id' => array(
352 'title' => ts('Payment Type'),
353 'type' => CRM_Utils_Type
::T_INT
,
354 'operatorType' => CRM_Report_Form
::OP_MULTISELECT
,
355 'options' => CRM_Contribute_PseudoConstant
::paymentInstrument(),
357 'contribution_status_id' => array(
358 'title' => ts('Contribution Status'),
359 'operatorType' => CRM_Report_Form
::OP_MULTISELECT
,
360 'options' => CRM_Contribute_PseudoConstant
::contributionStatus(),
365 'civicrm_line_item' => array(
366 'dao' => 'CRM_Price_DAO_LineItem',
367 'grouping' => 'priceset-fields',
369 'price_field_value_id' => array(
370 'name' => 'price_field_value_id',
371 'title' => ts('Fee Level'),
372 'type' => CRM_Utils_Type
::T_INT
,
373 'operatorType' => CRM_Report_Form
::OP_MULTISELECT
,
374 'options' => $this->getPriceLevels(),
380 $this->_options
= array(
381 'blank_column_begin' => array(
382 'title' => ts('Blank column at the Begining'),
383 'type' => 'checkbox',
385 'blank_column_end' => array(
386 'title' => ts('Blank column at the End'),
389 '' => ts('-select-'),
397 // CRM-17115 avoid duplication of sort_name - would be better to standardise name
398 // & behaviour across reports but trying for no change at this point.
399 $this->_columns
['civicrm_contact']['fields']['sort_name']['no_display'] = TRUE;
401 // If we have active campaigns add those elements to both the fields and filters
402 if ($campaignEnabled && !empty($this->activeCampaigns
)) {
403 $this->_columns
['civicrm_participant']['fields']['campaign_id'] = array(
404 'title' => ts('Campaign'),
405 'default' => 'false',
407 $this->_columns
['civicrm_participant']['filters']['campaign_id'] = array(
408 'title' => ts('Campaign'),
409 'operatorType' => CRM_Report_Form
::OP_MULTISELECT
,
410 'options' => $this->activeCampaigns
,
411 'type' => CRM_Utils_Type
::T_INT
,
413 $this->_columns
['civicrm_participant']['order_bys']['campaign_id'] = array(
414 'title' => ts('Campaign'),
418 $this->_currencyColumn
= 'civicrm_participant_fee_currency';
419 parent
::__construct();
423 * Searches database for priceset values.
427 public function getPriceLevels() {
429 SELECT CONCAT(cv.label, ' (', ps.title, ' - ', cf.label , ')') label, cv.id
430 FROM civicrm_price_field_value cv
431 LEFT JOIN civicrm_price_field cf
432 ON cv.price_field_id = cf.id
433 LEFT JOIN civicrm_price_set_entity ce
434 ON ce.price_set_id = cf.price_set_id
435 LEFT JOIN civicrm_price_set ps
436 ON ce.price_set_id = ps.id
437 WHERE ce.entity_table = 'civicrm_event'
440 $dao = CRM_Core_DAO
::executeQuery($query);
442 while ($dao->fetch()) {
443 $elements[$dao->id
] = "$dao->label\n";
449 public function preProcess() {
450 parent
::preProcess();
453 public function select() {
455 $this->_columnHeaders
= array();
457 //add blank column at the Start
458 if (array_key_exists('options', $this->_params
) &&
459 !empty($this->_params
['options']['blank_column_begin'])
461 $select[] = " '' as blankColumnBegin";
462 $this->_columnHeaders
['blankColumnBegin']['title'] = '_ _ _ _';
464 foreach ($this->_columns
as $tableName => $table) {
465 if (array_key_exists('fields', $table)) {
466 foreach ($table['fields'] as $fieldName => $field) {
467 if (!empty($field['required']) ||
468 !empty($this->_params
['fields'][$fieldName])
470 if ($tableName == 'civicrm_contribution') {
471 $this->_contribField
= TRUE;
473 if ($fieldName == 'total_paid' ||
$fieldName == 'balance') {
474 $this->_balance
= TRUE;
475 // modify the select if filtered by fee_level as the from clause
476 // already selects the total_amount from civicrm_contribution table
477 if (!empty($this->_params
['price_field_value_id_value'])) {
478 $field['dbAlias'] = str_replace('SUM(ft.total_amount)', 'ft.total_amount', $field['dbAlias']);
481 $alias = "{$tableName}_{$fieldName}";
482 $select[] = "{$field['dbAlias']} as $alias";
483 $this->_columnHeaders
["{$tableName}_{$fieldName}"]['type'] = CRM_Utils_Array
::value('type', $field);
484 $this->_columnHeaders
["{$tableName}_{$fieldName}"]['no_display'] = CRM_Utils_Array
::value('no_display', $field);
485 $this->_columnHeaders
["{$tableName}_{$fieldName}"]['title'] = CRM_Utils_Array
::value('title', $field);
486 $this->_selectAliases
[] = $alias;
491 //add blank column at the end
492 $blankcols = CRM_Utils_Array
::value('blank_column_end', $this->_params
);
494 for ($i = 1; $i <= $blankcols; $i++
) {
495 $select[] = " '' as blankColumnEnd_{$i}";
496 $this->_columnHeaders
["blank_{$i}"]['title'] = "_ _ _ _";
500 $this->_selectClauses
= $select;
501 $this->_select
= "SELECT " . implode(', ', $select) . " ";
511 public static function formRule($fields, $files, $self) {
512 $errors = $grouping = array();
516 public function from() {
518 FROM civicrm_participant {$this->_aliases['civicrm_participant']}
519 LEFT JOIN civicrm_event {$this->_aliases['civicrm_event']}
520 ON ({$this->_aliases['civicrm_event']}.id = {$this->_aliases['civicrm_participant']}.event_id ) AND
521 {$this->_aliases['civicrm_event']}.is_template = 0
522 LEFT JOIN civicrm_contact {$this->_aliases['civicrm_contact']}
523 ON ({$this->_aliases['civicrm_participant']}.contact_id = {$this->_aliases['civicrm_contact']}.id )
527 $this->joinAddressFromContact();
528 $this->joinPhoneFromContact();
529 $this->joinEmailFromContact();
531 // Include participant note.
532 if ($this->isTableSelected('civicrm_note')) {
534 LEFT JOIN civicrm_note {$this->_aliases['civicrm_note']}
535 ON ( {$this->_aliases['civicrm_note']}.entity_table = 'civicrm_participant' AND
536 {$this->_aliases['civicrm_participant']}.id = {$this->_aliases['civicrm_note']}.entity_id )";
539 if ($this->_contribField
) {
541 LEFT JOIN civicrm_participant_payment pp
542 ON ({$this->_aliases['civicrm_participant']}.id = pp.participant_id)
543 LEFT JOIN civicrm_contribution {$this->_aliases['civicrm_contribution']}
544 ON (pp.contribution_id = {$this->_aliases['civicrm_contribution']}.id)
547 if (!empty($this->_params
['price_field_value_id_value'])) {
549 LEFT JOIN civicrm_line_item line_item_civireport
550 ON line_item_civireport.entity_table = 'civicrm_participant' AND
551 line_item_civireport.entity_id = {$this->_aliases['civicrm_participant']}.id AND
552 line_item_civireport.qty > 0
555 if ($this->_balance
) {
557 LEFT JOIN civicrm_entity_financial_trxn eft
558 ON (eft.entity_id = {$this->_aliases['civicrm_contribution']}.id)
559 LEFT JOIN civicrm_financial_trxn ft
560 ON (ft.id = eft.financial_trxn_id AND eft.entity_table = 'civicrm_contribution') AND
566 public function where() {
568 foreach ($this->_columns
as $tableName => $table) {
569 if (array_key_exists('filters', $table)) {
570 foreach ($table['filters'] as $fieldName => $field) {
573 if (CRM_Utils_Array
::value('type', $field) & CRM_Utils_Type
::T_DATE
) {
574 $relative = CRM_Utils_Array
::value("{$fieldName}_relative", $this->_params
);
575 $from = CRM_Utils_Array
::value("{$fieldName}_from", $this->_params
);
576 $to = CRM_Utils_Array
::value("{$fieldName}_to", $this->_params
);
578 if ($relative ||
$from ||
$to) {
579 $clause = $this->dateClause($field['name'], $relative, $from, $to, $field['type']);
583 $op = CRM_Utils_Array
::value("{$fieldName}_op", $this->_params
);
585 if ($fieldName == 'rid') {
586 $value = CRM_Utils_Array
::value("{$fieldName}_value", $this->_params
);
587 if (!empty($value)) {
589 if ($op == 'notin') {
593 $regexp = "[[:cntrl:]]*" . implode('[[:>:]]*|[[:<:]]*', $value) . "[[:cntrl:]]*";
594 $clause = "{$field['dbAlias']} {$operator} REGEXP '{$regexp}'";
600 $clause = $this->whereClause($field,
602 CRM_Utils_Array
::value("{$fieldName}_value", $this->_params
),
603 CRM_Utils_Array
::value("{$fieldName}_min", $this->_params
),
604 CRM_Utils_Array
::value("{$fieldName}_max", $this->_params
)
609 if (!empty($clause)) {
610 $clauses[] = $clause;
615 if (empty($clauses)) {
616 $this->_where
= "WHERE {$this->_aliases['civicrm_participant']}.is_test = 0 ";
619 $this->_where
= "WHERE {$this->_aliases['civicrm_participant']}.is_test = 0 AND " .
620 implode(' AND ', $clauses);
622 if ($this->_aclWhere
) {
623 $this->_where
.= " AND {$this->_aclWhere} ";
627 public function groupBy() {
628 $this->_groupBy
= CRM_Contact_BAO_Query
::getGroupByFromSelectColumns($this->_selectClauses
, "{$this->_aliases['civicrm_participant']}.id");
631 public function postProcess() {
632 // get the acl clauses built before we assemble the query
633 $this->buildACLClause($this->_aliases
['civicrm_contact']);
634 parent
::postProcess();
647 private function _initBasicRow(&$rows, &$entryFound, $row, $rowId, $rowNum, $types) {
648 if (!array_key_exists($rowId, $row)) {
652 $value = $row[$rowId];
654 $rows[$rowNum][$rowId] = $types[$value];
660 * Alter display of rows.
662 * Iterate through the rows retrieved via SQL and make changes for display purposes,
663 * such as rendering contacts as links.
666 * Rows generated by SQL, with an array for each row.
668 public function alterDisplay(&$rows) {
670 $eventType = CRM_Core_OptionGroup
::values('event_type');
672 $financialTypes = CRM_Contribute_PseudoConstant
::financialType();
673 $contributionStatus = CRM_Contribute_PseudoConstant
::contributionStatus();
674 $paymentInstruments = CRM_Contribute_PseudoConstant
::paymentInstrument();
676 foreach ($rows as $rowNum => $row) {
677 // make count columns point to detail report
678 // convert display name to links
679 if (array_key_exists('civicrm_participant_event_id', $row)) {
680 $eventId = $row['civicrm_participant_event_id'];
682 $rows[$rowNum]['civicrm_participant_event_id'] = CRM_Event_PseudoConstant
::event($eventId, FALSE);
684 $url = CRM_Report_Utils_Report
::getNextUrl('event/income',
685 'reset=1&force=1&id_op=in&id_value=' . $eventId,
686 $this->_absoluteUrl
, $this->_id
, $this->_drilldownReport
688 $rows[$rowNum]['civicrm_participant_event_id_link'] = $url;
689 $rows[$rowNum]['civicrm_participant_event_id_hover'] = ts("View Event Income Details for this Event");
694 // handle event type id
695 $this->_initBasicRow($rows, $entryFound, $row, 'civicrm_event_event_type_id', $rowNum, $eventType);
697 // handle participant status id
698 if (array_key_exists('civicrm_participant_status_id', $row)) {
699 $statusId = $row['civicrm_participant_status_id'];
701 $rows[$rowNum]['civicrm_participant_status_id'] = CRM_Event_PseudoConstant
::participantStatus($statusId, FALSE, 'label');
706 // handle participant role id
707 if (array_key_exists('civicrm_participant_role_id', $row)) {
708 $roleId = $row['civicrm_participant_role_id'];
710 $roles = explode(CRM_Core_DAO
::VALUE_SEPARATOR
, $roleId);
712 foreach ($roles as $role) {
713 $roleId[$role] = CRM_Event_PseudoConstant
::participantRole($role, FALSE);
715 $rows[$rowNum]['civicrm_participant_role_id'] = implode(', ', $roleId);
720 // Handel value seperator in Fee Level
721 if (array_key_exists('civicrm_participant_participant_fee_level', $row)) {
722 $feeLevel = $row['civicrm_participant_participant_fee_level'];
724 CRM_Event_BAO_Participant
::fixEventLevel($feeLevel);
725 $rows[$rowNum]['civicrm_participant_participant_fee_level'] = $feeLevel;
730 // Convert display name to link
731 $displayName = CRM_Utils_Array
::value('civicrm_contact_sort_name_linked', $row);
732 $cid = CRM_Utils_Array
::value('civicrm_contact_id', $row);
733 $id = CRM_Utils_Array
::value('civicrm_participant_participant_record', $row);
735 if ($displayName && $cid && $id) {
736 $url = CRM_Report_Utils_Report
::getNextUrl('contact/detail',
737 "reset=1&force=1&id_op=eq&id_value=$cid",
738 $this->_absoluteUrl
, $this->_id
, $this->_drilldownReport
741 $viewUrl = CRM_Utils_System
::url("civicrm/contact/view/participant",
742 "reset=1&id=$id&cid=$cid&action=view&context=participant"
745 $contactTitle = ts('View Contact Details');
746 $participantTitle = ts('View Participant Record');
748 $rows[$rowNum]['civicrm_contact_sort_name_linked'] = "<a title='$contactTitle' href=$url>$displayName</a>";
749 // Add a "View" link to the participant record if this isn't a CSV/PDF/printed document.
750 if ($this->_outputMode
!== 'csv' && $this->_outputMode
!== 'pdf' && $this->_outputMode
!== 'print') {
751 $rows[$rowNum]['civicrm_contact_sort_name_linked'] .=
752 "<span style='float: right;'><a title='$participantTitle' href=$viewUrl>" .
753 ts('View') . "</a></span>";
758 // Handle employer id
759 if (array_key_exists('civicrm_contact_employer_id', $row)) {
760 $employerId = $row['civicrm_contact_employer_id'];
762 $rows[$rowNum]['civicrm_contact_employer_id'] = CRM_Contact_BAO_Contact
::displayName($employerId);
763 $url = CRM_Utils_System
::url('civicrm/contact/view',
764 'reset=1&cid=' . $employerId, $this->_absoluteUrl
766 $rows[$rowNum]['civicrm_contact_employer_id_link'] = $url;
767 $rows[$rowNum]['civicrm_contact_employer_id_hover'] = ts('View Contact Summary for this Contact.');
771 // Convert campaign_id to campaign title
772 $this->_initBasicRow($rows, $entryFound, $row, 'civicrm_participant_campaign_id', $rowNum, $this->activeCampaigns
);
774 // handle contribution status
775 $this->_initBasicRow($rows, $entryFound, $row, 'civicrm_contribution_contribution_status_id', $rowNum, $contributionStatus);
777 // handle payment instrument
778 $this->_initBasicRow($rows, $entryFound, $row, 'civicrm_contribution_payment_instrument_id', $rowNum, $paymentInstruments);
780 // handle financial type
781 $this->_initBasicRow($rows, $entryFound, $row, 'civicrm_contribution_financial_type_id', $rowNum, $financialTypes);
783 $entryFound = $this->alterDisplayContactFields($row, $rows, $rowNum, 'event/participantListing', 'View Event Income Details') ?
TRUE : $entryFound;
785 // display birthday in the configured custom format
786 if (array_key_exists('civicrm_contact_birth_date', $row)) {
787 $birthDate = $row['civicrm_contact_birth_date'];
789 $rows[$rowNum]['civicrm_contact_birth_date'] = CRM_Utils_Date
::customFormat($birthDate, '%Y%m%d');
793 $entryFound = $this->alterDisplayAddressFields($row, $rows, $rowNum, 'event/ParticipantListing', 'List all participant(s) for this ') ?
TRUE : $entryFound;
795 // skip looking further in rows, if first row itself doesn't
796 // have the column we need