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