Merge pull request #18295 from eileenmcnaughton/linetests
authorSeamus Lee <seamuslee001@gmail.com>
Wed, 2 Sep 2020 08:46:27 +0000 (18:46 +1000)
committerGitHub <noreply@github.com>
Wed, 2 Sep 2020 08:46:27 +0000 (18:46 +1000)
Test & remove handling for max_related in renewal form

1  2 
CRM/Member/Form/MembershipRenewal.php

index 83bc8106cb51a7d063a0f44970f97e6fa816eb60,65105c13666dda2a29f052a31db107ab4da10a06..162ca1cc613f7d303814d6f77f9aa5c6aad2eb11
@@@ -748,9 -748,13 +748,8 @@@ class CRM_Member_Form_MembershipRenewa
     */
    public function processMembership($contactID, $membershipTypeID, $is_test, $changeToday, $customFieldsFormatted, $numRenewTerms, $membershipID, $pending, $contributionRecurID, $isPayLater) {
      $allStatus = CRM_Member_PseudoConstant::membershipStatus();
-     $membershipTypeDetails = CRM_Member_BAO_MembershipType::getMembershipTypeDetails($membershipTypeID);
      $ids = [];
 -
 -    // CRM-7297 - allow membership type to be be changed during renewal so long as the parent org of new membershipType
 -    // is the same as the parent org of an existing membership of the contact
 -    $currentMembership = CRM_Member_BAO_Membership::getContactMembership($contactID, $membershipTypeID,
 -      $is_test, $membershipID, TRUE
 -    );
 +    $currentMembership = civicrm_api3('Membership', 'getsingle', ['id' => $membershipID]);
  
      // Do NOT do anything.
      //1. membership with status : PENDING/CANCELLED (CRM-2395)