1 [% PROCESS "opac/parts/header.tt2";
2 PROCESS "opac/parts/misc_util.tt2";
3 WRAPPER "opac/parts/myopac/main_base.tt2";
5 myopac_main_page = "payments";
6 limit = ctx.payment_history_limit;
7 offset = ctx.payment_history_offset;
10 <h3 class="sr-only">[% l('Transaction Payments') %]</h3>
12 <div class="header_middle">
13 <span class="float-left">[% l('Payments History') %]</span>
14 <span class='float-left' style='padding-left: 10px;'>
15 <a href='main_payments?limit=[% limit %]&offset=[% offset - limit %]'
16 [% IF offset == 0 %] class='invisible' [% END %]><span class="nav_arrow_fix">◄</span>[% l('Previous') %]</a>
17 [%# TODO: get total to prevent paging off then end of the list.. %]
18 <a href='main_payments?limit=[% limit %]&offset=[% offset + limit %]'
19 [% IF ctx.payments.size < limit %] class='invisible' [% END %] >[% l('Next') %]<span class="nav_arrow_fix">►</span></a>
22 <div class="clear-both"></div>
24 [% IF ctx.payments.size %]
25 <table title="[% l('Payments') %]"
26 class='myopac_payments_table data_grid' width='100%'>
28 <th>[% l('Payment Date') %]</th>
29 <th>[% l('Payment For') %]</th>
30 <th>[% l('Amount') %]</th>
31 <th>[% l('Receipt') %]</th>
34 [% FOR payment IN ctx.payments %]
36 <td>[% date.format(ctx.parse_datetime(payment.mp.payment_ts), DATE_FORMAT) %]</td>
38 btype = payment.last_billing_type | html;
39 ptitle = payment.title | html;
40 (payment.xact_type == 'grocery') ? btype : ptitle
42 <td>[% money(payment.mp.amount) %]</td>
44 <form action="[% ctx.opac_root %]/myopac/receipt_print" method="post">
45 <input type="hidden" name="payment" value="[% payment.mp.id %]" />
46 <input type="submit" value="[% l('Print') %]" />
48 <form action="[% ctx.opac_root %]/myopac/receipt_email" method="post">
49 <input type="hidden" name="payment" value="[% payment.mp.id %]" />
50 <input type="submit" value="[% l('Email') %]" />
58 <div>[% l('You have no historical payments to display.') %]</div>