Bug 12768: (QA follow-up) Add 'Processing fee' to templates
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / members / boraccount.tt
1 [% USE Koha %]
2 [% USE KohaDates %]
3 [% USE ColumnsSettings %]
4 [% USE Price %]
5 [% INCLUDE 'doc-head-open.inc' %]
6 <title>Koha &rsaquo; Patrons &rsaquo; Account for [% INCLUDE 'patron-title.inc' %]</title>
7 [% INCLUDE 'doc-head-close.inc' %]
8 <link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables.css" />
9 [% INCLUDE 'datatables.inc' %]
10 [% INCLUDE 'columns_settings.inc' %]
11 <script type="text/javascript">
12 $(document).ready(function() {
13     var txtActivefilter = _("Filter paid transactions");
14     var txtInactivefilter = _("Show all transactions");
15     var columns_settings = [% ColumnsSettings.GetColumns('members', 'fines', 'account-fines', 'json') %];
16     var table_account_fines = KohaTable("#table_account_fines", {
17         "sPaginationType": "four_button",
18         'aaSorting': [[0, 'desc']],
19         "sDom": 'C<"top pager"ilpfB><"#filter_c">tr<"bottom pager"ip>',
20         "aoColumnDefs": [
21             { "sType": "title-string", "aTargets" : [ "title-string" ] },
22             { "bSortable": false, "bSearchable": false, "aTargets": [-1] }
23         ]
24     }, columns_settings);
25     $("#filter_c").html('<p><a href="#" id="filter_transacs"><i class="fa fa-filter"></i> '+txtActivefilter+'</a>');
26     $('#filter_transacs').click(function(e) {
27         e.preventDefault();
28         if ($(this).hasClass('filtered')) {
29             var filteredValue = '';
30             $(this).html('<i class="fa fa-filter"></i> '+txtActivefilter);
31         } else { //Not filtered. Let's do it!
32             var filteredValue = '^((?!0.00).*)$'; //Filter not matching 0.00 http://stackoverflow.com/a/406408
33             $(this).html('<i class="fa fa-filter"></i> '+txtInactivefilter);
34         }
35         table_account_fines.fnFilter(filteredValue, 4, true, false);
36         $(this).toggleClass('filtered');
37     });
38 });
39 </script>
40 </head>
41 <body id="pat_borraccount" class="pat">
42 [% INCLUDE 'header.inc' %]
43 [% INCLUDE 'patron-search.inc' %]
44
45 <div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo; <a href="/cgi-bin/koha/members/members-home.pl">Patrons</a>  &rsaquo; Account for [% INCLUDE 'patron-title.inc' %]</div>
46
47 <div id="doc3" class="yui-t2">
48    
49    <div id="bd">
50         <div id="yui-main">
51         <div class="yui-b">
52 [% INCLUDE 'members-toolbar.inc' %]
53 <form action="/cgi-bin/koha/members/boraccount.pl" method="get"><input type="hidden" name="borrowernumber" id="borrowernumber" value="[% borrowernumber %]" /></form>
54
55 <!-- The manual invoice and credit buttons -->
56 <div class="statictabs">
57 <ul>
58     <li class="active"><a href="/cgi-bin/koha/members/boraccount.pl?borrowernumber=[% borrowernumber %]">Account</a></li>
59         <li><a href="/cgi-bin/koha/members/pay.pl?borrowernumber=[% borrowernumber %]" >Pay fines</a></li>
60         <li><a href="/cgi-bin/koha/members/maninvoice.pl?borrowernumber=[% borrowernumber %]" >Create manual invoice</a></li>
61         <li><a href="/cgi-bin/koha/members/mancredit.pl?borrowernumber=[% borrowernumber %]" >Create manual credit</a></li>
62 </ul>
63 <div class="tabs-container">
64 <!-- The table with the account items -->
65 <table id="table_account_fines">
66     <thead>
67       <tr>
68           <th class="title-string">Date</th>
69           <th>Description of charges</th>
70           <th>Note</th>
71           <th>Amount</th>
72           <th>Outstanding</th>
73           [% IF ( reverse_col ) %]
74               <th>Actions</th>
75           [% ELSE %]
76               <th>&nbsp;</th>
77           [% END %]
78         </tr>
79     </thead>
80
81         <!-- FIXME: Shouldn't hardcode dollar signs, since Euro or Pound might be needed -->
82   [% FOREACH account IN accounts %]
83
84    <tr>
85    <td><span title="[% account.date %]">[% account.date |$KohaDates %]</span></td>
86       <td>
87         [% SWITCH account.accounttype %]
88           [% CASE 'Pay' %]Payment, thanks
89           [% CASE 'Pay00' %]Payment, thanks (cash via SIP2)
90           [% CASE 'Pay01' %]Payment, thanks (VISA via SIP2)
91           [% CASE 'Pay02' %]Payment, thanks (credit card via SIP2)
92           [% CASE 'N' %]New card
93           [% CASE 'F' %]Fine
94           [% CASE 'A' %]Account management fee
95           [% CASE 'M' %]Sundry
96           [% CASE 'L' %]Lost item
97           [% CASE 'W' %]Writeoff
98           [% CASE 'FU' %]Accruing fine
99           [% CASE 'HE' %]Hold waiting too long
100           [% CASE 'Rent' %]Rental fee
101           [% CASE 'FOR' %]Forgiven
102           [% CASE 'LR' %]Lost item fee refund
103           [% CASE 'PF' %]Processing fee
104           [% CASE 'PAY' %]Payment
105           [% CASE 'WO' %]Writeoff
106           [% CASE 'C' %]Credit
107           [% CASE 'CR' %]Credit
108           [% CASE %][% account.accounttype %]
109         [%- END -%]
110         [%- IF account.description %], [% account.description %][% END %]
111         &nbsp;[% IF ( account.itemnumber ) %]<a href="/cgi-bin/koha/catalogue/moredetail.pl?biblionumber=[% account.biblionumber %]&amp;itemnumber=[% account.itemnumber %]">[% account.title |html %]</a>[% END %]</td>
112       <td>[% account.note | html_line_break %]</td>
113       [% IF ( account.amountcredit ) %]<td class="credit" style="text-align: right;">[% ELSE %]<td class="debit" style="text-align: right;">[% END %][% account.amount | $Price %]</td>
114       [% IF ( account.amountoutstandingcredit ) %]<td class="credit" style="text-align: right;">[% ELSE %]<td class="debit" style="text-align: right;">[% END %][% account.amountoutstanding | $Price %]</td>
115       <td class="actions">
116         [% IF ( account.payment ) %]
117           <a target="_blank" href="printfeercpt.pl?action=print&amp;accountlines_id=[% account.accountlines_id %]&amp;borrowernumber=[% account.borrowernumber %]" class="btn btn-default btn-xs"><i class="fa fa-print"></i> Print</a>
118         [% ELSE %]
119           <a target="_blank" href="printinvoice.pl?action=print&amp;accountlines_id=[% account.accountlines_id %]&amp;borrowernumber=[% account.borrowernumber %]" class="btn btn-default btn-xs"><i class="fa fa-print"></i> Print</a>
120         [% END %]
121         [% IF ( reverse_col) %]
122           [% IF ( account.payment ) %]
123             <a href="boraccount.pl?action=reverse&amp;accountlines_id=[% account.accountlines_id %]&amp;borrowernumber=[% account.borrowernumber %]" class="btn btn-default btn-xs"><i class="fa fa-undo"></i> Reverse</a>
124           [% ELSE %]
125             &nbsp;
126           [% END %]
127         [% END %]
128       </td>
129     </tr>
130
131   [% END %]
132 <tfoot>
133   <tr>
134     <td colspan="4">Total due</td>
135     [% IF ( totalcredit ) %]
136         <td class="credit" style="text-align: right;">[% total | $Price %]</td>
137     [% ELSE %]
138        <td class="debit"style="text-align: right;">[% total | $Price %]</td>
139     [% END %]
140     <td></td>
141   </tr>
142   </tfoot>
143 </table>
144 </div></div>
145
146 </div>
147 </div>
148
149 <div class="yui-b">
150 [% INCLUDE 'circ-menu.inc' %]
151 </div>
152 </div>
153 [% INCLUDE 'intranet-bottom.inc' %]