Skip to content

Commit

Permalink
Merge pull request #15251 from yashodha/report_cleanup
Browse files Browse the repository at this point in the history
CRM-21677 - report clean up for participant reports
  • Loading branch information
eileenmcnaughton authored Sep 9, 2019
2 parents e130ce9 + 3da34b7 commit 171a505
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 25 deletions.
18 changes: 1 addition & 17 deletions CRM/Report/Form/Event/ParticipantListCount.php
Original file line number Diff line number Diff line change
Expand Up @@ -599,23 +599,7 @@ public function alterDisplay(&$rows) {
$entryFound = TRUE;
}

//handle gender
if (array_key_exists('civicrm_contact_gender_id', $row)) {
if ($value = $row['civicrm_contact_gender_id']) {
$gender = CRM_Core_PseudoConstant::get('CRM_Contact_DAO_Contact', 'gender_id');
$rows[$rowNum]['civicrm_contact_gender_id'] = $gender[$value];
}
$entryFound = TRUE;
}

// display birthday in the configured custom format
if (array_key_exists('civicrm_contact_birth_date', $row)) {
$birthDate = $row['civicrm_contact_birth_date'];
if ($birthDate) {
$rows[$rowNum]['civicrm_contact_birth_date'] = CRM_Utils_Date::customFormat($birthDate, '%Y%m%d');
}
$entryFound = TRUE;
}
$entryFound = $this->alterDisplayContactFields($row, $rows, $rowNum, NULL, NULL) ? TRUE : $entryFound;

// skip looking further in rows, if first row itself doesn't
// have the column we need
Expand Down
8 changes: 0 additions & 8 deletions CRM/Report/Form/Event/ParticipantListing.php
Original file line number Diff line number Diff line change
Expand Up @@ -761,14 +761,6 @@ public function alterDisplay(&$rows) {

$entryFound = $this->alterDisplayContactFields($row, $rows, $rowNum, 'event/participantListing', 'View Event Income Details') ? TRUE : $entryFound;

// display birthday in the configured custom format
if (array_key_exists('civicrm_contact_birth_date', $row)) {
$birthDate = $row['civicrm_contact_birth_date'];
if ($birthDate) {
$rows[$rowNum]['civicrm_contact_birth_date'] = CRM_Utils_Date::customFormat($birthDate, '%Y%m%d');
}
$entryFound = TRUE;
}
$entryFound = $this->alterDisplayAddressFields($row, $rows, $rowNum, 'event/ParticipantListing', 'List all participant(s) for this ') ? TRUE : $entryFound;

// skip looking further in rows, if first row itself doesn't
Expand Down

0 comments on commit 171a505

Please sign in to comment.