Skip to content
Snippets Groups Projects
Commit a4e0d7b5 authored by Dave Greenberg's avatar Dave Greenberg
Browse files

CRM-12618 This includes Nicolas Ganivet patch to prevent editing of event fee...

CRM-12618 This includes Nicolas Ganivet patch to prevent editing of event fee for paid additional participants, and fix to hide Record Payment checkbox for them as well.

----------------------------------------
* CRM-12618: Event registration edit screen for additional registrants is incorrect
  http://issues.civicrm.org/jira/browse/CRM-12618
parent 25f83d3a
No related branches found
No related tags found
No related merge requests found
......@@ -233,6 +233,18 @@ class CRM_Event_Form_Participant extends CRM_Contact_Form_Task {
$this->_paymentId = CRM_Core_DAO::getFieldValue('CRM_Event_DAO_ParticipantPayment',
$this->_id, 'id', 'participant_id'
);
// CRM-12615 - Get payment information from the primary registration
if ((!$this->_paymentId) && ($this->_action == CRM_Core_Action::UPDATE)) {
$registered_by_id = CRM_Core_DAO::getFieldValue('CRM_Event_DAO_Participant',
$this->_id, 'registered_by_id', 'id'
);
if ($registered_by_id) {
$this->_paymentId = CRM_Core_DAO::getFieldValue('CRM_Event_DAO_ParticipantPayment',
$registered_by_id, 'id', 'participant_id'
);
$this->assign('registeredByParticipantId', $registered_by_id);
}
}
}
// get the option value for custom data type
......
......@@ -48,7 +48,7 @@
</fieldset>
{else}
{assign var=isRecordPayment value=0 }
<div class='messages status'>{ts}No any active price fields found for this event!{/ts}</div>
<div class='messages status'>{ts}No active price fields found for this event!{/ts}</div>
{/if}
</table>
{/if}
......@@ -56,7 +56,7 @@
</tr>
{/if}
{ if $accessContribution and ! $participantMode and ($action neq 2 or !$rows.0.contribution_id or $onlinePendingContributionId) and $isRecordPayment }
{ if $accessContribution and ! $participantMode and ($action neq 2 or !$rows.0.contribution_id or $onlinePendingContributionId) and $isRecordPayment and ! $registeredByParticipantId }
<tr class="crm-event-eventfees-form-block-record_contribution">
<td class="label">{$form.record_contribution.label}</td>
<td>{$form.record_contribution.html}<br />
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment