From f862cea07500622e779d35cf8b1a90dd6d2e02e7 Mon Sep 17 00:00:00 2001 From: Pradeep Nayak Date: Thu, 11 Aug 2016 11:12:35 +0530 Subject: [PATCH] CRM-16189, added link on contribution view form ---------------------------------------- * CRM-16189: Improve support for Accrual Method bookkeeping https://issues.civicrm.org/jira/browse/CRM-16189 --- CRM/Contribute/Form/ContributionView.php | 7 +++++++ templates/CRM/Contribute/Form/ContributionView.tpl | 9 +++++++++ 2 files changed, 16 insertions(+) diff --git a/CRM/Contribute/Form/ContributionView.php b/CRM/Contribute/Form/ContributionView.php index 0f282c97a3..0ef43f4e3a 100644 --- a/CRM/Contribute/Form/ContributionView.php +++ b/CRM/Contribute/Form/ContributionView.php @@ -219,6 +219,13 @@ class CRM_Contribute_Form_ContributionView extends CRM_Core_Form { NULL, $recentOther ); + + $participantID = CRM_Core_DAO::getFieldValue('CRM_Event_DAO_ParticipantPayment', + $values['id'], 'participant_id', 'contribution_id' + ); + $this->assign('contactId', $values['contact_id']); + $this->assign('hasPayment', $values['id']); + $this->assign('participantId', $participantID); } /** diff --git a/templates/CRM/Contribute/Form/ContributionView.tpl b/templates/CRM/Contribute/Form/ContributionView.tpl index 8f3cef9c3c..175fd5b4ba 100644 --- a/templates/CRM/Contribute/Form/ContributionView.tpl +++ b/templates/CRM/Contribute/Form/ContributionView.tpl @@ -227,6 +227,12 @@ {$thankyou_date|crmDate} {/if} + {if $participantId and $hasPayment} + + {ts}Fees{/ts} + + + {/if} {if count($softContributions)} {* We show soft credit name with PCP section if contribution is linked to a PCP. *} @@ -322,6 +328,9 @@ {/if} +{if $participantId and $hasPayment} + {include file="CRM/Contribute/Page/PaymentInfo.tpl" show='event-payment'} +{/if}
{if (call_user_func(array('CRM_Core_Permission','check'), 'edit contributions') && call_user_func(array('CRM_Core_Permission', 'check'), "edit contributions of type $financial_type") && $canEdit) || -- 2.25.1