From abba096d137ce83cf3aa87c75e01e56cc85c5ebd Mon Sep 17 00:00:00 2001 From: Dave Greenberg Date: Thu, 8 Aug 2013 16:31:58 -0700 Subject: [PATCH] CRM-12869 This is a temporary fix from Eileen which prevents the over-write. However it also prevents the billing address from being saved for the payee, and requires the user to know that they need to manually replace the billing field values with the payer data. In general I do not think this record payment from a differnet contact feature is production-ready (even though it is part of 4.3). Selecting a different payer should reload the the billing address fields with the payer info. ---------------------------------------- * CRM-12869: Record Payment from different contact causes email and address to be altered in contacts record http://issues.civicrm.org/jira/browse/CRM-12869 --- CRM/Member/Form/Membership.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/CRM/Member/Form/Membership.php b/CRM/Member/Form/Membership.php index a992a00935..f484feb537 100644 --- a/CRM/Member/Form/Membership.php +++ b/CRM/Member/Form/Membership.php @@ -1357,12 +1357,12 @@ WHERE id IN ( ' . implode(' , ', array_keys($membershipType)) . ' )'; $formValues['preserveDBName'] = TRUE; } } - //here we are setting up the billing contact - if different from the member they are already created - // but they will get billing details assigned - CRM_Contact_BAO_Contact::createProfileContact($formValues, $fields, - $this->_contributorContactID, NULL, NULL, $ctype - ); - + if ($this->_contributorContactID == $this->_contactID) { + //see CRM-12869 for discussion of why we don't do this for separate payee payments + CRM_Contact_BAO_Contact::createProfileContact($formValues, $fields, + $this->_contributorContactID, NULL, NULL, $ctype + ); + } // add all the additioanl payment params we need $this->_params["state_province-{$this->_bltID}"] = $this->_params["billing_state_province-{$this->_bltID}"] = CRM_Core_PseudoConstant::stateProvinceAbbreviation($this->_params["billing_state_province_id-{$this->_bltID}"]); -- 2.25.1