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) »
  • How to link existing contributions to a Pledge
Pages: [1]

Author Topic: How to link existing contributions to a Pledge  (Read 1217 times)

Kumar

  • I’m new here
  • *
  • Posts: 5
  • Karma: 0
  • CiviCRM version: 4.1
  • CMS version: Drupal 7.16
  • MySQL version: DK
  • PHP version: DK
How to link existing contributions to a Pledge
December 25, 2012, 02:41:31 pm
Thank you CIVICRM!

We have successfully moved from legacy system to CiviCRM. We are using CiviCRM 4.1 with Drupal 7.
We imported the contribution data from the legacy system to CiviCRM.

We have users pledged for some amount and some are previously paid off and some others have outstanding balance.
The issue (or my ignorance  ??? ) is that we are trying to link contributions to the pledges.

Create a Pledge w/ Contribution type -> Find an Existing contribution of a contact for same contribution type -> ?? How can I link these two now?

Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: How to link existing contributions to a Pledge
December 26, 2012, 09:34:05 am
Not sure what the best approach will be for you, but some thoughts ...

You can link contributions as "pledge payments" to existing Pledge records when you import the contributions. Import needs to include 2 columns - a yes/no column indicating that the row is a pledge payment, and a column containing the ID of the related pledge. This is not really documented formally - but described in the issue tracker: http://issues.civicrm.org/jira/browse/CRM-3968

There is no way to import pledges so these would have to exist in the DB already. Pretty sure you can use Find Pledges > Export action to output the pledge id's.

Given that your contributions are already imported (?) - you might be able to use Update mode on Import Contributions and pass in the contribution ID plus the 2 pledge fields. I'd try this on a test copy of your DB first.
Protect your investment in CiviCRM by  becoming a Member!

Jason W

  • I post frequently
  • ***
  • Posts: 197
  • Karma: 12
  • jason@civitrainingtutorials.com
  • CiviCRM version: 4.2
  • CMS version: Drupal 7
  • MySQL version: 5.x
  • PHP version: 5.x.x
Re: How to link existing contributions to a Pledge
December 27, 2012, 01:18:59 pm
Hello Pramod and Dave,

Tested and found that if you Find Pledges and export, you can get the Pledge ID only if you tick the Select fields for export option. Exporting primary fields does just that... Name Email address, etc.

Cheers,
Jason
civiTrainingTutorials
"Helping You Help Others"

Kumar

  • I’m new here
  • *
  • Posts: 5
  • Karma: 0
  • CiviCRM version: 4.1
  • CMS version: Drupal 7.16
  • MySQL version: DK
  • PHP version: DK
Re: How to link existing contributions to a Pledge
December 27, 2012, 02:22:56 pm
@Dave, Thanks for your thoughts.
We have already imported contributions into CiviCRM. As of now we do not have any pledges in CiviCRM only. But we do have users pledge for some items in our organization and we want to show a user's pledge information in his dashboard, contact record etc .
If I understand you correctly, one option you suggested was to create the Pledge types and then import the data again with additional two columns indicating if a contribution is for a pledge. I am afraid that might not be possible now or might involve lot of work.

One option we thought of doing was to :
-> Create all the pledge types in CiviCRM.
-> Find a contact and add a pledge
-> From data that has been already imported, for each contribution record related to a pledge, record a new payment with same amount and date etc for the respective pledge and delete the contribution.
That way, the total amount of contribution stays same and the pledge information is also displayed.

Is there a better way to do this?
I was hoping for something like:
1. Find a Contact and ADD pledge record
2. Now find a contribution for the same contact and say that contribution is for one of the pledges on his record.

@Jason, I am sorry but I did not get you.

Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: How to link existing contributions to a Pledge
December 27, 2012, 04:08:21 pm
I don't think you can link an existing contribution to a pledge (as a pledge payment) via the UI. Once you've added the Pledges, you could potentially link contributions to the pledge_payment records via DB update queries. You'd need to set civicrm_pledge_payment.contribution_id to the id (primary key) of contribution that represents the actual payment.

Else, your method (record new payment, delete old contribution) should work.
Protect your investment in CiviCRM by  becoming a Member!

Kumar

  • I’m new here
  • *
  • Posts: 5
  • Karma: 0
  • CiviCRM version: 4.1
  • CMS version: Drupal 7.16
  • MySQL version: DK
  • PHP version: DK
Re: How to link existing contributions to a Pledge
December 31, 2012, 07:59:56 am
Thanks Dave,
Will try to do it using DB update queries on a test env and let you know.

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviContribute (Moderator: Donald Lobo) »
  • How to link existing contributions to a Pledge

This forum was archived on 2017-11-26.