CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviMail (Moderator: Piotr Szotkowski) »
  • Year to date total in thank you letters
Pages: [1]

Author Topic: Year to date total in thank you letters  (Read 620 times)

John Richardson

  • I post occasionally
  • **
  • Posts: 57
  • Karma: 0
    • Life Challenge of Southeastern Michigan
  • CiviCRM version: 4.5.4
  • CMS version: Drupal 7.x
  • MySQL version: 5.5.27
  • PHP version: 5.3.13
Year to date total in thank you letters
January 17, 2013, 09:18:02 am
Does anyone know if it is possible to place a token for a year-to-date total of contributions in a thank you letter? My organization has always been able to do this with Access when we used it. Our donors are used to this service. It's just a calculation like any other, shouldn't there be a token for it so we can send out hundred of thank you's at a time that indicate not only the most recent contribution but also a tally of contributions to date?

Any thoughts on this would be greatly appreciated!
John Richardson

samuelsov

  • I post occasionally
  • **
  • Posts: 45
  • Karma: 2
    • Coop SymbioTIC
  • CiviCRM version: 3.x, 4.x
  • CMS version: Drupal 6 & 7
Re: Year to date total in thank you letters
January 17, 2013, 11:40:40 am
There is a module that nearly do what you want : https://github.com/samuelsov/civicrm_contrib_pdf_letter
Some of it is in CiviCRM Core since CiviCRM 4.2 - cf. http://issues.civicrm.org/jira/browse/CRM-9998

The part which is not yet in core is the grouping. In the civicrm_contrib_pdf_letter, I've done it for my specific use case (grouping recurring payments together) but there was the idea to make it more generic and to be able to add some grouping token with a hook.

Right now, If you want to do this, you could take civicrm_contrib_pdf_letter module :
* change PDFLetterCommon.php and replace recurId by contactId (grouping every contribution from one contact)
* change PDFLetter.php group_recurring_contribution label

The token total_amount is already there and if you check "Group by ...", it will aggregate the total of each contribution.
The user have to select all contributions of the year in the contribution search and select them before doing the pdf letters.
Consultant @ SymbioTIC.coop

samuelsov

  • I post occasionally
  • **
  • Posts: 45
  • Karma: 2
    • Coop SymbioTIC
  • CiviCRM version: 3.x, 4.x
  • CMS version: Drupal 6 & 7
Re: Year to date total in thank you letters
January 17, 2013, 11:43:50 am
I see that you use WordPress, so first step will be to convert the Drupal module to an CiviCRM extension. It should be quite easy as there is no Drupal specific code in it.
Consultant @ SymbioTIC.coop

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviMail (Moderator: Piotr Szotkowski) »
  • Year to date total in thank you letters

This forum was archived on 2017-11-26.