Details
-
Type: Bug
-
Status: Done/Fixed
-
Priority: Critical
-
Resolution: Fixed/Completed
-
Affects Version/s: 4.7.14, 4.7.15
-
Fix Version/s: 4.7.17
-
Component/s: None
-
Labels:
-
Versioning Impact:Patch (backwards-compatible bug fixes)
-
Documentation Required?:None
-
Funding Source:Contributed Code
-
Verified?:No
Description
Step to replicate
1. Create a price set with multiple price fields or options that minimally include membership type options for more than one organization i.e user should able to purchase more than 2 memberships from different organizations.
2. Assign the price set to Contribution page
Do a membership purchase or renew membership using contribution page. We are checking for backoffice purchase using the price set, expecting it too will have same problem and will be solved by same fix.
Once the membership is purchased view the contribution. You will notice the line items are not matched with the actual line items selected during purchase.
There is an extra line item that replicates a) the price_field_id for the first membership and b) the membership_id of the second membership price_field. There are also related entries for the extra line item in the financial_item and entity_financial_trxn table.
Fix: initialize array for membershipLineItems at appropriate place in code. Create upgrade script to repair databases by removing duplicated entries in civicrm_line_item, civicrm_financial_item, and civicrm_entity_financial_trxn tables.