Contribution saved as eligible although the declaration was negative
In some tests, the extension performed different than I expected in terms of what it saved in the contribution eligibility. A new contact sent a contribution saying no to Gift Aid, this occurred:
- the contact was created and a new Gift Aid declaration is added to the contact record,
- the declaration has a clear no, as expected,
- but the corresponding contribution is created with a yes instead.
This was due to the fact that the contribution will store:
- 1 (yes) if the site has the option "all financial types are eligible for Gift Aid"
- 1 (yes) if the financial type of the contribution is set for Gift Aid eligibility
What I was expecting, instead, was:
- if the Gift Aid eligibility chosen by the contact was 1 or 3 (yes):
- if the contribution belongs to an eligible financial type, it will store a yes
- if the contribution belongs to a non-eligible financial type, it will store a no
- if the Gift Aid eligibility chosen by the contact was 0 (no):
- regardless of its financial type, a no will be saved
Is this an intentioned behaviour? I haven't started preparing any merge request because I need to make sure I understand first how the extension is meant to work.