Fundraising tech/End of year receipt

This is a drupal module that sends an email at the beginning of every year to all donors who have a recurring donation showing all their donations from the previous year.

Scripts

There are three scripts, one to set up the data for the year and two to send the emails.

eoy_receipt_calculate

This takes the year passed in and calculates the recurring information from them and puts it into the drupal db table wmf_eoy_receipt_donor.

When running this in 2021, it caused the civi UI to be slow as well as deadlocks for any running jobs.

eoy_receipt_send

This sends half the emails through frmx1001

eoy_receipt_send_two

This sends the other half of the emails through frmx2001

How to Run


 * 1) There is a drupal variable to set [find the link] for the year you want the module to run for. This is used as the {year} variable in the content of the email sent.
 * 2) Clear out the previous years tables in the drupal db wmf_eoy_receipt_donor and wmf_eoy_receipt_job
 * 3) Turn off all the jobs and notify any civi users that the UI will be slow while the calculate job runs
 * 4) Run eoy_receipt_calculate. This only needs to be run once then everything in in the table for the email sends.
 * 5) Turn the jobs back on
 * 6) Test sending a receipt with slow start
 * 7) Turn the main sending jobs on