Skip to content

Commit

Permalink
Handle current memberships with no end date (life members)
Browse files Browse the repository at this point in the history
  • Loading branch information
mattwire committed Nov 30, 2020
1 parent 2a08054 commit 2855ed2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion CRM/Membershipchurnchart/Utils.php
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ public static function insertDataIntoChurnTable($year, $month) {
SELECT {$year}, {$month}, m.id, m.membership_type_id, 1 FROM civicrm_membership m
INNER JOIN civicrm_contact c ON m.contact_id = c.id
WHERE c.is_deleted = 0
AND join_date < '{$startDate}' AND end_date > '{$endDate}'";
AND join_date < '{$startDate}' AND (end_date > '{$endDate}' OR end_date IS NULL)";
CRM_Core_DAO::executeQuery($carryForwardSql);

// Joined
Expand Down

0 comments on commit 2855ed2

Please sign in to comment.