2 +--------------------------------------------------------------------+
3 | CiviCRM version 4.7 |
4 +--------------------------------------------------------------------+
5 | Copyright CiviCRM LLC (c) 2004-2018 |
6 +--------------------------------------------------------------------+
7 | This file is a part of CiviCRM. |
9 | CiviCRM is free software; you can copy, modify, and distribute it |
10 | under the terms of the GNU Affero General Public License |
11 | Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
13 | CiviCRM is distributed in the hope that it will be useful, but |
14 | WITHOUT ANY WARRANTY; without even the implied warranty of |
15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
16 | See the GNU Affero General Public License for more details. |
18 | You should have received a copy of the GNU Affero General Public |
19 | License and the CiviCRM Licensing Exception along |
20 | with this program; if not, contact CiviCRM LLC |
21 | at info[AT]civicrm[DOT]org. If you have questions about the |
22 | GNU Affero General Public License or the licensing of CiviCRM, |
23 | see the CiviCRM license FAQ at http://civicrm.org/licensing |
24 +--------------------------------------------------------------------+
26 {if $show eq 'payments'}
28 <script type='text/javascript'>
30 if ($("#payment-info").length) {
31 var dataUrl = {/literal}'{crmURL p="civicrm/payment/view" h=0 q="action=browse&id=$componentId&cid=`$contactId`&component=$component&context=payment_info&snippet=4"}'{literal};
35 success: function(html) {
36 $("#payment-info").html(html).trigger('crmLoad');
40 var taxAmount = "{$totalTaxAmount}";
42 $('.total_amount-section').show();
45 $('.total_amount-section').remove();
52 {if $context eq 'payment_info'}
54 <tr class="columnheader">
55 {if $component eq "event"}
56 <th>{ts}Total Fee(s){/ts}</th>
58 <th>{ts}Contribution Total{/ts}</th>
60 <th class="right">{ts}Total Paid{/ts}</th>
61 <th class="right">{ts}Balance{/ts}</th>
64 <td>{$paymentInfo.total|crmMoney}</td>
66 {if $paymentInfo.paid > 0}
67 {$paymentInfo.paid|crmMoney}
68 {if !$hideButtonLinks}
70 <a class="crm-hover-button action-item crm-popup medium-popup" href='{crmURL p="civicrm/payment" q="view=transaction&cid=`$cid`&id=`$paymentInfo.id`&component=`$paymentInfo.component`&action=browse"}'>
71 <i class="crm-i fa-list"></i>
72 {ts}view payments{/ts}
77 <td class="right" id="payment-info-balance" data-balance="{$paymentInfo.balance}">{$paymentInfo.balance|crmMoney}</td>
80 {if $paymentInfo.balance and !$paymentInfo.payLater && !$hideButtonLinks}
81 {if $paymentInfo.balance > 0}
82 {assign var=paymentButtonName value='Record Payment'}
83 {elseif $paymentInfo.balance < 0}
84 {assign var=paymentButtonName value='Record Refund'}
86 <a class="action-item crm-hover-button" href='{crmURL p="civicrm/payment" q="action=add&reset=1&component=`$component`&id=`$id`&cid=`$cid`"}'><i class="crm-i fa-plus-circle"></i> {ts}{$paymentButtonName}{/ts}</a>