Skip to content

Commit

Permalink
Don't include decased contacts systopia#12
Browse files Browse the repository at this point in the history
  • Loading branch information
eptbertram authored Aug 14, 2022
1 parent 258dcce commit 13b541e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion CRM/Birthdays/Form/Report/Birthdays.php
Original file line number Diff line number Diff line change
Expand Up @@ -223,8 +223,9 @@ function where() {
// only contacts with birthdays
$clauses[] = "({$this->_aliases['civicrm_contact']}.birth_date IS NOT NULL)";

// no deleted contacts (see https://github.com/systopia/de.systopia.birthdays/issues/10)
// no deleted or deceased contacts (see https://github.com/systopia/de.systopia.birthdays/issues/10)
$clauses[] = "(({$this->_aliases['civicrm_contact']}.is_deleted IS NULL) OR ({$this->_aliases['civicrm_contact']}.is_deleted = 0))";
$clauses[] = "({$this->_aliases['civicrm_contact']}.is_deceased != 1)";

$this->_where = "WHERE " . implode(' AND ', $clauses);

Expand Down

0 comments on commit 13b541e

Please sign in to comment.