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