4 [% USE ColumnsSettings %]
5 [% USE AuthorisedValues %]
8 [% INCLUDE 'doc-head-open.inc' %]
9 <title>Koha › Patrons › Account for [% INCLUDE 'patron-title.inc' no_html = 1 %]</title>
10 [% INCLUDE 'doc-head-close.inc' %]
11 [% Asset.css("css/datatables.css") %]
14 <body id="pat_borraccount" class="pat">
15 [% INCLUDE 'header.inc' %]
16 [% INCLUDE 'patron-search.inc' %]
18 <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>
20 <div id="doc3" class="yui-t2">
24 [% INCLUDE 'members-toolbar.inc' %]
25 <form action="/cgi-bin/koha/members/boraccount.pl" method="get"><input type="hidden" name="borrowernumber" id="borrowernumber" value="[% patron.borrowernumber %]" /></form>
27 <!-- The manual invoice and credit buttons -->
28 <div class="statictabs">
30 <li class="active"><a href="/cgi-bin/koha/members/boraccount.pl?borrowernumber=[% patron.borrowernumber %]">Account</a></li>
31 <li><a href="/cgi-bin/koha/members/pay.pl?borrowernumber=[% patron.borrowernumber %]" >Pay fines</a></li>
32 <li><a href="/cgi-bin/koha/members/maninvoice.pl?borrowernumber=[% patron.borrowernumber %]" >Create manual invoice</a></li>
33 <li><a href="/cgi-bin/koha/members/mancredit.pl?borrowernumber=[% patron.borrowernumber %]" >Create manual credit</a></li>
35 <div class="tabs-container">
36 <!-- The table with the account items -->
37 <table id="table_account_fines">
40 <th class="title-string">Date</th>
41 <th>Description of charges</th>
45 [% IF ( reverse_col ) %]
53 <!-- FIXME: Shouldn't hardcode dollar signs, since Euro or Pound might be needed -->
54 [% FOREACH account IN accounts %]
57 <td><span title="[% account.date %]">[% account.date |$KohaDates %]</span></td>
59 [% SWITCH account.accounttype %]
60 [% CASE 'Pay' %]Payment, thanks
61 [% CASE 'Pay00' %]Payment, thanks (cash via SIP2)
62 [% CASE 'Pay01' %]Payment, thanks (VISA via SIP2)
63 [% CASE 'Pay02' %]Payment, thanks (credit card via SIP2)
64 [% CASE 'VOID' %]Payment, Voided
65 [% CASE 'N' %]New card
67 [% CASE 'A' %]Account management fee
69 [% CASE 'L' %]Lost item
70 [% CASE 'W' %]Writeoff
71 [% CASE 'FU' %]Accruing fine
72 [% CASE 'HE' %]Hold waiting too long
73 [% CASE 'Rent' %]Rental fee
74 [% CASE 'FOR' %]Forgiven
75 [% CASE 'LR' %]Lost item fee refund
76 [% CASE 'PF' %]Processing fee
77 [% CASE 'PAY' %]Payment
78 [% CASE 'WO' %]Writeoff
81 [% CASE %][% account.accounttype %]
83 [%- IF account.payment_type %], [% AuthorisedValues.GetByCode('PAYMENT_TYPE', account.payment_type) %][% END %]
84 [%- IF account.description %], [% account.description %][% END %]
85 [% 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>
86 <td>[% account.note | html_line_break %]</td>
87 [% IF ( account.amountcredit ) %]<td class="credit" style="text-align: right;">[% ELSE %]<td class="debit" style="text-align: right;">[% END %][% account.amount | $Price %]</td>
88 [% IF ( account.amountoutstandingcredit ) %]<td class="credit" style="text-align: right;">[% ELSE %]<td class="debit" style="text-align: right;">[% END %][% account.amountoutstanding | $Price %]</td>
90 [% IF ( account.payment ) %]
91 <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>
93 <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>
95 [% IF ( reverse_col) %]
96 [% IF ( account.payment ) %]
97 <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>
98 <a href="boraccount.pl?action=void&accountlines_id=[% account.accountlines_id %]&borrowernumber=[% account.borrowernumber %]" class="btn btn-default btn-xs"><i class="fa fa-ban"></i> Void</a>
99 [% ELSE %][% SET footerjs = 1 %]
109 <td colspan="4">Total due</td>
110 [% IF ( totalcredit ) %]
111 <td class="credit" style="text-align: right;">[% total | $Price %]</td>
113 <td class="debit"style="text-align: right;">[% total | $Price %]</td>
125 [% INCLUDE 'circ-menu.inc' %]
129 [% MACRO jsinclude BLOCK %]
130 [% INCLUDE 'datatables.inc' %]
131 [% INCLUDE 'columns_settings.inc' %]
132 [% Asset.js("js/members-menu.js") %]
133 <script type="text/javascript">
134 var dateformat = "[% Koha.Preference('dateformat') %]";
135 $(document).ready(function() {
136 var txtActivefilter = _("Filter paid transactions");
137 var txtInactivefilter = _("Show all transactions");
138 var columns_settings = [% ColumnsSettings.GetColumns('members', 'fines', 'account-fines', 'json') %];
139 var table_account_fines = KohaTable("table_account_fines", {
140 "sPaginationType": "four_button",
141 'aaSorting': [[0, 'desc']],
142 "sDom": 'C<"top pager"ilpfB><"#filter_c">tr<"bottom pager"ip>',
144 { "sType": "title-string", "aTargets" : [ "title-string" ] },
145 { "bSortable": false, "bSearchable": false, "aTargets": [-1] }
147 }, columns_settings);
148 $("#filter_c").html('<p><a href="#" id="filter_transacs"><i class="fa fa-filter"></i> '+txtActivefilter+'</a>');
149 $('#filter_transacs').click(function(e) {
151 if ($(this).hasClass('filtered')) {
152 var filteredValue = '';
153 $(this).html('<i class="fa fa-filter"></i> '+txtActivefilter);
154 } else { //Not filtered. Let's do it!
155 var filteredValue = '^((?!0.00).*)$'; //Filter not matching 0.00 http://stackoverflow.com/a/406408
156 $(this).html('<i class="fa fa-filter"></i> '+txtInactivefilter);
158 table_account_fines.fnFilter(filteredValue, 4, true, false);
159 $(this).toggleClass('filtered');
165 [% INCLUDE 'intranet-bottom.inc' %]