Fix for CRM-16857
authorWeb Access <rohan.katkar@webaccessglobal.com>
Tue, 21 Jul 2015 14:25:36 +0000 (19:55 +0530)
committerWeb Access <rohan.katkar@webaccessglobal.com>
Tue, 21 Jul 2015 14:25:36 +0000 (19:55 +0530)
CRM/Member/BAO/Membership.php

index 31e293d5e5c2f5cb42a11e82d83c82a1107ba330..edbe3ad0da6aff6343b7ec82c64d498fe55c1348 100644 (file)
@@ -1909,6 +1909,10 @@ WHERE  civicrm_membership.contact_id = civicrm_contact.id
         // we should not created contribution record for related contacts, CRM-3371
         unset($params['contribution_status_id']);
 
+        //CRM-16857: Do not create multiple line-items for inherited membership through priceset.
+        unset($params['lineItems']);
+        unset($params['line_item']);
+
         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);