Bug 4041: Third step - Display address on patron's pages using the system preference
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / members / boraccount.tt
1 [% USE Koha %]
2 [% USE KohaDates %]
3 [% INCLUDE 'doc-head-open.inc' %]
4 <title>Koha &rsaquo; Patrons &rsaquo; Account for [% INCLUDE 'patron-title.inc' %]</title>
5 [% INCLUDE 'doc-head-close.inc' %]
6 <link rel="stylesheet" type="text/css" href="[% themelang %]/css/datatables.css" />
7 [% INCLUDE 'datatables.inc' %]
8 <script type="text/javascript">
9 $(document).ready(function() {
10     var txtActivefilter = _("Filter paid transactions");
11     var txtInactivefilter = _("Show all transactions");
12     var table_account_fines = $("#table_account_fines").dataTable($.extend(true, {}, dataTablesDefaults, {
13         "sPaginationType": "four_button",
14         'aaSorting': [[0, 'desc']],
15         "sDom": 'C<"top pager"ilpf><"#filter_c">tr<"bottom pager"ip>',
16         "aoColumnDefs": [
17             { "sType": "title-string", "aTargets" : [ "title-string" ] }
18         ]
19     }));
20     $("#filter_c").html('<p><a href="#" id="filter_transacs">'+txtActivefilter+'</a>');
21     $('#filter_transacs').click(function(e) {
22         e.preventDefault();
23         if ($(this).hasClass('filtered')) {
24             var filteredValue = '';
25             $(this).text(txtActivefilter);
26         } else { //Not filtered. Let's do it!
27             var filteredValue = '^((?!0.00).*)$'; //Filter not matching 0.00 http://stackoverflow.com/a/406408
28             $(this).text(txtInactivefilter);
29         }
30         table_account_fines.fnFilter(filteredValue, 4, true, false);
31         $(this).toggleClass('filtered');
32     });
33 });
34 </script>
35 </head>
36 <body id="pat_borraccount" class="pat">
37 [% INCLUDE 'header.inc' %]
38 [% INCLUDE 'patron-search.inc' %]
39
40 <div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo; <a href="/cgi-bin/koha/members/members-home.pl">Patrons</a>  &rsaquo; Account for [% INCLUDE 'patron-title.inc' %]</div>
41
42 <div id="doc3" class="yui-t2">
43    
44    <div id="bd">
45         <div id="yui-main">
46         <div class="yui-b">
47 [% INCLUDE 'members-toolbar.inc' %]
48 <form action="/cgi-bin/koha/members/boraccount.pl" method="get"><input type="hidden" name="borrowernumber" id="borrowernumber" value="[% borrowernumber %]" /></form>
49
50 <!-- The manual invoice and credit buttons -->
51 <div class="statictabs">
52 <ul>
53     <li class="active"><a href="/cgi-bin/koha/members/boraccount.pl?borrowernumber=[% borrowernumber %]">Account</a></li>
54         <li><a href="/cgi-bin/koha/members/pay.pl?borrowernumber=[% borrowernumber %]" >Pay fines</a></li>
55         <li><a href="/cgi-bin/koha/members/maninvoice.pl?borrowernumber=[% borrowernumber %]" >Create manual invoice</a></li>
56         <li><a href="/cgi-bin/koha/members/mancredit.pl?borrowernumber=[% borrowernumber %]" >Create manual credit</a></li>
57 </ul>
58 <div class="tabs-container">
59 <!-- The table with the account items -->
60 <table id="table_account_fines">
61     <thead>
62       <tr>
63           <th class="title-string">Date</th>
64           <th>Description of charges</th>
65           <th>Note</th>
66           <th>Amount</th>
67           <th>Outstanding</th>
68           [% IF ( reverse_col ) %]
69               <th>&nbsp;</th>
70           [% END %]
71           <th>Print</th>
72         </tr>
73     </thead>
74
75         <!-- FIXME: Shouldn't hardcode dollar signs, since Euro or Pound might be needed -->
76   [% FOREACH account IN accounts %]
77
78    [% IF ( loop.odd ) %]<tr>[% ELSE %]<tr class="highlight">[% END %]
79    <td><span title="[% account.date %]">[% account.date |$KohaDates %]</span></td>
80       <td>
81         [% SWITCH account.accounttype %]
82           [% CASE 'Pay' %]Payment, thanks
83           [% CASE 'Pay00' %]Payment, thanks (cash via SIP2)
84           [% CASE 'Pay01' %]Payment, thanks (VISA via SIP2)
85           [% CASE 'Pay02' %]Payment, thanks (credit card via SIP2)
86           [% CASE 'N' %]New card
87           [% CASE 'F' %]Fine
88           [% CASE 'A' %]Account management fee
89           [% CASE 'M' %]Sundry
90           [% CASE 'L' %]Lost item
91           [% CASE 'W' %]Writeoff
92           [% CASE 'FU' %]Accruing fine
93           [% CASE 'Rent' %]Rental fee
94           [% CASE 'FOR' %]Forgiven
95           [% CASE 'LR' %]Lost item fee refund
96           [% CASE 'PAY' %]Payment
97           [% CASE 'WO' %]Writeoff
98           [% CASE 'C' %]Credit
99           [% CASE 'CR' %]Credit
100           [% CASE %][% account.accounttype %]
101         [%- END -%]
102         [%- IF account.description %], [% account.description %][% END %]
103         &nbsp;[% IF ( account.itemnumber ) %]<a href="/cgi-bin/koha/catalogue/moredetail.pl?biblionumber=[% account.biblionumber %]&amp;itemnumber=[% account.itemnumber %]">View item</a>&nbsp;[% END %][% account.title |html %]</td>
104       <td>[% account.note | html_line_break %]</td>
105       [% IF ( account.amountcredit ) %]<td class="credit">[% ELSE %]<td class="debit">[% END %][% account.amount %]</td>
106       [% IF ( account.amountoutstandingcredit ) %]<td class="credit">[% ELSE %]<td class="debit">[% END %][% account.amountoutstanding %]</td>
107     [% IF ( reverse_col ) %]
108       <td>
109         [% IF ( account.payment ) %]
110                 <a href="boraccount.pl?action=reverse&amp;accountlines_id=[% account.accountlines_id %]&amp;borrowernumber=[% account.borrowernumber %]">Reverse</a>
111         [% ELSE %]
112                 &nbsp;
113         [% END %]
114       </td>
115         [% END %]
116 <td>
117         [% IF ( account.payment ) %]
118                 <a target="_blank" href="printfeercpt.pl?action=print&amp;accountlines_id=[% account.accountlines_id %]&amp;borrowernumber=[% account.borrowernumber %]">Print</a>
119         [% ELSE %]
120                 <a target="_blank" href="printinvoice.pl?action=print&amp;accountlines_id=[% account.accountlines_id %]&amp;borrowernumber=[% account.borrowernumber %]">Print</a>
121         [% END %]
122       </td>
123     </tr>
124
125   [% END %]
126 <tfoot>
127   <tr>
128     <td colspan="4">Total due</td>
129     [% IF ( totalcredit ) %]
130       [% IF ( reverse_col ) %]
131         <td colspan="3" class="credit">
132       [% ELSE %]
133         <td colspan="2" class="credit">
134       [% END %]
135     [% ELSE %]
136       [% IF ( reverse_col ) %]
137         <td colspan="3" class="debit">
138       [% ELSE %]
139         <td colspan="2" class="credit">
140       [% END %]
141     [% END %]
142     [% total %]</td>
143   </tr>
144   </tfoot>
145 </table>
146 </div></div>
147
148 </div>
149 </div>
150
151 <div class="yui-b">
152 [% INCLUDE 'circ-menu.inc' %]
153 </div>
154 </div>
155 [% INCLUDE 'intranet-bottom.inc' %]