Details
-
Type: Bug
-
Status: Done/Fixed
-
Priority: Trivial
-
Resolution: Fixed/Completed
-
Affects Version/s: 4.2.7, 4.3.0
-
Fix Version/s: 4.2.8
-
Component/s: CiviReport
-
Labels:None
Description
The Contribution and Membership Details report shows contributions and their associated membership records. The report is hard-coded to group by contact and contribution IDs, but each contribution may have many memberships associated with it. If that happens, the total amount of all membership fees is multiplied by the number of memberships since the total_amount field is set as a sum.
As an example, say someone signs up for memberships A and B. A costs $100 and B costs $150. Their total contribution will be $250. In the report, since there's a join to the membership payment table, before grouping there will be two rows for the contribution, and the sum will be $500 when grouped by contribution.
This patch gets rid of the sum because it is grouped by contribution ID regardless.