Bug 29261: (bug 15812 follow-up 3) Fix translation issue in include file
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / members / accountline-details.tt
1 [% USE raw %]
2 [% USE Asset %]
3 [%- USE Price -%]
4 [%- USE KohaDates -%]
5 [%- USE AuthorisedValues -%]
6 [%- USE Branches -%]
7 [% SET footerjs = 1 %]
8 [% PROCESS 'accounts.inc' %]
9 [% INCLUDE 'doc-head-open.inc' %]
10 <title>Details of [% IF type == 'credit' %]credit[% ELSE %]debit[% END %] &rsaquo; [% INCLUDE 'patron-title.inc' no_html = 1 %] &rsaquo; Patrons &rsaquo; Koha</title>
11 [% INCLUDE 'doc-head-close.inc' %]
12 </head>
13
14 <body id="pat_accountline_details" class="pat">
15 [% INCLUDE 'header.inc' %]
16 [% INCLUDE 'patron-search.inc' %]
17
18 <nav id="breadcrumbs" aria-label="Breadcrumb" class="breadcrumb">
19     <ol>
20         <li>
21             <a href="/cgi-bin/koha/mainpage.pl">Home</a>
22         </li>
23         <li>
24             <a href="/cgi-bin/koha/members/members-home.pl">Patrons</a>
25         </li>
26
27
28         [% IF accountline %]
29             [% IF accountline.credit_type_code %]
30             <li>
31                 <a href="/cgi-bin/koha/members/boraccount.pl?borrowernumber=[% patron.borrowernumber | uri %]">Account for [% INCLUDE 'patron-title.inc' %]</a>
32             </li>
33             <li>
34                 <a href="#" aria-current="page">
35                     Details of credit ([% accountline.id | html %])
36                 </a>
37             </li>
38             [% ELSIF accountline.debit_type_code %]
39             <li>
40                 <a href="/cgi-bin/koha/members/boraccount.pl?borrowernumber=[% patron.borrowernumber | uri %]">Account for [% INCLUDE 'patron-title.inc' %]</a>
41             </li>
42             <li>
43                 <a href="#" aria-current="page">
44                     Details of debit ([% accountline.id | html %])
45                 </a>
46             </li>
47             [% END %]
48         [% ELSE %]
49             <li>
50                 <a href="#" aria-current="page">
51                     Account for [% INCLUDE 'patron-title.inc' %]
52                 </a>
53             </li>
54         [% END %]
55     </ol>
56 </nav>
57
58 <div class="main container-fluid">
59     <div class="row">
60         <div class="col-sm-10 col-sm-push-2">
61             <main>
62
63             [% INCLUDE 'members-toolbar.inc' borrowernumber=patron.borrowernumber %]
64
65             [% IF accountline %]
66                 [% IF accountline.credit_type_code %]
67                     <h2>Details of credit</h2>
68                 [% ELSIF accountline.debit_type_code %]
69                     <h2>Details of debit</h2>
70                 [% END %]
71
72                 <table id="table_account_fines">
73                     <thead>
74                         <tr>
75                             <th>Date</th>
76                             <th>Description</th>
77                             <th>Barcode</th>
78                             <th>Due date</th>
79                             <th>Return date</th>
80                             <th>Note</th>
81                             <th>Amount</th>
82                             <th>Outstanding</th>
83                         </tr>
84                     </thead>
85
86                     <tbody>
87                         <tr>
88                             <td>
89                                 [% accountline.date | $KohaDates %]
90                             </td>
91                             <td>
92                                 [%- PROCESS account_type_description account=accountline -%]
93                                 [%- IF accountline.payment_type -%]
94                                     , [% AuthorisedValues.GetByCode('PAYMENT_TYPE', accountline.payment_type) | html %]
95                                 [%- END =%]
96                                 [%- IF accountline.description -%]
97                                     , [% accountline.description | html %]
98                                 [%- END -%]
99
100                                 &nbsp;
101                                 [% IF ( accountline.itemnumber ) %]
102                                     [% SET biblio = accountline.item.biblio %]
103                                     <a href="/cgi-bin/koha/catalogue/moredetail.pl?biblionumber=[% biblio.biblionumber | uri %]&amp;itemnumber=[% accountline.itemnumber | uri %]">[% biblio.title | html %]</a>
104                                 [% END %]
105                             </td>
106
107                             <td>
108                                 [% IF ( accountline.itemnumber ) %]
109                                     <a href="/cgi-bin/koha/catalogue/moredetail.pl?biblionumber=[% accountline.item.biblionumber | uri %]&amp;itemnumber=[% accountline.itemnumber | uri %]#item[% accountline.itemnumber | uri %]">[% accountline.item.barcode | html %]</a>
110                                 [% END %]
111                             </td>
112
113                             <td>
114                                 [% IF ( accountline.issue_id ) %]
115                                     [% accountline.checkout.date_due | $KohaDates as_due_date => 1 %]
116                                 [% END %]
117                             </td>
118
119                             <td>
120                                 [% IF ( accountline.issue_id ) %]
121                                     [% accountline.checkout.returndate | $KohaDates with_hours => 1 %]
122                                 [% END %]
123                             </td>
124
125                             <td>
126                                 [% accountline.note | html_line_break %]
127                             </td>
128
129                             <td>
130                                 [% accountline.amount | $Price %]
131                             </td>
132
133                             <td>
134                                 [% accountline.amountoutstanding | $Price %]
135                             </td>
136                         </tr>
137                     </tbody>
138                 </table>
139
140                 <h3>History</h3>
141                 <table class="accountline-offsets-table" id="accountline-debits-table">
142                     <thead>
143                         <tr>
144                             <th rowspan="2">Date</th>
145                             <th colspan="2">Change</th>
146                             <th rowspan="2">Action</th>
147                             <th colspan="4">Related transaction</th>
148                         </tr>
149                         <tr>
150                             <th>Increase</th>
151                             <th>Decrease</th>
152                             <th>Type</th>
153                             <th>Amount</th>
154                             <th>Librarian</th>
155                             <th>Note</th>
156                         </tr>
157                     </thead>
158
159                     <tbody>
160                         [% FOREACH ao IN account_offsets %]
161                                 [% IF ao.credit_id == accountline.accountlines_id %]
162                                     [% SET offset_accountline = ao.debit %]
163                                 [% ELSIF ao.debit_id == accountline.accountlines_id %]
164                                     [% SET offset_accountline = ao.credit %]
165                                 [% END %]
166
167                                 [%- BLOCK ao_description -%]
168                                     [%- SWITCH ao.type -%]
169                                         [%- CASE 'CREATE'           -%]<span>Created</span>
170                                         [%- CASE 'OVERDUE_INCREASE' -%]<span>Increase</span>
171                                         [%- CASE 'OVERDUE_DECREASE' -%]<span>Decrease</span>
172                                         [%- CASE 'APPLY'            -%]<span>Applied</span>
173                                         [%- CASE 'VOID'             -%]<span>Reversed</span>
174                                     [%- END -%]
175                                 [%- END -%]
176
177                                 <tr>
178                                     <td>[% ao.created_on | $KohaDates with_hours => 1%]</td>
179                                     <td>[%- IF ao.amount > 0 -%][% ao.amount | $Price %][% END %]</td>
180                                     <td>[%- IF ao.amount < 0 -%][% ao.amount | $Price %][% END %]</td>
181                                     <td>
182                                         [% PROCESS ao_description ao=ao %]
183                                     </td>
184                                     [%- IF offset_accountline -%]
185                                     <td>
186                                         [% PROCESS account_type_description account=offset_accountline %] (<a href="accountline-details.pl?accountlines_id=[% offset_accountline.id | uri %]">[% offset_accountline.id | html %]</a>)
187                                     </td>
188                                     <td>
189                                         [% offset_accountline.amount | $Price %]
190                                     </td>
191                                     <td>
192                                         [% IF offset_accountline.manager_id %]
193                                         <a href="moremember.pl?borrowernumber=[% offset_accountline.manager_id | uri %]">
194                                             [% IF offset_accountline.manager.firstname %]
195                                                 [% offset_accountline.manager.firstname | html %] [% offest_accountline.manager.surname | html %]
196                                             [% ELSE %]
197                                                 [% offset_accountline.manager.surname | html %]
198                                             [% END %]
199                                         </a>
200                                         [% END %]
201                                     </td>
202                                     [%- ELSE -%]
203                                     <td></td>
204                                     <td></td>
205                                     <td></td>
206                                     [%- END -%]
207                                     <td>[% offset_accountline.note | html %]</td>
208                                 </tr>
209                         [% END %]
210                     </tbody>
211                 </table>
212             [% ELSE %]
213                 <div class="dialog message">
214                     Account not found
215                 </div>
216             [% END %]
217
218             </main>
219         </div> <!-- /.col-sm-10.col-sm-push-2 -->
220
221         <div class="col-sm-2 col-sm-pull-10">
222             <aside>
223                 [% INCLUDE 'circ-menu.inc' %]
224             </aside>
225         </div> <!-- /.col-sm-2.col-sm-pull-10 -->
226     </div> <!-- /.row -->
227
228
229 [% MACRO jsinclude BLOCK %]
230     [% INCLUDE 'str/members-menu.inc' %]
231     [% Asset.js("js/members-menu.js") | $raw %]
232 [% END %]
233
234 [% INCLUDE 'intranet-bottom.inc' %]