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

How can we improve Summary Fields so it accounts for currencies #60

Open jitendrapurohit opened 5 years ago

jitendrapurohit commented 5 years ago

At present, $ and £ are combined and you don't know what is what.

Eg. Contact has made a payment of £100 and $50. The total payment field is displayed as £150.

jmcclelland commented 5 years ago

Uh oh. I hadn't considered a system with multiple currencies. Do you have any suggestions? A simple suggestion would be to add a new field in the preferences allowing you to limit contributions by currency (like you can limit contributions by financial type). That would solve the problem of the total being non-sensical, but it would limit you to totalling just one currency.

petednz commented 5 years ago

I don't think that works for the scenario we are looking at. I had offered Summary Fields as a quick fix for some hard Views that would have needed building. I tripped up by not thinking about currency. Either we will back out of SF and keep using Views (where we are likely to hit similar issues), or we need to add fields for each currency in use for each of the fields they are 'summing'

jmcclelland commented 5 years ago

summary fields is designed to be easily extended. I just re-wrote some of the developer info here:

https://github.com/progressivetech/net.ourpowerbase.sumfields/blob/master/DEVELOPERS.md

You could easily create an extension that adds specific currency restricted summary fields - maybe that would be the best answer?

kenleegit commented 5 years ago

As a contingency, sum up only those contributions in the default currency. It would be useful in my particular use case.

jmcclelland commented 5 years ago

That's a good idea. Are you able to contribute a patch?