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