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 CiviMember (Moderator: Deepak Srivastava) »
  • Recurring membership payments don't generate a MembershipPayment record?
Pages: [1] 2

Author Topic: Recurring membership payments don't generate a MembershipPayment record?  (Read 1191 times)

JonGold

  • Ask me questions
  • ****
  • Posts: 638
  • Karma: 81
    • Palante Technology
  • CiviCRM version: 4.1 to the latest
  • CMS version: Drupal 6-7, Wordpress 4.0+
  • PHP version: PHP 5.3-5.5
Recurring membership payments don't generate a MembershipPayment record?
August 21, 2014, 03:35:21 pm
This is my first foray into recurring memberships.  I have a client whose Civi was modified by someone outside of the community to generate an entry in civicrm_membership_payment every time a recurring contribution was received.  If you pull up a membership record, you see a history of ALL payments made on that membership.  Sadly, they made that modification by hacking core on Civi 3.4.8; I recently upgraded them to Civi 4.4.6.

Now, I was going to just make an extension that hooks civicrm_post to reimplement this feature, but I wonder - shouldn't this be in core?  Is there a use case where you want to view a membership_payment history for a membership and NOT see all the payments?

If I get the feedback that this belongs in core, I'll try to submit it for Civi 4.6.
Sign up to StackExchange and get free expert CiviCRM advice: https://civicrm.org/blogs/colemanw/get-exclusive-access-free-expert-help

Eileen

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4195
  • Karma: 218
    • Fuzion
Re: Recurring membership payments don't generate a MembershipPayment record?
August 21, 2014, 08:00:47 pm
That feels like it should be in core to me.

Note that in 4.5 we made some changes - in 4.4 the line item has the entity_id on the contribution (for memberships but not participants). In 4.5 the entity_id of the membership is stored. There is an additional contribution_id column in the line_item table. This doesn't directly affect what you are doing except that I would encourage you to test against 4.5 too if you can
Make today the day you step up to support CiviCRM and all the amazing organisations that are using it to improve our world - http://civicrm.org/contribute

civi5

  • I post occasionally
  • **
  • Posts: 39
  • Karma: 3
  • CiviCRM version: 4.1
  • CMS version: Drupal 7
  • MySQL version: MySQL 5
  • PHP version: 5.3.6
Re: Recurring membership payments don't generate a MembershipPayment record?
October 09, 2014, 12:31:01 pm
What is the current status on this bug?  I didnt see anything specific in JIRA.  Is there a bug track issued for this?  I am running on Civi 4.4.6 and we see the same error.  The problem is more profound because all the reports for contribution and membership use the civicrm_membership_payment table to associated all the data.  Since the recurring contributions are not creating a row in the table the reports show no data for the effected contributions. 

Can you link to the JIRA if its submitted.  Thanks

Eileen

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4195
  • Karma: 218
    • Fuzion
Re: Recurring membership payments don't generate a MembershipPayment record?
October 09, 2014, 01:12:20 pm
I'm not aware of a bug - you could search JIRA - https://issues.civicrm.org/jira/secure/Dashboard.jspa - and potentially log one
Make today the day you step up to support CiviCRM and all the amazing organisations that are using it to improve our world - http://civicrm.org/contribute

JonGold

  • Ask me questions
  • ****
  • Posts: 638
  • Karma: 81
    • Palante Technology
  • CiviCRM version: 4.1 to the latest
  • CMS version: Drupal 6-7, Wordpress 4.0+
  • PHP version: PHP 5.3-5.5
Re: Recurring membership payments don't generate a MembershipPayment record?
October 09, 2014, 02:13:08 pm
There is a JIRA issue - https://issues.civicrm.org/jira/browse/CRM-15203

However, after posting this, Joe Murray and dgg and I discussed that MembershipPayments are going to go away in future versions of CiviCRM, so I told them not to merge my commit.  Also - I found a quite serious bug in the PR attached to that ticket - please don't use it!  I ended up replacing the BAO code with DAO code that does the same for my client.  I'll dig that code up real quick for you and post it here and on the ticket.
Sign up to StackExchange and get free expert CiviCRM advice: https://civicrm.org/blogs/colemanw/get-exclusive-access-free-expert-help

JonGold

  • Ask me questions
  • ****
  • Posts: 638
  • Karma: 81
    • Palante Technology
  • CiviCRM version: 4.1 to the latest
  • CMS version: Drupal 6-7, Wordpress 4.0+
  • PHP version: PHP 5.3-5.5
Re: Recurring membership payments don't generate a MembershipPayment record?
October 09, 2014, 02:21:00 pm
Civi5:  Here's a pastebin with a diff of my code which adds a MembershipPayment on recurring payments:
http://pastebin.com/UxLKjDVN

I hope this helps you out!

Jon
Sign up to StackExchange and get free expert CiviCRM advice: https://civicrm.org/blogs/colemanw/get-exclusive-access-free-expert-help

Eileen

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4195
  • Karma: 218
    • Fuzion
Re: Recurring membership payments don't generate a MembershipPayment record?
October 09, 2014, 03:23:48 pm
Jon,

In one sense it would be Ok to merge - well - as long as you used BAO::create to create it - at the moment the line items are appropriately edited within that function I believe.

