From 753ca46b12afc8e623b18ca768ddde3b9c30c94e Mon Sep 17 00:00:00 2001 From: eileen Date: Mon, 9 Dec 2019 11:13:49 +1300 Subject: [PATCH] dev/membership#21 Fix regression on transferring member to another contact if they paid --- CRM/Member/Form/Membership.php | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/CRM/Member/Form/Membership.php b/CRM/Member/Form/Membership.php index 848c8ecd990f..963dada1ce9e 100644 --- a/CRM/Member/Form/Membership.php +++ b/CRM/Member/Form/Membership.php @@ -327,23 +327,6 @@ public function setDefaultValues() { $scTypes = CRM_Core_OptionGroup::values("soft_credit_type"); $defaults['soft_credit_type_id'] = CRM_Utils_Array::value(ts('Gift'), array_flip($scTypes)); - if (!empty($defaults['record_contribution']) && !$this->_mode) { - $contributionParams = ['id' => $defaults['record_contribution']]; - $contributionIds = []; - - //keep main object campaign in hand. - $memberCampaignId = CRM_Utils_Array::value('campaign_id', $defaults); - - CRM_Contribute_BAO_Contribution::getValues($contributionParams, $defaults, $contributionIds); - - //get back original object campaign id. - $defaults['campaign_id'] = $memberCampaignId; - - // Contribution::getValues() over-writes the membership record's source field value - so we need to restore it. - if (!empty($defaults['membership_source'])) { - $defaults['source'] = $defaults['membership_source']; - } - } //CRM-13420 if (empty($defaults['payment_instrument_id'])) { $defaults['payment_instrument_id'] = key(CRM_Core_OptionGroup::values('payment_instrument', FALSE, FALSE, FALSE, 'AND is_default = 1'));