Skip to content

Commit

Permalink
Merged in PG-353-Allow-selecting-membership-for-another-person (pull …
Browse files Browse the repository at this point in the history
  • Loading branch information
guanhuan committed Jan 13, 2017
2 parents 1a0604b + b2eb0f1 commit f8d83a4
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,10 @@ public function postProcess($formName, &$form) {
if (!empty($form->_submitValues['membership_id'])) {
$membership_id = $form->_submitValues['membership_id'];
}
$contactId = $form->getVar('_contactID');

// create soft contribution entry if contact ID and member contact are different
if(!empty($form->_submitValues['member_contact']) && ($form->_submitValues['member_contact'] != $contactId)) {
if(!empty($form->_submitValues['member_contact']) && !empty($contactId) && ($form->_submitValues['member_contact'] != $contactId)) {
$result = civicrm_api3('ContributionSoft', 'create', array(
'sequential' => 1,
'contribution_id' => $contribution_id,
Expand Down

0 comments on commit f8d83a4

Please sign in to comment.