-
-
Notifications
You must be signed in to change notification settings - Fork 814
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
dev/core#756 - CRM/Contribute - Fix multi-currency soft credit summary #13711
dev/core#756 - CRM/Contribute - Fix multi-currency soft credit summary #13711
Conversation
(Standard links)
|
1f7d6f0
to
fbcdfde
Compare
@pfigel My only concern here is using |
@mattwire definitely agree with the sentiment. I went with this approach because:
(tl;dr: it sucks, but in a consistent way 😄) Maybe we can use this fix to deal with the regression, and then later on do a bit of refactoring for the whole contribution summary thing where we move the presentation stuff out of BAO. |
This fixes an exception caused by multiple currencies being passed to CRM_Utils_Money::format. It also resolves some inconsistencies in how the summary table is rendered for soft credits.
fbcdfde
to
d9c8c3c
Compare
I tested this & was able to replicate the bug & see this fixes it - merging |
@pfigel Agreed :-) |
Overview
This attempts to fix the multi-currency soft credit bug reported in dev/core#756 and some inconsistencies.
Before
Viewing the contribution tab of a contact with soft credits in multiple currencies causes an exception.
After
Soft credits with multiple currencies don't cause an exception and the soft credit summary is rendered more similar to the contribution summary.
Technical Details
This changes the return value signature of
CRM_Contribute_BAO_ContributionSoft::getSoftContributionTotals()
. Looks like it's only used by one method which I adapted, but I'm not sure what the approach to backwards-compatibility is for something like that. Could also go with new method + deprecation.