Author Topic: Pending Pay Later contribution gives New membership when separate contribution  (Read 2010 times)

Offline davej

  • I post frequently
  • ***
  • Posts: 339
  • Karma: 17
Hi,

Found a problem with membership contribution pages with Contribution Amounts section, Fixed Contribution Options, Separate Membership Payment and Pay Later.

When I use the contrib page to sign up for a membership using pay later and select "No Thanks" for fixed contrib, the membership contribution correctly has status "Pending (Pay Later)" but the membership has status New - should be Pending.

Found the problem on 3.3.5 and replicated on Demo on 3.4 r33809.

Sorry about the timing, the day after the 3.4.0 release! Shall I file an issue?

Dave J

Online Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 14731
  • Karma: 440
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x

yes, please file an issue (and if u have the time, please investigate and also add a patch!)

lobo
Found this reply helpful? Contribute NOW and help improve CiviCRM with the Make it Happen! initiative.

Offline davej

  • I post frequently
  • ***
  • Posts: 339
  • Karma: 17

Offline easy

  • I’m new here
  • *
  • Posts: 20
  • Karma: 0
  • CiviCRM version: 4.0.5
  • CMS version: Joomla 1.6.1
  • MySQL version: 5.0.92
  • PHP version: 5.2.17
Hello there,

1. When I use the frontside contribution page and choose the "Pay Later" options, it looks like it work fine:
- contribution status: Pending
- membership status: Pending

2. When I create new membership on the backend as an admin it saves the below statuses:
- contribution status: Pending
- membership status: New

Can you please let me know how do you all work with this issue?
Thanks in advance for all your reply

Offline petednz

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 3679
  • Karma: 123
    • Fuzion
  • CiviCRM version: 3.x - 4.x
  • CMS version: Drupal 6 and 7
I think this is the best thread to tie this on to. And am unsure if the above patch was addressing this or has precipated this problem - ie I haven't checked how this works on an older version - this is on 4.0.5

I am trying to help a client resolve the frustrations they are having with 'pay later' membership which can be coming in from both the front end and back end (ie member sends in form indicating they are paying by Direct Credit and the accounts team don't have that info yet or havn't passed it on).

If I do a Membership at back end with no payment it becomes
- Membership Status = NEW
- Contribution - not exist

This can then be found by Searching for Status is New, but can't be found under Pay Later

If I should be doing this as Membership  and Record membership Payment and record it as Payment Status = Pending then we get
- Membership Status = NEW
- Contribution Status = Pending (Incomplete Transaction)

I can't see anyway to flag this somehow so it shows as Pending Pay Later?


If I do the above then it can still only be found by Find Member via "status = New" not via Pay Later


If I do a Membership at front end with Pay Later it becomes
- Membership Status = Pending
- Contribution Status = Pending (Pay Later)

I can therefore find this either via
- Membership status = Pending or
- Membership - Find Pay Later

The fact that I can't pull a list that shows both types is not surprisingly causing some tears/expletives with the client.

So does there need to be a different option on the back end for the Membership (or Event) related Contributions to mark as Pay Later - or should the Pending status suffice and it needs so tweaking so it behaves as 'pay later' and sets the Membership status to Pending rather than New.

Or have I gone down the wrong rabbit hole?

Or is the problem with the Membership Status given that one is setting it to NEW and one to PENDING.

Appreciate any insight especially from those enjoying the warm UK weather  :P
« Last Edit: August 24, 2011, 03:52:20 am by petednz »
pete davis : www.fuzion.co.nz : connect + campaign + communicate

Offline annaleevk

  • I post occasionally
  • **
  • Posts: 87
  • Karma: 4
  • Carpe Noctem!
    • Women in Development, New York
  • CiviCRM version: 3.4.5
  • CMS version: Drupal 6.22
  • MySQL version: 5.1.48
  • PHP version: 5.2.14
I can confirm that I am seeing this in 3.4.5 from the front-end for public registration form.  People who choose the pay later option are getting the right status on the payment record but the membership status is getting set to either new or current.

- Annalee
Annalee Van Kleeck
Lyric Systems, LLC
201 951.8711
annalee@lyricsystems.com

Offline Eileen

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 3237
  • Karma: 155
    • Fuzion
