CRM-16189, added link on contribution view form
authorPradeep Nayak <pradpnayak@gmail.com>
Thu, 11 Aug 2016 05:42:35 +0000 (11:12 +0530)
committerEdsel <edsel.lopez@jmaconsulting.biz>
Mon, 19 Dec 2016 09:28:22 +0000 (14:58 +0530)
----------------------------------------
* CRM-16189: Improve support for Accrual Method bookkeeping
  https://issues.civicrm.org/jira/browse/CRM-16189

CRM/Contribute/Form/ContributionView.php
templates/CRM/Contribute/Form/ContributionView.tpl

index 0f282c97a3f7ca3b1b6f251be962107a08cc82d6..0ef43f4e3abacac6ed8e8a950b29fe26763acc6b 100644 (file)
@@ -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);
   }
 
   /**
index 8f3cef9c3c87a514b0e2069865315b141d37f94b..175fd5b4ba9b9402a7bc0a5e59bce74d12b4d345 100644 (file)
       <td>{$thankyou_date|crmDate}</td>
     </tr>
   {/if}
+  {if $participantId and $hasPayment}
+    <tr>
+      <td class='label'>{ts}Fees{/ts}</td>
+      <td id='payment-info'></td>
+    </tr>
+  {/if}        
 </table>
 
 {if count($softContributions)} {* We show soft credit name with PCP section if contribution is linked to a PCP. *}
     </div>
   </fieldset>
 {/if}
+{if $participantId and $hasPayment}
+  {include file="CRM/Contribute/Page/PaymentInfo.tpl" show='event-payment'}
+{/if}
 
 <div class="crm-submit-buttons">
   {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) ||