progressivetech / net.ourpowerbase.sumfields

The Summary Fields extension creates read-only custom data fields that extend Contact and are automatically populated with up-to-date totals such as total lifetime contributions, last contribution amount, last attended event, etc.
Other
8 stars 29 forks source link

Event Registrations with Multiple Price Fields #74

Closed cmmadmin closed 4 years ago

cmmadmin commented 4 years ago

CiviCRM 5.24.5 Summary Fields 4.0.2

When multiple price fields used for event registrations, then total amount appears to be included in Summary Fields:Total Lifetime Contributions even though we have removed one of the Financial Types in the Summary Fields settings. We have a CiviCRM contact that has a contribution for and event registration which was paid using two Financial Types named "GMC Event" and "GMC Subsidy". We used a price set for the event which included two price fields - one for the event fee ("GMC Event") and one for a donation ("GMC Subsidy").

In the Summary Fields settings Fundraising section, when we removed "GMC Event" from the Financial Type list we expected to see the Total Lifetime Contributions reduce to the amount of the GMC Subsidy donations ($85), but instead we still saw the total amount in Total Lifetime Contributions ($1250) which includes both the "GMC Event" and "GMC Subsidy" price fields.

When we removed both "GMC Event" and "GMC Subsidy" in the Summary Fields settings, then the Total Lifetime Contributions reduced to $0.

Does Summary Fields not respect Financial Types that are included as Price Fields in a Price Set? We would like to exclude payment for event fees from the Summary Field Fundraising data.

jmcclelland commented 4 years ago

Are you using Total Lifetime Contributions or Total Lifetime Contributions (Simplified)?

The simplified query ignores line items and only checks the financial type assigned to the contribution record itself. The other query should respect financial types as assigned to the line items.

cmmadmin commented 4 years ago

I do not see a Total Lifetime Contributions (Simplified) field anywhere, so it looks like we are using Total Lifetime Contributions

On the Summary Fields Administration page, I see these fields:

image

On a CiviCRM contact page under Summary Fields, I see these fields:

image

In the database in the civicrm_value_summary_field_45 table I see these fields:

image

cmmadmin commented 4 years ago

In case it's helpful, here's how we setup the Price Fields for the test case we mentioned above.

image

The user selected GMC 2019 Regular for the event fee, which you can see here was applied to the "GMC Event" financial type.

image

And the user selected GMC Donate for a donation, which you can see here was applied to the "GMC Subsidy" financial type.

image

We have marked Tax-Deductible = TRUE for "GMC Subsidy" and Tax-Deductible = FALSE for "GMC Event" in the financial type settings.

Our preference would be to have an option in the Summary Fields settings to select All Financial Types with Tax-Deductible = TRUE instead of having to manually add each financial type. This would make it possible for us to track all tax-deductible donations and ignore taxed payments/purchases with less management of the settings as we add and remove financial types (which we do often).

jmcclelland commented 4 years ago

Sorry for the delay! It looks like it has been a while since I've made a release and bunch of bugs have been fixed (including ones related to line items). Can you try switching to the most recent version in git? If you need help with that, let me know.

cmmadmin commented 4 years ago

I updated to the latest from Git and it has fixed this issue. Thank you! Will this be deployed to the CiviCRM Extension Directory?