Skip to content

Commit

Permalink
fixed #10
Browse files Browse the repository at this point in the history
  • Loading branch information
bjendres committed Nov 7, 2017
1 parent 61c6db6 commit b1719d6
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
7 changes: 5 additions & 2 deletions CRM/Birthdays/Form/Report/Birthdays.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

/**
* Report on upcoming birthdays
*
*
* loosely based on https://stackoverflow.com/questions/18747853/mysql-select-upcoming-birthdays#18748008
*/
class CRM_Birthdays_Form_Report_Birthdays extends CRM_Report_Form {
Expand All @@ -28,7 +28,7 @@ class CRM_Birthdays_Form_Report_Birthdays extends CRM_Report_Form {

protected $_customGroupExtends = NULL;

protected $_customGroupGroupBy = FALSE;
protected $_customGroupGroupBy = FALSE;


function __construct() {
Expand Down Expand Up @@ -211,6 +211,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)
$clauses[] = "(({$this->_aliases['civicrm_contact']}.is_deleted IS NULL) OR ({$this->_aliases['civicrm_contact']}.is_deleted = 0))";

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

if ($this->_aclWhere) {
Expand Down
4 changes: 2 additions & 2 deletions info.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
<url desc="Support">https://github.com/systopia/de.systopia.birthdays</url>
<url desc="Licensing">http://www.gnu.org/licenses/agpl-3.0.html</url>
</urls>
<releaseDate>2017-03-10</releaseDate>
<version>1.1</version>
<releaseDate>2017-11-07</releaseDate>
<version>1.2.alpha1</version>
<develStage>testing</develStage>
<compatibility>
<ver>4.6</ver>
Expand Down

0 comments on commit b1719d6

Please sign in to comment.