Commit | Line | Data |
---|---|---|
f9af96d6 PJ |
1 | {* |
2 | +--------------------------------------------------------------------+ | |
3 | | CiviCRM version 4.4 | | |
4 | +--------------------------------------------------------------------+ | |
5 | | Copyright CiviCRM LLC (c) 2004-2013 | | |
6 | +--------------------------------------------------------------------+ | |
7 | | This file is a part of CiviCRM. | | |
8 | | | | |
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. | | |
12 | | | | |
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. | | |
17 | | | | |
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 | +--------------------------------------------------------------------+ | |
25 | *} | |
26 | {if $show eq 'event-payment'} | |
27 | {literal} | |
28 | <script type='text/javascript'> | |
29 | var dataUrl = {/literal}'{crmURL p="civicrm/payment/view" h=0 q="action=browse&id=$participantId&cid=`$contactId`&component=event&context=payment_info&snippet=4"}'{literal}; | |
30 | cj.ajax({ | |
31 | url: dataUrl, | |
32 | async: false, | |
33 | success: function(html) { | |
34 | cj("#payment-info").html(html); | |
35 | } | |
36 | }); | |
37 | </script> | |
38 | {/literal} | |
39 | {/if} | |
40 | {if $context eq 'payment_info'} | |
41 | <table id='info'> | |
42 | <tr class="columnheader"> | |
43 | {if $component eq "event"} | |
44 | <th>{ts}Total Fee(s){/ts}</th> | |
45 | {/if} | |
46 | <th class="right">{ts}Total Paid{/ts}</th> | |
47 | <th class="right">{ts}Balance{/ts}</th> | |
48 | </tr> | |
49 | <tr> | |
50 | <td>{$paymentInfo.total|crmMoney}</td> | |
51 | <td class='right'> | |
52 | {if $paymentInfo.paid > 0} | |
53 | <a class='action-item' href='{crmURL p="civicrm/payment/view" q="action=browse&cid=`$cid`&id=`$paymentInfo.id`&component=`$paymentInfo.component`&context=transaction"}'>{$paymentInfo.paid|crmMoney}<br/>>> view payments</a> | |
54 | {/if} | |
55 | </td> | |
56 | <td class='right'>{$paymentInfo.balance|crmMoney}</td> | |
57 | </tr> | |
58 | </table> | |
59 | {if $paymentInfo.balance > 0} | |
60 | <a class="button" href='{crmURL p="civicrm/payment/add" q="reset=1&component=`$component`&id=`$id`&cid=`$cid`"}' title="{ts}Record Payment{/ts}"><span><div class="icon add-icon"></div> {ts}Record Payment{/ts}</span></a> | |
61 | {/if} | |
62 | {elseif $context eq 'transaction'} | |
63 | <table id='info'> | |
64 | <tr class="columnheader"> | |
65 | <th>{ts}Amount{/ts}</th> | |
66 | <th>{ts}Type{/ts}</th> | |
67 | <th>{ts}Paid By{/ts}</th> | |
68 | <th>{ts}Received{/ts}</th> | |
69 | <th>{ts}Transaction ID{/ts}</th> | |
70 | <th>{ts}Status{/ts}</th> | |
71 | </tr> | |
72 | {foreach from=$rows item=row} | |
73 | <tr> | |
74 | <td>{$row.total_amount|crmMoney}</td> | |
75 | <td>{$row.financial_type}</td> | |
76 | <td>{$row.payment_instrument}</td> | |
77 | <td>{$row.receive_date|crmDate}</td> | |
78 | <td>{$row.trxn_id}</td> | |
79 | <td>{$row.status}</td> | |
80 | </tr> | |
81 | {/foreach} | |
82 | <table> | |
83 | {/if} |