Details
-
Type: Sub-task
-
Status: Done/Fixed
-
Priority: Major
-
Resolution: Fixed/Completed
-
Affects Version/s: 4.4.0
-
Fix Version/s: 4.4.0
-
Component/s: CiviReport
-
Labels:None
Description
Summary
=======
Modify the Contribution Details report to provide the option to include soft credit data. This data can be included in two different ways:
1. A 'blob' of data injected in a Soft Credits cell in the contribution row.
2. The option to display a separate row for each soft credit (which you can think of as a "pseudo-contribution") where the column values are derived from a combination of the contribution object, the soft credit object and the contact object (soft credit contact values)
NOTE: We want to implement this same enhancement for SYBUNT and LYBUNT report - so hopefully we can implement these changes in a way that can be easily rolled into these other 'detail'report. We also want to come up with a design for including soft credit data in aggregate data in the Contribution Summary report (this will be filed as a separate issue).
Implementation
============
1. Add Display Column checkbox 'options' for:
[ x ] Contribution ID
[ x ] Contribution or Soft Credit?
[ x ] Soft Credits
[ x ] Soft Credit For
'Contribution ID' column always contains the civicrm_contribution.id value and links to 'view contribution' page.
'Contribution or Soft Credit?' column displays 'Contribution' for contribution rows and 'Soft Credit' for soft credit rows.
'Soft Credits' column displays a blob of markup with a separate "line" for each soft credit associated with the contribution row (soft credit name: soft credit amount) - see mockup attached. This column is empty for soft credit rows.
'Soft Credit For' contains soft credit name - linked to contact/view page. This column is empty for contribution rows (only populated for soft credit rows).
2. Add new dropdown singleton 'select' in the Filters section with 3 options:
Include [ Contributions Only ]
[ Soft Credits Only ]
[ Both ]
Contributions Only option - 1 row for each contribution matching the filters (this is current behavior)
Soft Credits Only - 1 row for each soft credit which is linked to the set of contribution rows which match the filters
Both -
3. Statistics -
"Rows" - can show either count of all rows OR count of contribution rows only (whichever makes sense / requires less hacks)
"Total Amount (Donations)" - sum of contribution row amount columns only (ignore soft credit rows)
"Total Donations" - count of contribution rows only (ignore soft credit rows)
"Average" - sum of contribution row amounts / count of contribution rows (ignore soft credit rows)
4. Export to CSV
This output should include contribution AND / OR soft credit rows as specified by the Include filter.
NOTE: Check the attached screenshot for an example of output when "Include" filter value is "Both", and the other filters match a single contribution which is linked to two soft credit rows. The 1st row is the actual contribution. Rows 2 and 3 are soft credit rows. Soft credit amounts do NOT need to equal the contribution amount (notice in this case the contribution is 800 but the two soft credits total to 900 - this is allowed and valid).