From: Dave Jenkins Date: Tue, 25 Jul 2017 15:49:13 +0000 (+0100) Subject: CRM-20966: Do not create membership_payment record for inherited membership. X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=e53bcaa3d32e31445501f7f000d4776252a34dc8;p=civicrm-core.git CRM-20966: Do not create membership_payment record for inherited membership. --- 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);