It would seem that when you receipt a pending contribution against a membership @ the back end it should show as 'pending - pay later' NOT 'pending incomplete transaction' (which implies a failed credit card transation)
(http://civicrm.org/sites/civicrm.org/files/bugsmithing-2013-03.png)

Offline Eileen

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 3237
  • Karma: 155
    • Fuzion
So, it seems the pay_later flag is the difference between pending_pay_later & pending_incomplete_transaction.

It does seem like the only reason that someone would manually receipt something as pending is because they intend to pay it later....
(http://civicrm.org/sites/civicrm.org/files/bugsmithing-2013-03.png)

Offline Eileen

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 3237
  • Karma: 155
    • Fuzion
OK - this patch (cut against 4.1) implements the logic that back-office pending contributions against memberships should be seen as an intention to pay later rather than a incomplete transaction

Code: [Select]
Index: CRM/Member/BAO/Membership.php
===================================================================
--- CRM/Member/BAO/Membership.php (revision 36549)
+++ CRM/Member/BAO/Membership.php (working copy)
@@ -285,7 +285,7 @@
             $contributionParams['non_deductible_amount'] = 'null';
             $recordContribution = array( 'contact_id', 'total_amount', 'receive_date', 'contribution_type_id',
                                          'payment_instrument_id', 'trxn_id', 'invoice_id', 'is_test',
-                                         'contribution_status_id', 'check_number', 'campaign_id' );
+                                         'contribution_status_id', 'check_number', 'campaign_id','is_pay_later' );
             foreach ( $recordContribution as $f ) {
                 $contributionParams[$f] = CRM_Utils_Array::value( $f, $params );
             }
Index: CRM/Member/Form/Membership.php
===================================================================
--- CRM/Member/Form/Membership.php (revision 36549)
+++ CRM/Member/Form/Membership.php (working copy)
@@ -1062,7 +1062,10 @@
             if ( CRM_Utils_Array::value( 'send_receipt', $formValues ) ) {
                 $params['receipt_date'] = CRM_Utils_Array::value('receive_date',  $params);
             }
-           
+            if( CRM_Utils_Array::value( 'contribution_status_id',$params ) == 2){
+              $params['is_pay_later'] = 1;
+              $this->assign('is_pay_later',1);
+            }
             //insert contribution type name in receipt.
             $formValues['contributionType_name'] = CRM_Core_DAO::getFieldValue( 'CRM_Contribute_DAO_ContributionType',
                                                                                 $formValues['contribution_type_id'] );
 
(http://civicrm.org/sites/civicrm.org/files/bugsmithing-2013-03.png)

Offline Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5426
  • Karma: 208
    • My CiviCRM Blog
This makes complete sense to me. Can you file an issue and commit the patch to 4.1?
Missed CiviCon London? Watch the session videos!

Found this reply helpful? Contribute NOW and help us improve CiviCRM with the Make it Happen! initiative.

Offline Eileen

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 3237
  • Karma: 155
    • Fuzion
(http://civicrm.org/sites/civicrm.org/files/bugsmithing-2013-03.png)

Offline jaymcgraw

  • I post occasionally
  • **
  • Posts: 101
  • Karma: 6
  • CiviCRM version: 4.1.2
  • CMS version: Drupal 7.12
  • MySQL version: 5.0.92-community
  • PHP version: 5.2.11
I don't believe this is completely fixed yet. While this patch makes the contribution status as "Pending (Pay Later)", the corresponding membership is given a status of "New". Should the membership status not be "Pending"?

Offline Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5426
  • Karma: 208
    • My CiviCRM Blog
Jay - I just tested on 4.1 (trunk) as well and agree that it's not doing the right thing (membership status s/b set to 'Pending'). Reopened the issue:  http://issues.civicrm.org/jira/browse/CRM-8996
Missed CiviCon London? Watch the session videos!

Found this reply helpful? Contribute NOW and help us improve CiviCRM with the Make it Happen! initiative.

Offline Eileen

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 3237
  • Karma: 155
    • Fuzion
Just a quick note

http://issues.civicrm.org/jira/browse/CRM-7949 is the issue for the problem described in the topic.

http://issues.civicrm.org/jira/browse/CRM-8996 is a tangental issue that Pete hijacked into this thread. It doesn't address the problem described in the subject.
(http://civicrm.org/sites/civicrm.org/files/bugsmithing-2013-03.png)

Offline Eileen

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 3237
  • Karma: 155
    • Fuzion
I took a look @ the 2 patches below & if the one I did caused the other to stop working I can't spot it so I switched which one was re-opened
(http://civicrm.org/sites/civicrm.org/files/bugsmithing-2013-03.png)