3 [% USE ColumnsSettings %]
6 [% INCLUDE 'doc-head-open.inc' %]
7 <title>Koha › Patrons › Account for [% INCLUDE 'patron-title.inc' no_html = 1 %]</title>
8 [% INCLUDE 'doc-head-close.inc' %]
9 <link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables_[% KOHA_VERSION %].css" />
12 <body id="pat_borraccount" class="pat">
13 [% INCLUDE 'header.inc' %]
14 [% INCLUDE 'patron-search.inc' %]
16 <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>
18 <div id="doc3" class="yui-t2">
22 [% INCLUDE 'members-toolbar.inc' %]
23 <form action="/cgi-bin/koha/members/boraccount.pl" method="get"><input type="hidden" name="borrowernumber" id="borrowernumber" value="[% patron.borrowernumber %]" /></form>
25 <!-- The manual invoice and credit buttons -->
26 <div class="statictabs">
28 <li class="active"><a href="/cgi-bin/koha/members/boraccount.pl?borrowernumber=[% patron.borrowernumber %]">Account</a></li>
29 <li><a href="/cgi-bin/koha/members/pay.pl?borrowernumber=[% patron.borrowernumber %]" >Pay fines</a></li>
30 <li><a href="/cgi-bin/koha/members/maninvoice.pl?borrowernumber=[% patron.borrowernumber %]" >Create manual invoice</a></li>
31 <li><a href="/cgi-bin/koha/members/mancredit.pl?borrowernumber=[% patron.borrowernumber %]" >Create manual credit</a></li>
33 <div class="tabs-container">
34 <!-- The table with the account items -->
35 <table id="table_account_fines">
38 <th class="title-string">Date</th>
39 <th>Description of charges</th>
43 [% IF ( reverse_col ) %]
51 <!-- FIXME: Shouldn't hardcode dollar signs, since Euro or Pound might be needed -->
52 [% FOREACH account IN accounts %]
55 <td><span title="[% account.date %]">[% account.date |$KohaDates %]</span></td>
57 [% SWITCH account.accounttype %]
58 [% CASE 'Pay' %]Payment, thanks
59 [% CASE 'Pay00' %]Payment, thanks (cash via SIP2)
60 [% CASE 'Pay01' %]Payment, thanks (VISA via SIP2)
61 [% CASE 'Pay02' %]Payment, thanks (credit card via SIP2)
62 [% CASE 'N' %]New card
64 [% CASE 'A' %]Account management fee
66 [% CASE 'L' %]Lost item
67 [% CASE 'W' %]Writeoff
68 [% CASE 'FU' %]Accruing fine
69 [% CASE 'HE' %]Hold waiting too long
70 [% CASE 'Rent' %]Rental fee
71 [% CASE 'FOR' %]Forgiven
72 [% CASE 'LR' %]Lost item fee refund
73 [% CASE 'PF' %]Processing fee
74 [% CASE 'PAY' %]Payment
75 [% CASE 'WO' %]Writeoff
78 [% CASE %][% account.accounttype %]
80 [%- IF account.description %], [% account.description %][% END %]
81 [% 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>
82 <td>[% account.note | html_line_break %]</td>
83 [% IF ( account.amountcredit ) %]<td class="credit" style="text-align: right;">[% ELSE %]<td class="debit" style="text-align: right;">[% END %][% account.amount | $Price %]</td>
84 [% IF ( account.amountoutstandingcredit ) %]<td class="credit" style="text-align: right;">[% ELSE %]<td class="debit" style="text-align: right;">[% END %][% account.amountoutstanding | $Price %]</td>
86 [% IF ( account.payment ) %]
87 <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>
89 <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>
91 [% IF ( reverse_col) %]
92 [% IF ( account.payment ) %]
93 <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>
94 [% ELSE %][% SET footerjs = 1 %]
104 <td colspan="4">Total due</td>
105 [% IF ( totalcredit ) %]
106 <td class="credit" style="text-align: right;">[% total | $Price %]</td>
108 <td class="debit"style="text-align: right;">[% total | $Price %]</td>
120 [% INCLUDE 'circ-menu.inc' %]
124 [% MACRO jsinclude BLOCK %]
125 [% INCLUDE 'datatables.inc' %]
126 [% INCLUDE 'columns_settings.inc' %]
127 <script type="text/javascript" src="[% interface %]/[% theme %]/js/members-menu_[% KOHA_VERSION %].js"></script>
128 <script type="text/javascript">
129 var dateformat = "[% Koha.Preference('dateformat') %]";
130 $(document).ready(function() {
131 var txtActivefilter = _("Filter paid transactions");
132 var txtInactivefilter = _("Show all transactions");
133 var columns_settings = [% ColumnsSettings.GetColumns('members', 'fines', 'account-fines', 'json') %];
134 var table_account_fines = KohaTable("table_account_fines", {
135 "sPaginationType": "four_button",
136 'aaSorting': [[0, 'desc']],
137 "sDom": 'C<"top pager"ilpfB><"#filter_c">tr<"bottom pager"ip>',
139 { "sType": "title-string", "aTargets" : [ "title-string" ] },
140 { "bSortable": false, "bSearchable": false, "aTargets": [-1] }
142 }, columns_settings);
143 $("#filter_c").html('<p><a href="#" id="filter_transacs"><i class="fa fa-filter"></i> '+txtActivefilter+'</a>');
144 $('#filter_transacs').click(function(e) {
146 if ($(this).hasClass('filtered')) {
147 var filteredValue = '';
148 $(this).html('<i class="fa fa-filter"></i> '+txtActivefilter);
149 } else { //Not filtered. Let's do it!
150 var filteredValue = '^((?!0.00).*)$'; //Filter not matching 0.00 http://stackoverflow.com/a/406408
151 $(this).html('<i class="fa fa-filter"></i> '+txtInactivefilter);
153 table_account_fines.fnFilter(filteredValue, 4, true, false);
154 $(this).toggleClass('filtered');
160 [% INCLUDE 'intranet-bottom.inc' %]