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 CiviContribute (Moderator: Donald Lobo) »
  • FYI: Making PCPs aware of recurring contributions.
Pages: [1]

Author Topic: FYI: Making PCPs aware of recurring contributions.  (Read 667 times)

nkinkade

  • I post occasionally
  • **
  • Posts: 56
  • Karma: 5
FYI: Making PCPs aware of recurring contributions.
December 24, 2009, 11:07:51 am
I'm posting this here just in case it might be of interest to anyone else.  I just manually entered into the DB a soft contribution for a given PCP.  As it turns out the contribution was part of a recurring contribution.  I entered $2000 into civicrm_contribution_soft.amount but surprised to see that in the thermometer for the PCP it was showing up as $2001.  After investigating I realized that I had patched CRM/Contribute/BAO/PCP.php to be aware of recurring contributions, but had forgot I had done so.  For our purposes we want thermometer totals on PCP to reflect not just the amounts given in a recurring contribution, but the amount pledged.  I share the following patch with everyone in case anyone would like to see the same behavior for PCPs:

http://code.creativecommons.org/viewgit/civicrm.git/commit/?h=cc_production_2.2.7&id=03267ee5688025ef2f5ff5c7faf17e31039a6f05

I'm using ceil() for the total (hence the $2001), but should probably be using round().  That aside, it occurs to me that along with this patch, that this could be a reasonable option to give to the admin of a CiviCRM site with PCPs: whether they want the amount pledged via a recurring contribution to show up in the PCP thermometers rather than just the instalments given to date.

Nathan

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviContribute (Moderator: Donald Lobo) »
  • FYI: Making PCPs aware of recurring contributions.

This forum was archived on 2017-11-26.