4 [% USE ColumnsSettings %]
7 [% INCLUDE 'doc-head-open.inc' %]
8 <title>Koha › Patrons › Account for [% INCLUDE 'patron-title.inc' no_html = 1 %]</title>
9 [% INCLUDE 'doc-head-close.inc' %]
10 [% Asset.css("css/datatables.css") %]
13 <body id="pat_borraccount" class="pat">
14 [% INCLUDE 'header.inc' %]
15 [% INCLUDE 'patron-search.inc' %]
17 <div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> › <a href="/cgi-bin/koha/members/members-home.pl">Patrons</a> › Account for [% INCLUDE 'patron-title.inc' %]</div>
19 <div id="doc3" class="yui-t2">
23 [% INCLUDE 'members-toolbar.inc' %]
24 <form action="/cgi-bin/koha/members/boraccount.pl" method="get"><input type="hidden" name="borrowernumber" id="borrowernumber" value="[% patron.borrowernumber %]" /></form>
26 <!-- The manual invoice and credit buttons -->
27 <div class="statictabs">
29 <li class="active"><a href="/cgi-bin/koha/members/boraccount.pl?borrowernumber=[% patron.borrowernumber %]">Account</a></li>
30 <li><a href="/cgi-bin/koha/members/pay.pl?borrowernumber=[% patron.borrowernumber %]" >Pay fines</a></li>
31 <li><a href="/cgi-bin/koha/members/maninvoice.pl?borrowernumber=[% patron.borrowernumber %]" >Create manual invoice</a></li>
32 <li><a href="/cgi-bin/koha/members/mancredit.pl?borrowernumber=[% patron.borrowernumber %]" >Create manual credit</a></li>
34 <div class="tabs-container">
35 <!-- The table with the account items -->
36 <table id="table_account_fines">
39 <th class="title-string">Date</th>
40 <th>Description of charges</th>
44 [% IF ( reverse_col ) %]
52 <!-- FIXME: Shouldn't hardcode dollar signs, since Euro or Pound might be needed -->
53 [% FOREACH account IN accounts %]
56 <td><span title="[% account.date %]">[% account.date |$KohaDates %]</span></td>
58 [% SWITCH account.accounttype %]
59 [% CASE 'Pay' %]Payment, thanks
60 [% CASE 'Pay00' %]Payment, thanks (cash via SIP2)
61 [% CASE 'Pay01' %]Payment, thanks (VISA via SIP2)
62 [% CASE 'Pay02' %]Payment, thanks (credit card via SIP2)
63 [% CASE 'N' %]New card
65 [% CASE 'A' %]Account management fee
67 [% CASE 'L' %]Lost item
68 [% CASE 'W' %]Writeoff
69 [% CASE 'FU' %]Accruing fine
70 [% CASE 'HE' %]Hold waiting too long
71 [% CASE 'Rent' %]Rental fee
72 [% CASE 'FOR' %]Forgiven
73 [% CASE 'LR' %]Lost item fee refund
74 [% CASE 'PF' %]Processing fee
75 [% CASE 'PAY' %]Payment
76 [% CASE 'WO' %]Writeoff
79 [% CASE %][% account.accounttype %]
81 [%- IF account.description %], [% account.description %][% END %]
82 [% IF ( account.itemnumber ) %]<a href="/cgi-bin/koha/catalogue/moredetail.pl?biblionumber=[% account.item.biblionumber %]&itemnumber=[% account.itemnumber %]">[% account.item.biblio.title |html %]</a>[% END %]</td>
83 <td>[% account.note | html_line_break %]</td>
84 [% IF ( account.amountcredit ) %]<td class="credit" style="text-align: right;">[% ELSE %]<td class="debit" style="text-align: right;">[% END %][% account.amount | $Price %]</td>
85 [% IF ( account.amountoutstandingcredit ) %]<td class="credit" style="text-align: right;">[% ELSE %]<td class="debit" style="text-align: right;">[% END %][% account.amountoutstanding | $Price %]</td>
87 [% IF ( account.payment ) %]
88 <a target="_blank" href="printfeercpt.pl?action=print&accountlines_id=[% account.accountlines_id %]&borrowernumber=[% account.borrowernumber %]" class="btn btn-default btn-xs"><i class="fa fa-print"></i> Print</a>
90 <a target="_blank" href="printinvoice.pl?action=print&accountlines_id=[% account.accountlines_id %]&borrowernumber=[% account.borrowernumber %]" class="btn btn-default btn-xs"><i class="fa fa-print"></i> Print</a>
92 [% IF ( reverse_col) %]
93 [% IF ( account.payment ) %]
94 <a href="boraccount.pl?action=reverse&accountlines_id=[% account.accountlines_id %]&borrowernumber=[% account.borrowernumber %]" class="btn btn-default btn-xs"><i class="fa fa-undo"></i> Reverse</a>
95 [% ELSE %][% SET footerjs = 1 %]
105 <td colspan="4">Total due</td>
106 [% IF ( totalcredit ) %]
107 <td class="credit" style="text-align: right;">[% total | $Price %]</td>
109 <td class="debit"style="text-align: right;">[% total | $Price %]</td>
121 [% INCLUDE 'circ-menu.inc' %]
125 [% MACRO jsinclude BLOCK %]
126 [% INCLUDE 'datatables.inc' %]
127 [% INCLUDE 'columns_settings.inc' %]
128 [% Asset.js("js/members-menu.js") %]
129 <script type="text/javascript">
130 var dateformat = "[% Koha.Preference('dateformat') %]";
131 $(document).ready(function() {
132 var txtActivefilter = _("Filter paid transactions");
133 var txtInactivefilter = _("Show all transactions");
134 var columns_settings = [% ColumnsSettings.GetColumns('members', 'fines', 'account-fines', 'json') %];
135 var table_account_fines = KohaTable("table_account_fines", {
136 "sPaginationType": "four_button",
137 'aaSorting': [[0, 'desc']],
138 "sDom": 'C<"top pager"ilpfB><"#filter_c">tr<"bottom pager"ip>',
140 { "sType": "title-string", "aTargets" : [ "title-string" ] },
141 { "bSortable": false, "bSearchable": false, "aTargets": [-1] }
143 }, columns_settings);
144 $("#filter_c").html('<p><a href="#" id="filter_transacs"><i class="fa fa-filter"></i> '+txtActivefilter+'</a>');
145 $('#filter_transacs').click(function(e) {
147 if ($(this).hasClass('filtered')) {
148 var filteredValue = '';
149 $(this).html('<i class="fa fa-filter"></i> '+txtActivefilter);
150 } else { //Not filtered. Let's do it!
151 var filteredValue = '^((?!0.00).*)$'; //Filter not matching 0.00 http://stackoverflow.com/a/406408
152 $(this).html('<i class="fa fa-filter"></i> '+txtInactivefilter);
154 table_account_fines.fnFilter(filteredValue, 4, true, false);
155 $(this).toggleClass('filtered');
161 [% INCLUDE 'intranet-bottom.inc' %]