However, assuming yours is pegged for 4.6 & we will be each doing our own hacks until then I guess by 4.6 hopefully it would be redundant. (my preference would be to 'get it in' along with a unit test so even if the code changes the outcome can't - the test can test the line items)
Make today the day you step up to support CiviCRM and all the amazing organisations that are using it to improve our world - http://civicrm.org/contribute

Eileen

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4195
  • Karma: 218
    • Fuzion
Re: Recurring membership payments don't generate a MembershipPayment record?
October 09, 2014, 03:26:56 pm
Hmm - a slightly bigger issue is that your DBs won't upgrade 'correctly' in 4.5 if the membership payment links are missing. ie. the 4.5 upgrade adds the contribution_id column to line_item AND fixes the entity_id to be the membership - it needs the membership_payment record to do this.
Make today the day you step up to support CiviCRM and all the amazing organisations that are using it to improve our world - http://civicrm.org/contribute

nzampella

  • I post occasionally
  • **
  • Posts: 61
  • Karma: 2
  • CiviCRM version: 4.5.3
  • CMS version: Joomla 3.3.6
  • MySQL version: 5.5.36
  • PHP version: 5.4.31
Re: Recurring membership payments don't generate a MembershipPayment record?
October 30, 2014, 01:53:26 pm
I should have found this one sooner, but I've been having problems with Recurring payments and Memberships.  See: http://forum.civicrm.org/index.php/topic,34454.msg146262.htm

I'm also kinda blindsided with the post above that Membership Payments are going away in a future version of CiviCRM.    One of the reasons I chose this software was because it can handle all the functions needed for online membership payment, tracking, contact, event registration, etc.    I'd appreciate some background as to why this is being considered, or am I misreading that post and its referring to something else.

JonGold

  • Ask me questions
  • ****
  • Posts: 638
  • Karma: 81
    • Palante Technology
  • CiviCRM version: 4.1 to the latest
  • CMS version: Drupal 6-7, Wordpress 4.0+
  • PHP version: PHP 5.3-5.5
Re: Recurring membership payments don't generate a MembershipPayment record?
October 30, 2014, 02:44:32 pm
Membership payments aren't going away - they're being tracked in the underlying database in a better way starting in CiviCRM 4.5.  Instead of treating them as their own special entity, membership payment info is now logged on the line item.
Sign up to StackExchange and get free expert CiviCRM advice: https://civicrm.org/blogs/colemanw/get-exclusive-access-free-expert-help

nzampella

  • I post occasionally
  • **
  • Posts: 61
  • Karma: 2
  • CiviCRM version: 4.5.3
  • CMS version: Joomla 3.3.6
  • MySQL version: 5.5.36
  • PHP version: 5.4.31
Re: Recurring membership payments don't generate a MembershipPayment record?
October 31, 2014, 07:15:39 am
Quote from: JonGold on October 30, 2014, 02:44:32 pm
Membership payments aren't going away - they're being tracked in the underlying database in a better way starting in CiviCRM 4.5.  Instead of treating them as their own special entity, membership payment info is now logged on the line item.

Whew ... thanks for the clarification.    Could this be the reason that recurring membership payments are not being processed?    I've noticed that recurring payments made the last few years processed properly, but it appears that after install of v4.5, they are not.

Eileen

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4195
  • Karma: 218
    • Fuzion
Re: Recurring membership payments don't generate a MembershipPayment record?
October 31, 2014, 08:59:40 am
There is a bug fix in 4.6.3 (due 5 Nov) which may fix that
Make today the day you step up to support CiviCRM and all the amazing organisations that are using it to improve our world - http://civicrm.org/contribute

nzampella

  • I post occasionally
  • **
  • Posts: 61
  • Karma: 2
  • CiviCRM version: 4.5.3
  • CMS version: Joomla 3.3.6
  • MySQL version: 5.5.36
  • PHP version: 5.4.31
Re: Recurring membership payments don't generate a MembershipPayment record?
November 03, 2014, 09:25:24 am
Quote from: Eileen on October 31, 2014, 08:59:40 am
There is a bug fix in 4.6.3 (due 5 Nov) which may fix that

Thanks .. I'll keep an eye on what happens after that.

CiviHP

  • I’m new here
  • *
  • Posts: 4
  • Karma: 0
  • CiviCRM version: CiviCRM 4.4.5
  • CMS version: WordPress
  • MySQL version: MySQL
  • PHP version: PHP
Re: Recurring membership payments don't generate a MembershipPayment record?
November 09, 2014, 07:31:23 am
Yes, this definitely needs to be in core.  My organization is trying to build a large membership base and this would be a welcomed feature.  As well, it would be great for our members to look at their accounts and see this same payment history information.

CiviHP

Michael McAndrew

  • Forum Godess / God
  • I live on this forum
  • *****
  • Posts: 1274
  • Karma: 55
    • Third Sector Design
  • CiviCRM version: various
  • CMS version: Nearly always Drupal
  • MySQL version: 5.5
  • PHP version: 5.3
Re: Recurring membership payments don't generate a MembershipPayment record?
November 10, 2014, 01:16:45 am
Quote
it would be great for our members to look at their accounts and see this same payment history information.
this is already possible via the user dashboard or if you are using drupal via a view.
Service providers: Grow your business, build your reputation and support CiviCRM. Become a partner today

Pages: [1] 2
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviMember (Moderator: Deepak Srivastava) »
  • Recurring membership payments don't generate a MembershipPayment record?

This forum was archived on 2017-11-26.