5 [% USE ColumnsSettings %]
6 [% USE AuthorisedValues %]
10 [% INCLUDE 'doc-head-open.inc' %]
11 <title>Koha › Patrons › Account for [% INCLUDE 'patron-title.inc' no_html = 1 %]</title>
12 [% INCLUDE 'doc-head-close.inc' %]
13 [% Asset.css("css/datatables.css") %]
16 <body id="pat_borraccount" class="pat">
17 [% INCLUDE 'header.inc' %]
18 [% INCLUDE 'patron-search.inc' %]
20 <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>
22 <div id="doc3" class="yui-t2">
27 [% INCLUDE 'members-toolbar.inc' %]
28 <form action="/cgi-bin/koha/members/boraccount.pl" method="get"><input type="hidden" name="borrowernumber" id="borrowernumber" value="[% patron.borrowernumber %]" /></form>
30 <!-- The manual invoice and credit buttons -->
31 <div class="statictabs">
33 <li class="active"><a href="/cgi-bin/koha/members/boraccount.pl?borrowernumber=[% patron.borrowernumber %]">Account</a></li>
34 <li><a href="/cgi-bin/koha/members/pay.pl?borrowernumber=[% patron.borrowernumber %]" >Pay fines</a></li>
35 <li><a href="/cgi-bin/koha/members/maninvoice.pl?borrowernumber=[% patron.borrowernumber %]" >Create manual invoice</a></li>
36 <li><a href="/cgi-bin/koha/members/mancredit.pl?borrowernumber=[% patron.borrowernumber %]" >Create manual credit</a></li>
38 <div class="tabs-container">
39 <!-- The table with the account items -->
40 <table id="table_account_fines">
43 <th class="title-string">Date</th>
44 <th>Description of charges</th>
49 [% IF ( reverse_col ) %]
57 <!-- FIXME: Shouldn't hardcode dollar signs, since Euro or Pound might be needed -->
58 [% FOREACH account IN accounts %]
61 <td><span title="[% account.date %]">[% account.date |$KohaDates %]</span></td>
63 [% INCLUDE 'accounttype.inc' accountline => account %]
64 [%- IF account.payment_type %], [% AuthorisedValues.GetByCode('PAYMENT_TYPE', account.payment_type) %][% END %]
65 [%- IF account.description %], [% account.description %][% END %]
66 [% 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>
67 <td>[% IF account.itemnumber %][% Branches.GetName( account.item.homebranch ) %][% END %]</td>
68 <td>[% account.note | html_line_break %]</td>
69 [% IF ( account.amountcredit ) %]<td class="credit" style="text-align: right;">[% ELSE %]<td class="debit" style="text-align: right;">[% END %][% account.amount | $Price %]</td>
70 [% IF ( account.amountoutstandingcredit ) %]<td class="credit" style="text-align: right;">[% ELSE %]<td class="debit" style="text-align: right;">[% END %][% account.amountoutstanding | $Price %]</td>
72 [% IF ( account.payment ) %]
73 <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>
75 <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>
77 <a href="accountline-details.pl?accountlines_id=[% account.accountlines_id %]" class="btn btn-default btn-xs"><i class="fa fa-list"></i> Details</a>
78 [% IF ( reverse_col) %]
79 [% IF ( account.payment || account.amount < 0 ) %]
80 [% IF account.payment %]
81 <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>
83 [% IF account.amount < 0 %]
84 <a href="boraccount.pl?action=void&accountlines_id=[% account.accountlines_id %]&borrowernumber=[% account.borrowernumber %]" class="btn btn-default btn-xs void"><i class="fa fa-ban"></i> Void</a>
96 <td colspan="5">Total due</td>
97 [% IF ( totalcredit ) %]
98 <td class="credit" style="text-align: right;">[% total | $Price %]</td>
100 <td class="debit"style="text-align: right;">[% total | $Price %]</td>
112 [% INCLUDE 'circ-menu.inc' %]
116 [% MACRO jsinclude BLOCK %]
117 [% INCLUDE 'datatables.inc' %]
118 [% INCLUDE 'columns_settings.inc' %]
119 [% INCLUDE 'str/members-menu.inc' %]
120 [% Asset.js("js/members-menu.js") %]
121 <script type="text/javascript">
122 $(document).ready(function() {
123 var txtActivefilter = _("Filter paid transactions");
124 var txtInactivefilter = _("Show all transactions");
125 var columns_settings = [% ColumnsSettings.GetColumns('members', 'fines', 'account-fines', 'json') %];
126 var table_account_fines = KohaTable("table_account_fines", {
127 "sPaginationType": "four_button",
128 'aaSorting': [[0, 'desc']],
129 "sDom": 'C<"top pager"ilpfB><"#filter_c">tr<"bottom pager"ip>',
131 { "sType": "title-string", "aTargets" : [ "title-string" ] },
132 { "bSortable": false, "bSearchable": false, "aTargets": [-1] }
134 }, columns_settings);
135 $("#filter_c").html('<p><a href="#" id="filter_transacs"><i class="fa fa-filter"></i> '+txtActivefilter+'</a>');
136 $('#filter_transacs').click(function(e) {
138 if ($(this).hasClass('filtered')) {
139 var filteredValue = '';
140 $(this).html('<i class="fa fa-filter"></i> '+txtActivefilter);
141 } else { //Not filtered. Let's do it!
142 var filteredValue = '^((?!0.00).*)$'; //Filter not matching 0.00 http://stackoverflow.com/a/406408
143 $(this).html('<i class="fa fa-filter"></i> '+txtInactivefilter);
145 table_account_fines.fnFilter(filteredValue, 4, true, false);
146 $(this).toggleClass('filtered');
149 $(".void").on("click",function(e){
150 if( confirm( _("Are you sure you want to void this credit?") ) ) {
160 [% INCLUDE 'intranet-bottom.inc' %]