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