Bug 11869: (follow-up) only display active fines
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / members / boraccount.tt
1 [% INCLUDE 'doc-head-open.inc' %]
2 <title>Koha &rsaquo; Patrons &rsaquo; Account for [% INCLUDE 'patron-title.inc' %]</title>
3 [% INCLUDE 'doc-head-close.inc' %]
4 </head>
5 <body id="pat_borraccount" class="pat">
6 [% INCLUDE 'header.inc' %]
7 [% INCLUDE 'patron-search.inc' %]
8
9 <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>
10
11 <div id="doc3" class="yui-t2">
12    
13    <div id="bd">
14         <div id="yui-main">
15         <div class="yui-b">
16 [% INCLUDE 'members-toolbar.inc' %]
17 <form action="/cgi-bin/koha/members/boraccount.pl" method="get"><input type="hidden" name="borrowernumber" id="borrowernumber" value="[% borrowernumber %]" /></form>
18
19 <!-- The manual invoice and credit buttons -->
20 <div class="statictabs">
21 <ul>
22     <li class="active"><a href="/cgi-bin/koha/members/boraccount.pl?borrowernumber=[% borrowernumber %]">Account</a></li>
23         <li><a href="/cgi-bin/koha/members/pay.pl?borrowernumber=[% borrowernumber %]" >Pay fines</a></li>
24         <li><a href="/cgi-bin/koha/members/maninvoice.pl?borrowernumber=[% borrowernumber %]" >Create manual invoice</a></li>
25         <li><a href="/cgi-bin/koha/members/mancredit.pl?borrowernumber=[% borrowernumber %]" >Create manual credit</a></li>
26 </ul>
27 <div class="tabs-container">
28 <!-- The table with the account items -->
29 <table>
30   <tr>
31         <th>Date</th>
32     <th>Description of charges</th>
33     <th>Note</th>
34     <th>Amount</th>
35     <th>Outstanding</th>
36     [% IF ( reverse_col ) %]
37     <th>&nbsp;</th>
38     [% END %]
39     <th>Print</th>
40   </tr>
41
42         <!-- FIXME: Shouldn't hardcode dollar signs, since Euro or Pound might be needed -->
43   [% FOREACH account IN accounts %]
44
45    [% IF ( loop.odd ) %]<tr>[% ELSE %]<tr class="highlight">[% END %]
46       <td>[% account.date %]</td>
47       <td>
48         [% SWITCH account.accounttype %]
49           [% CASE 'Pay' %]Payment,thanks
50           [% CASE 'N' %]New Card
51           [% CASE 'F' %]Fine
52           [% CASE 'A' %]Account management fee
53           [% CASE 'M' %]Sundry
54           [% CASE 'L' %]Lost Item
55           [% CASE 'W' %]Writeoff
56           [% CASE %][% account.accounttype %]
57         [%- END -%]
58         [%- IF account.description %], [% account.description %][% END %]
59         &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>
60       <td>[% account.note | html_line_break %]</td>
61       [% IF ( account.amountcredit ) %]<td class="credit">[% ELSE %]<td class="debit">[% END %][% account.amount %]</td>
62       [% IF ( account.amountoutstandingcredit ) %]<td class="credit">[% ELSE %]<td class="debit">[% END %][% account.amountoutstanding %]</td>
63     [% IF ( reverse_col ) %]
64       <td>
65         [% IF ( account.payment ) %]
66                 <a href="boraccount.pl?action=reverse&amp;accountlines_id=[% account.accountlines_id %]&amp;borrowernumber=[% account.borrowernumber %]">Reverse</a>
67         [% ELSE %]
68                 &nbsp;
69         [% END %]
70       </td>
71         [% END %]
72 <td>
73         [% IF ( account.payment ) %]
74                 <a target="_blank" href="printfeercpt.pl?action=print&amp;accountlines_id=[% account.accountlines_id %]&amp;borrowernumber=[% account.borrowernumber %]">Print</a>
75         [% ELSE %]
76                 <a target="_blank" href="printinvoice.pl?action=print&amp;accountlines_id=[% account.accountlines_id %]&amp;borrowernumber=[% account.borrowernumber %]">Print</a>
77         [% END %]
78       </td>
79     </tr>
80
81   [% END %]
82 <tfoot>
83   <tr>
84     <td colspan="4">Total due</td>
85     [% IF ( totalcredit ) %]
86       [% IF ( reverse_col ) %]
87         <td colspan="3" class="credit">
88       [% ELSE %]
89         <td colspan="2" class="credit">
90       [% END %]
91     [% ELSE %]
92       [% IF ( reverse_col ) %]
93         <td colspan="3" class="debit">
94       [% ELSE %]
95         <td colspan="2" class="credit">
96       [% END %]
97     [% END %]
98     [% total %]</td>
99   </tr>
100   </tfoot>
101 </table>
102 </div></div>
103
104 </div>
105 </div>
106
107 <div class="yui-b">
108 [% INCLUDE 'circ-menu.inc' %]
109 </div>
110 </div>
111 [% INCLUDE 'intranet-bottom.inc' %]