Bug 11897: (QA follow-up) Fixes for JS12
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / members / moremember-print.tt
1 [% USE Koha %]
2 [% USE Branches %]
3 [% USE KohaDates %]
4 [% USE Price %]
5 [% SET footerjs = 1 %]
6 [% INCLUDE 'doc-head-open.inc' %]
7     <title>Summary for [% patron.firstname | html %] [% patron.surname | html %] ([% patron.cardnumber | html %])</title>
8     [% INCLUDE 'doc-head-close.inc' %]
9 </head>
10
11 <body id="pat_moremember-print" class="pat">
12     <div id="main">
13         <h3><a href="/cgi-bin/koha/circ/circulation.pl?findborrower=[% patron.cardnumber | html %]">Account summary: [% patron.firstname | html %] [% patron.surname | html %] ([% patron.cardnumber | html %])</a></h3>
14
15         <ul>
16             [% IF Koha.Preference( 'AddressFormat' ) %]
17                 [% INCLUDE "member-display-address-style-${ Koha.Preference( 'AddressFormat' ) }.inc" %]
18             [% ELSE %]
19                 [% INCLUDE 'member-display-address-style-us.inc' %]
20             [% END %]
21             <li>[% IF ( patron.phone ) %][% patron.phone | html %][% ELSE %](no phone number on file)[% END %]</li>
22             <li>[% IF ( patron.email ) %][% patron.email | html %][% ELSE %](no primary email on file)[% END %]</li>
23             [% IF ( patron.emailpro ) %]
24                 <li>[% patron.emailpro | html %]</li>
25             [% END %]
26             <li>Registration date: [% patron.dateenrolled | $KohaDates %]</li>
27             <li>Expiration date: [% patron.dateexpiry | $KohaDates %]</li>
28             <li>Library: [% Branches.GetName( patron.branchcode ) | html %]</li>
29             <li>Category: [% patron.category.description | html %]</li>
30         </ul>
31
32         [% IF ( issues ) %]
33             <table>
34                 <caption>Items checked out</caption>
35                 <tr>
36                     <th>Title</th>
37                     <th>Author</th>
38                     <th>Call no</th>
39                     <th>Item type</th>
40                     <th>Date due</th>
41                     <th>Barcode</th>
42                     <th>Charge</th>
43                     <th>Price</th>
44                     <th>Status</th>
45                 </tr>
46
47                 [% FOREACH issue IN issues %]
48                     [% IF ( issue.overdue ) %]<tr class="overdue">[% ELSE %]<tr>[% END %]
49                         <td>
50                             [% issue.title | html %]
51                             <a href="/cgi-bin/koha/catalogue/detail.pl?item=[% issue.itemnumber | html %]&amp;biblionumber=[% issue.biblionumber | html %]&amp;bi=[% issue.biblioitemnumber | html %]"></a>
52                         </td>
53                         <td>[% issue.author | html %]</td>
54                         <td>[% issue.itemcallnumber | html %]</td>
55                         <td>[% issue.itemtype_description | html %]</td>
56                         <td>[% issue.date_due | $KohaDates as_due_date => 1 | html %]</td>
57                         <td>[% issue.barcode | html %]</td>
58                         <td>[% issue.charge | html %]</td>
59                         <td>[% issue.replacementprice | html %]</td>
60                         <td>[% IF ( issue.overdue ) %]Overdue![% ELSE %]&nbsp;[% END %]</td>
61                     </tr>
62                 [% END %]
63
64             <tr>
65                 <td colspan="6" style="text-align: right; font-weight:bold;">Totals:</td>
66                 <td>[% totaldue | html %]</td>
67                 <td>[% totalprice | html %]</td>
68                 <td colspan="3">&nbsp;</td>
69             </tr>
70         </table>
71     [% END %]
72
73     [% IF ( reserves ) %]
74         <table>
75             <caption>Pending holds</caption>
76             <tr>
77                 <th>Title</th>
78                 <th>Author</th>
79                 <th>Placed on</th>
80                 <th>Expires on</th>
81                 <th>Pick up location</th>
82             </tr>
83
84             [% FOREACH reserve IN reserves %]
85                 <tr>
86                     <td>[% reserve.title | html %]</td>
87                     <td>[% reserve.author | html %]</td>
88                     <td>[% reserve.reservedate | $KohaDates %]</td>
89                     <td>[% reserve.expirationdate | $KohaDates %]</td>
90                     <td>[% reserve.waiting_at | html %]</td>
91                 </tr>
92             [% END %]
93         </table>
94     [% END %]
95     [% IF accounts && totaldue != 0 %]
96         <table id="table_account_fines">
97             <caption>Account fines and payments</caption>
98             <thead>
99               <tr>
100                   <th>Date</th>
101                   <th>Description of charges</th>
102                   <th>Note</th>
103                   <th>Amount</th>
104                   <th>Outstanding</th>
105                 </tr>
106             </thead>
107
108             [% FOREACH account IN accounts %]
109                <tr>
110                   <td>[% account.date | $KohaDates %]</td>
111                   <td>
112                       [% INCLUDE 'accounttype.inc' accountline => account %]
113                       [%- IF account.payment_type %]
114                           , [% AuthorisedValues.GetByCode('PAYMENT_TYPE', account.payment_type) | html %]
115                       [% END %]
116                       [%- IF account.description %]
117                           , [% account.description | html %]
118                       [% END %]
119                       &nbsp;
120                       [% IF ( account.itemnumber AND account.accounttype != 'F' AND account.accounttype != 'FU' ) %]
121                           <a href="/cgi-bin/koha/catalogue/moredetail.pl?biblionumber=[% account.item.biblionumber | html %]&amp;itemnumber=[% account.itemnumber | html %]">[% account.item.biblio.title | html %]</a>
122                       [% END %]
123                   </td>
124                   <td>
125                       [% account.note | html_line_break %]
126                   </td>
127                   [% IF ( account.amount < 0 ) %]
128                       <td class="credit" style="text-align: right;">
129                   [% ELSE %]
130                       <td class="debit" style="text-align: right;">
131                   [% END %][% account.amount | $Price %]
132                       </td>
133                   [% IF ( account.amountoutstanding < 0 ) %]
134                       <td class="credit" style="text-align: right;">
135                   [% ELSE %]
136                       <td class="debit" style="text-align: right;">
137                   [% END %]
138                           [% account.amountoutstanding | $Price %]
139                       </td>
140                 </tr>
141             [% END %]
142
143             <tfoot>
144                 <tr>
145                     <td colspan="4">Total due</td>
146                     <td colspan="2" style="text-align:right;">[% totaldue | $Price %]</td>
147                 </tr>
148             </tfoot>
149         </table>
150     [% END %]
151
152 [% MACRO jsinclude BLOCK %]
153     [% INCLUDE 'slip-print.inc' #printThenClose %]
154 [% END %]
155
156 [% INCLUDE 'intranet-bottom.inc' %]