4 [% USE ColumnsSettings %]
5 [% USE AuthorisedValues %]
9 [% INCLUDE 'doc-head-open.inc' %]
10 <title>Koha › Patrons › Account for [% INCLUDE 'patron-title.inc' no_html = 1 %]</title>
11 [% INCLUDE 'doc-head-close.inc' %]
12 [% Asset.css("css/datatables.css") %]
15 <body id="pat_borraccount" class="pat">
16 [% INCLUDE 'header.inc' %]
17 [% INCLUDE 'patron-search.inc' %]
19 <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>
21 <div id="doc3" class="yui-t2">
25 [% INCLUDE 'members-toolbar.inc' %]
26 <form action="/cgi-bin/koha/members/boraccount.pl" method="get"><input type="hidden" name="borrowernumber" id="borrowernumber" value="[% patron.borrowernumber %]" /></form>
28 <!-- The manual invoice and credit buttons -->
29 <div class="statictabs">
31 <li class="active"><a href="/cgi-bin/koha/members/boraccount.pl?borrowernumber=[% patron.borrowernumber %]">Account</a></li>
32 <li><a href="/cgi-bin/koha/members/pay.pl?borrowernumber=[% patron.borrowernumber %]" >Pay fines</a></li>
33 <li><a href="/cgi-bin/koha/members/maninvoice.pl?borrowernumber=[% patron.borrowernumber %]" >Create manual invoice</a></li>
34 <li><a href="/cgi-bin/koha/members/mancredit.pl?borrowernumber=[% patron.borrowernumber %]" >Create manual credit</a></li>
36 <div class="tabs-container">
37 <!-- The table with the account items -->
38 <table id="table_account_fines">
41 <th class="title-string">Date</th>
42 <th>Description of charges</th>
46 [% IF ( reverse_col ) %]
54 <!-- FIXME: Shouldn't hardcode dollar signs, since Euro or Pound might be needed -->
55 [% FOREACH account IN accounts %]
58 <td><span title="[% account.date %]">[% account.date |$KohaDates %]</span></td>
60 [% INCLUDE 'accounttype.inc' accountline => account %]
61 [%- IF account.payment_type %], [% AuthorisedValues.GetByCode('PAYMENT_TYPE', account.payment_type) %][% END %]
62 [%- IF account.description %], [% account.description %][% END %]
63 [% 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>
64 <td>[% account.note | html_line_break %]</td>
65 [% IF ( account.amountcredit ) %]<td class="credit" style="text-align: right;">[% ELSE %]<td class="debit" style="text-align: right;">[% END %][% account.amount | $Price %]</td>
66 [% IF ( account.amountoutstandingcredit ) %]<td class="credit" style="text-align: right;">[% ELSE %]<td class="debit" style="text-align: right;">[% END %][% account.amountoutstanding | $Price %]</td>
68 [% IF ( account.payment ) %]
69 <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>
71 <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>
73 <a href="accountline-details.pl?accountlines_id=[% account.accountlines_id %]" class="btn btn-default btn-xs"><i class="fa fa-list"></i> Details</a>
74 [% IF ( reverse_col) %]
75 [% IF ( account.payment ) %]
76 <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>
77 <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>
78 [% ELSE %][% SET footerjs = 1 %]
88 <td colspan="4">Total due</td>
89 [% IF ( totalcredit ) %]
90 <td class="credit" style="text-align: right;">[% total | $Price %]</td>
92 <td class="debit"style="text-align: right;">[% total | $Price %]</td>
104 [% INCLUDE 'circ-menu.inc' %]
108 [% MACRO jsinclude BLOCK %]
109 [% INCLUDE 'datatables.inc' %]
110 [% INCLUDE 'columns_settings.inc' %]
111 [% Asset.js("js/members-menu.js") %]
112 <script type="text/javascript">
113 var dateformat = "[% Koha.Preference('dateformat') %]";
114 $(document).ready(function() {
115 var txtActivefilter = _("Filter paid transactions");
116 var txtInactivefilter = _("Show all transactions");
117 var columns_settings = [% ColumnsSettings.GetColumns('members', 'fines', 'account-fines', 'json') %];
118 var table_account_fines = KohaTable("table_account_fines", {
119 "sPaginationType": "four_button",
120 'aaSorting': [[0, 'desc']],
121 "sDom": 'C<"top pager"ilpfB><"#filter_c">tr<"bottom pager"ip>',
123 { "sType": "title-string", "aTargets" : [ "title-string" ] },
124 { "bSortable": false, "bSearchable": false, "aTargets": [-1] }
126 }, columns_settings);
127 $("#filter_c").html('<p><a href="#" id="filter_transacs"><i class="fa fa-filter"></i> '+txtActivefilter+'</a>');
128 $('#filter_transacs').click(function(e) {
130 if ($(this).hasClass('filtered')) {
131 var filteredValue = '';
132 $(this).html('<i class="fa fa-filter"></i> '+txtActivefilter);
133 } else { //Not filtered. Let's do it!
134 var filteredValue = '^((?!0.00).*)$'; //Filter not matching 0.00 http://stackoverflow.com/a/406408
135 $(this).html('<i class="fa fa-filter"></i> '+txtInactivefilter);
137 table_account_fines.fnFilter(filteredValue, 4, true, false);
138 $(this).toggleClass('filtered');
144 [% INCLUDE 'intranet-bottom.inc' %]