Bug 10468: Adding holds table to summary print
[koha-equinox.git] / koha-tmpl / intranet-tmpl / prog / en / modules / members / moremember-print.tt
1 [% USE Koha %]
2 [% USE Branches %]
3 [% USE KohaDates %]
4 [% INCLUDE 'doc-head-open.inc' %]
5     <title>Summary for [% firstname %] [% surname %] ([% cardnumber %])</title>
6     <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
7     <link rel="shortcut icon" href="[% IF ( IntranetFavicon ) %][% IntranetFavicon %][% ELSE %][% interface %]/[% theme %]/img/favicon.ico[% END %]" type="image/x-icon" />
8     <link rel="stylesheet" type="text/css" href="[% themelang %]/css/print.css" />
9     [% INCLUDE 'slip-print.inc' #printThenClose %]
10 </head>
11 <body id="pat_moremember-print" class="pat" onload="printThenClose();">
12     <div id="main">
13         <h3><a href="/cgi-bin/koha/circ/circulation.pl?findborrower=[% cardnumber %]">Account summary: [% firstname %] [% surname %] ([% cardnumber %])</a></h3>
14
15         <ul>
16             <li>[% address %]<br />[% address2 %]</li>
17             <li>[% city %], [% zipcode %]</li>
18             <li>[% IF ( phone ) %][% phone %][% ELSE %](no phone number on file)[% END %]</li>
19             <li>[% IF ( email ) %][% email %][% ELSE %](no primary email on file)[% END %]</li>
20             [% IF ( emailpro ) %]
21                 <li>[% emailpro %]</li>
22             [% END %]
23             <li>Registration date: [% dateenrolled | $KohaDates %]</li>
24             <li>Expiration date: [% dateexpiry | $KohaDates %]</li>
25             <li>Library: [% Branches.GetName( branchcode ) %]</li>
26             <li>Category: [% description %]</li>
27         </ul>
28
29         [% IF ( issues ) %]
30             <table>
31                 <caption>Items checked out</caption>
32                 <tr>
33                     <th>Title</th>
34                     <th>Author</th>
35                     <th>Call no</th>
36                     <th>Item type</th>
37                     <th>Date due</th>
38                     <th>Barcode</th>
39                     <th>Charge</th>
40                     <th>Price</th>
41                     <th>Status</th>
42                 </tr>
43
44                 [% FOREACH issue IN issues %]
45                     [% IF ( issue.overdue ) %]<tr class="overdue">[% ELSE %]<tr>[% END %]
46                         <td>
47                             [% issue.title |html %]
48                             <a href="/cgi-bin/koha/catalogue/detail.pl?item=[% issue.itemnumber %]&amp;biblionumber=[% issue.biblionumber %]&amp;bi=[% issue.biblioitemnumber %]"></a>
49                         </td>
50                         <td>[% issue.author %]</td>
51                         <td>[% issue.itemcallnumber %]</td>
52                         <td>[% issue.itemtype_description %]</td>
53                         <td>[% issue.date_due | $KohaDates as_due_date => 1 %]</td>
54                         <td>[% issue.barcode %]</td>
55                         <td>[% issue.charge %]</td>
56                         <td>[% issue.replacementprice %]</td>
57                         <td>[% IF ( issue.overdue ) %]Overdue![% ELSE %]&nbsp;[% END %]</td>
58                     </tr>
59                 [% END %]
60
61             <tr>
62                 <td colspan="6" style="text-align: right; font-weight:bold;">Totals:</td>
63                 <td>[% totaldue %]</td>
64                 <td>[% totalprice %]</td>
65                 <td colspan="3">&nbsp;</td>
66             </tr>
67         </table>
68     [% END %]
69
70         [% IF ( reserves ) %]
71             <table>
72                 <caption>Pending holds</caption>
73                 <tr>
74                     <th>Title</th>
75                     <th>Author</th>
76                     <th>Placed on</th>
77                     <th>Expires on</th>
78                     <th>Pick up location</th>
79                 </tr>
80
81                 [% FOREACH reserve IN reserves %]
82                     <tr>
83                         <td>[% reserve.title %]</td>
84                         <td>[% reserve.author %]</td>
85                         <td>[% reserve.reservedate | $KohaDates %]</td>
86                         <td>[% reserve.expirationdate | $KohaDates %]</td>
87                         <td>[% reserve.waiting_at %]</td>
88                     </tr>
89                 [% END %]
90     </table>
91     [% END %]
92
93     [% IF ( accounts && ( totaldue != '0.00' ) ) %]
94         <table>
95             <caption>Account fines and payments</caption>
96             <tr>
97                 <th>Description of charges</th>
98                 <th>Date</th>
99                 <th>Amount</th>
100                 <th>Outstanding</th>
101             </tr>
102
103             [% FOREACH account IN accounts %]
104                 [% NEXT IF account.amountoutstanding == '0.00' %]
105                 <tr>
106                     <td>
107                         [% IF ( account.itemnumber ) %]<a href="/cgi-bin/koha/catalogue/moredetail.pl?biblionumber=[% account.biblionumber %]&amp;itemnumber=[% account.itemnumber %]">[% END %]
108                         [% account.description %]&nbsp;[% IF ( account.printtitle ) %] [% account.title |html %][% END %]
109                         [% IF ( account.itemnumber ) %]</a>[% END %]
110                     </td>
111                     <td>[% account.date | $KohaDates %]</td>
112                     <td>[% account.amount %]</td>
113                     <td>[% account.amountoutstanding %]</td>
114                 </tr>
115             [% END %]
116
117             <tfoot>
118                 <tr>
119                     <td colspan="3">Total due</td>
120                     <td colspan="2">[% totaldue %]</td>
121                 </tr>
122             </tfoot>
123         </table>
124     [% END %]
125
126 [% INCLUDE 'intranet-bottom.inc' %]