Uploaded image for project: 'CiviCRM'
  1. CiviCRM
  2. CRM-3781

Memberships charges are set to recurring if an additional recurring contribution is selected

    Details

    • Type: Bug
    • Status: Done/Fixed
    • Priority: Major
    • Resolution: Fixed/Completed
    • Affects Version/s: 2.1
    • Fix Version/s: 3.0
    • Component/s: CiviContribute
    • Labels:
      None

      Description

      Contribution forms with membership sections enabled and recurring billing will charge Memberships as recurring if an additional recurring contribution is selected.

      Recreate:
      1. Create membership for with membership section, separate contribution and membership payments, recurring enabled
      2. Complete the contribution form with a membership selected, and one-time additional contribution. Observe that both the membership payment and additional payment are correctly billed.
      2. Complete the contribution form with a membership selected, and recurring additional contribution. Observe that both the additional payment are correctly billed as recurring, but the membership payment is incorrectly charged with the same recurring parameters as the contribution.

      Desired behaviour:
      All membership payments should be one-time only.

      This is the solution I implemented:

      CRM/Member/BAO/Membership.php, , near line 870

      $tempParams['amount'] = $minimumFee;
      $invoiceID = md5(uniqid(rand(), true));
      $tempParams['invoiceID'] = $invoiceID;

      + // added following statement to ensure that if recurring contribution is made, membership is still one-time only
      + $tempParams['is_recur'] = '0';

      if ($form->_values['is_monetary'] && !$form->_params['is_pay_later']) {

        Attachments

          Activity

            People

            • Assignee:
              mover Michał Mach
              Reporter:
              chrism Chris Mott
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - 1 hour
                1h
                Remaining:
                Remaining Estimate - 1 hour
                1h
                Logged:
                Time Spent - Not Specified
                Not Specified