Skip to content

Commit

Permalink
CIVICRM-1149: Added column to display if membership is primary or inh…
Browse files Browse the repository at this point in the history
…erited.
  • Loading branch information
agilewarealok authored and agileware-dev committed Mar 1, 2019
1 parent 5d5edb5 commit 4e245d9
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions CRM/Report/Form/Member/Detail.php
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,10 @@ public function __construct() {
'title' => ts('End Date'),
'default' => TRUE,
),
'owner_membership_id' => array(
'title' => ts('Primary/Inherited?'),
'default' => TRUE,
),
'join_date' => array(
'title' => ts('Join Date'),
'default' => TRUE,
Expand Down Expand Up @@ -363,6 +367,12 @@ public function alterDisplay(&$rows) {
$entryFound = TRUE;
}

if (array_key_exists('civicrm_membership_owner_membership_id', $row)) {
$value = $row['civicrm_membership_owner_membership_id'];
$rows[$rowNum]['civicrm_membership_owner_membership_id'] = ($value != '') ? 'Inherited' : 'Primary';
$entryFound = TRUE;
}

// Convert campaign_id to campaign title
if (array_key_exists('civicrm_membership_campaign_id', $row)) {
if ($value = $row['civicrm_membership_campaign_id']) {
Expand Down

0 comments on commit 4e245d9

Please sign in to comment.