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