From e53bcaa3d32e31445501f7f000d4776252a34dc8 Mon Sep 17 00:00:00 2001 From: Dave Jenkins Date: Tue, 25 Jul 2017 16:49:13 +0100 Subject: [PATCH] CRM-20966: Do not create membership_payment record for inherited membership. --- CRM/Member/BAO/Membership.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CRM/Member/BAO/Membership.php b/CRM/Member/BAO/Membership.php index 6d206aa137..4f3528908c 100644 --- a/CRM/Member/BAO/Membership.php +++ b/CRM/Member/BAO/Membership.php @@ -1478,6 +1478,9 @@ WHERE civicrm_membership.contact_id = civicrm_contact.id unset($params['lineItems']); unset($params['line_item']); + // CRM-20966: Do not create membership_payment record for inherited membership. + unset($params['relate_contribution_id']); + if (($params['status_id'] == $deceasedStatusId) || ($params['status_id'] == $expiredStatusId)) { // related membership is not active so does not count towards maximum CRM_Member_BAO_Membership::create($params, $relMemIds); -- 2.25.1