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