Skip to content

Commit f8d83a4

Browse files
committed
Merged in PG-353-Allow-selecting-membership-for-another-person (pull request civicrm#26)
PG-353: apply fix from https://github.com/nishant-bhorodia/org.civicoop.membershippayment
2 parents 1a0604b + b2eb0f1 commit f8d83a4

File tree

1 file changed

+2
-1
lines changed
  • sites/all/civicrm_extensions/org.civicoop.membershippayment/CRM/Membershippayment/Contribution

1 file changed

+2
-1
lines changed

sites/all/civicrm_extensions/org.civicoop.membershippayment/CRM/Membershippayment/Contribution/Form.php

100644100755
+2-1
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,10 @@ public function postProcess($formName, &$form) {
4141
if (!empty($form->_submitValues['membership_id'])) {
4242
$membership_id = $form->_submitValues['membership_id'];
4343
}
44+
$contactId = $form->getVar('_contactID');
4445

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

0 commit comments

Comments
 (0)