Skip to content

don't crash if no contributions

DaveD requested to merge DaveD/cdntaxreceipts:agg-crash into master

One way to reproduce this is

  1. Turn on "in-kind" in the settings.
  2. Make an in-kind contribution.
  3. Do find contributions with criteria financial type "In-kind".
  4. Select the contribution and choose Combined Receipts from the actions dropdown.
  5. Crash.

Background info: In the case of in-kind, you can't do aggregate receipting because each contribution will have its own appraisal info that needs to be output on the receipt separately.

So what's happening is that because it filters those out, it doesn't compute any years to populate the year radio, so there is no year field assigned to the form, so when it tries to add a formrule for it it crashes.

Instead this gives a proper error message.

Merge request reports