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