Bug 30733: Simplify translatable strings
[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-header.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             <h1>
64                 [% IF type == 'credit' %]
65                     <span>Details of payment</span>
66                 [% ELSIF type == 'debit' %]
67                     <span>Details of fee</span>
68                 [% END %]
69             </h1>
70
71             [% INCLUDE 'members-toolbar.inc' borrowernumber=patron.borrowernumber %]
72
73             [% IF accountline %]
74                 [% IF accountline.credit_type_code %]
75                     <h2>Details of credit</h2>
76                 [% ELSIF accountline.debit_type_code %]
77                     <h2>Details of debit</h2>
78                 [% END %]
79
80                 <table id="table_account_fines">
81                     <thead>
82                         <tr>
83                             <th>Date</th>
84                             <th>Description</th>
85                             <th>Barcode</th>
86                             <th>Due date</th>
87                             <th>Return date</th>
88                             <th>Note</th>
89                             <th>Amount</th>
90                             <th>Outstanding</th>
91                         </tr>
92                     </thead>
93
94                     <tbody>
95                         <tr>
96                             <td>
97                                 [% accountline.date | $KohaDates %]
98                             </td>
99                             <td>
100                                 [%- PROCESS account_type_description account=accountline -%]
101                                 [%- IF accountline.payment_type -%]
102                                     , [% AuthorisedValues.GetByCode('PAYMENT_TYPE', accountline.payment_type) | html %]
103                                 [%- END =%]
104                                 [%- IF accountline.description -%]
105                                     , [% accountline.description | html %]
106                                 [%- END -%]
107
108                                 &nbsp;
109                                 [% IF ( accountline.itemnumber ) %]
110                                     [% SET biblio = accountline.item.biblio %]
111                                     <a href="/cgi-bin/koha/catalogue/moredetail.pl?biblionumber=[% biblio.biblionumber | uri %]&amp;itemnumber=[% accountline.itemnumber | uri %]">[% biblio.title | html %]</a>
112                                 [% END %]
113                             </td>
114
115                             <td>
116                                 [% IF ( accountline.itemnumber ) %]
117                                     <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>
118                                 [% END %]
119                             </td>
120
121                             <td>
122                                 [% IF ( accountline.issue_id ) %]
123                                     [% accountline.checkout.date_due | $KohaDates as_due_date => 1 %]
124                                 [% END %]
125                             </td>
126
127                             <td>
128                                 [% IF ( accountline.issue_id ) %]
129                                     [% accountline.checkout.returndate | $KohaDates with_hours => 1 %]
130                                 [% END %]
131                             </td>
132
133                             <td>
134                                 [% accountline.note | html_line_break %]
135                             </td>
136
137                             <td>
138                                 [% accountline.amount | $Price %]
139                             </td>
140
141                             <td>
142                                 [% accountline.amountoutstanding | $Price %]
143                             </td>
144                         </tr>
145                     </tbody>
146                 </table>
147
148                 <h3>History</h3>
149                 <table class="accountline-offsets-table" id="accountline-debits-table">
150                     <thead>
151                         <tr>
152                             <th rowspan="2">Date</th>
153                             <th colspan="2">Change</th>
154                             <th rowspan="2">Action</th>
155                             <th colspan="4">Related transaction</th>
156                         </tr>
157                         <tr>
158                             <th>Increase</th>
159                             <th>Decrease</th>
160                             <th>Type</th>
161                             <th>Amount</th>
162                             <th>Librarian</th>
163                             <th>Note</th>
164                         </tr>
165                     </thead>
166
167                     <tbody>
168                         [% FOREACH ao IN account_offsets %]
169                                 [% IF ao.credit_id == accountline.accountlines_id %]
170                                     [% SET offset_accountline = ao.debit %]
171                                 [% ELSIF ao.debit_id == accountline.accountlines_id %]
172                                     [% SET offset_accountline = ao.credit %]
173                                 [% END %]
174
175                                 [%- BLOCK ao_description -%]
176                                     [%- SWITCH ao.type -%]
177                                         [%- CASE 'CREATE'           -%]<span>Created</span>
178                                         [%- CASE 'OVERDUE_INCREASE' -%]<span>Increase</span>
179                                         [%- CASE 'OVERDUE_DECREASE' -%]<span>Decrease</span>
180                                         [%- CASE 'APPLY'            -%]<span>Applied</span>
181                                         [%- CASE 'VOID'             -%]<span>Reversed</span>
182                                     [%- END -%]
183                                 [%- END -%]
184
185                                 <tr>
186                                     <td>[% ao.created_on | $KohaDates with_hours => 1%]</td>
187                                     <td>[%- IF ao.amount > 0 -%][% ao.amount | $Price %][% END %]</td>
188                                     <td>[%- IF ao.amount < 0 -%][% ao.amount | $Price %][% END %]</td>
189                                     <td>
190                                         [% PROCESS ao_description ao=ao %]
191                                     </td>
192                                     [%- IF offset_accountline -%]
193                                     <td>
194                                         [% PROCESS account_type_description account=offset_accountline %] (<a href="accountline-details.pl?accountlines_id=[% offset_accountline.id | uri %]">[% offset_accountline.id | html %]</a>)
195                                     </td>
196                                     <td>
197                                         [% offset_accountline.amount | $Price %]
198                                     </td>
199                                     <td>
200                                         [% IF offset_accountline.manager_id %]
201                                         <a href="moremember.pl?borrowernumber=[% offset_accountline.manager_id | uri %]">
202                                             [% IF offset_accountline.manager.firstname %]
203                                                 [% offset_accountline.manager.firstname | html %] [% offest_accountline.manager.surname | html %]
204                                             [% ELSE %]
205                                                 [% offset_accountline.manager.surname | html %]
206                                             [% END %]
207                                         </a>
208                                         [% END %]
209                                     </td>
210                                     [%- ELSE -%]
211                                     <td></td>
212                                     <td></td>
213                                     <td></td>
214                                     [%- END -%]
215                                     <td>[% offset_accountline.note | html %]</td>
216                                 </tr>
217                         [% END %]
218                     </tbody>
219                 </table>
220             [% ELSE %]
221                 <div class="dialog message">
222                     Account not found
223                 </div>
224             [% END %]
225
226             </main>
227         </div> <!-- /.col-sm-10.col-sm-push-2 -->
228
229         <div class="col-sm-2 col-sm-pull-10">
230             <aside>
231                 [% INCLUDE 'circ-menu.inc' %]
232             </aside>
233         </div> <!-- /.col-sm-2.col-sm-pull-10 -->
234     </div> <!-- /.row -->
235
236
237 [% MACRO jsinclude BLOCK %]
238     [% INCLUDE 'str/members-menu.inc' %]
239     [% Asset.js("js/members-menu.js") | $raw %]
240 [% END %]
241
242 [% INCLUDE 'intranet-bottom.inc' %]