Bug 19489: Change method name issue --> checkout
[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>Koha &rsaquo; Patrons &rsaquo; [% INCLUDE 'patron-title.inc' no_html = 1 %] &rsaquo; Details of fee</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 <div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo; <a href="/cgi-bin/koha/members/members-home.pl">Patrons</a>  &rsaquo; <a href="/cgi-bin/koha/members/boraccount.pl?borrowernumber=[% patron.borrowernumber | html %]">Account for [% INCLUDE 'patron-title.inc' %]</a> &rsaquo;
19     [% IF type == 'credit' %]
20         Details of payment
21     [% ELSIF type == 'debit' %]
22         Details of fee
23     [% END %]
24 </div>
25
26 <div class="main container-fluid">
27     <div class="row">
28         <div class="col-sm-10 col-sm-push-2">
29             <main>
30
31             [% INCLUDE 'members-toolbar.inc' borrowernumber=patron.borrowernumber %]
32
33             [% IF accountline %]
34                 [% IF type == 'credit' %]
35                     <h2>Details of payment</h2>
36                 [% ELSIF type == 'debit' %]
37                     <h2>Details of fee</h2>
38                 [% END %]
39
40                 <table id="table_account_fines">
41                     <thead>
42                         <tr>
43                             <th class="title-string">Date</th>
44                             <th>Description of charges</th>
45                             <th>Barcode</th>
46                             <th>Due date</th>
47                             <th>Return date</th>
48                             <th>Note</th>
49                             <th>Amount</th>
50                             <th>Outstanding</th>
51                         </tr>
52                     </thead>
53
54                     <tbody>
55                         <tr>
56                             <td>
57                                 <span title="[% accountline.date | html %]">[% accountline.date |$KohaDates %]</span>
58                             </td>
59                             <td>
60                                 [%- PROCESS account_type_description account=accountline -%]
61                                 [%- IF accountline.payment_type -%]
62                                     , [% AuthorisedValues.GetByCode('PAYMENT_TYPE', accountline.payment_type) | html %]
63                                 [%- END =%]
64                                 [%- IF accountline.description -%]
65                                     , [% accountline.description | html %]
66                                 [%- END -%]
67
68                                 &nbsp;
69                                 [% IF ( accountline.itemnumber ) %]
70                                     [% SET biblio = accountline.item.biblio %]
71                                     <a href="/cgi-bin/koha/catalogue/moredetail.pl?biblionumber=[% biblio.biblionumber | uri %]&amp;itemnumber=[% accountline.itemnumber | uri %]">[% biblio.title | html %]</a>
72                                 [% END %]
73                             </td>
74
75                             <td>
76                                 [% IF ( accountline.itemnumber ) %]
77                                     <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>
78                                 [% END %]
79                             </td>
80
81                             <td>
82                                 [% IF ( accountline.issue_id ) %]
83                                     [% accountline.checkout.date_due | $KohaDates as_due_date => 1 %]
84                                 [% END %]
85                             </td>
86
87                             <td>
88                                 [% IF ( accountline.issue_id ) %]
89                                     [% accountline.checkout.returndate | $KohaDates with_hours => 1 %]
90                                 [% END %]
91                             </td>
92
93                             <td>
94                                 [% accountline.note | html_line_break %]
95                             </td>
96
97                             <td>
98                                 [% accountline.amount | $Price %]
99                             </td>
100
101                             <td>
102                                 [% accountline.amountoutstanding | $Price %]
103                             </td>
104                         </tr>
105                     </tbody>
106                 </table>
107
108
109                 [% IF type == 'credit' %]
110                     <h3>Fees paid</h3>
111                 [% ELSIF type == 'debit' %]
112                     <h3>Payments</h3>
113                 [% END %]
114
115                 <table class="accountline-offsets-table" id="accountline-debits-table">
116                     <thead>
117                         <tr>
118                             <th>Date created</th>
119                             <th>Date updated</th>
120                             <th>Amount</th>
121                             <th>Amount outstanding</th>
122                             <th>Type</th>
123                             <th>Note</th>
124                             <th>Transacting librarian</th>
125                             <th>Date/time of change</th>
126                             <th>Amount of change</th>
127                             <th>Type of change</th>
128                             <th>&nbsp;</th>
129                         </tr>
130                     </thead>
131
132                     <tbody>
133                         [% FOREACH ao IN account_offsets %]
134                             [% IF type == 'credit' %]
135                                 [% SET offset_accountline = ao.debit %]
136                             [% ELSIF type == 'debit' %]
137                                 [% SET offset_accountline = ao.credit %]
138                             [% END %]
139
140                             [% IF offset_accountline %]
141                                 <tr>
142                                     <td>[% offset_accountline.date | $KohaDates %]</td>
143                                     <td>[% offset_accountline.timestamp | $KohaDates  with_hours => 1 %]</td>
144                                     <td>[% offset_accountline.amount | $Price %]</td>
145                                     <td>[% offset_accountline.amountoutstanding | $Price %]</td>
146                                     <td>[% PROCESS account_type_description account=offset_accountline %]</td>
147                                     <td>[% offset_accountline.note | html %]</td>
148                                     <td>[% IF offset_accountline.manager_id %]<a href="moremember.pl?borrowernumber=[% offset_accountline.manager_id | uri %]">[% offset_accountline.manager_id | html %]</a>[% END %]</td>
149                                     <td>[% ao.created_on | $KohaDates  with_hours => 1 %]</td>
150                                     <td>[% ao.amount | $Price %]</td>
151                                     <td>[% PROCESS offset_type_description account_offset=ao %]</td>
152                                     <td><a href="accountline-details.pl?accountlines_id=[% offset_accountline.id | uri %]" class="btn btn-default btn-xs"><i class="fa fa-list"></i> Details</a></td>
153                                 </tr>
154                             [% END %]
155                         [% END %]
156                     </tbody>
157                 </table>
158             [% ELSE %]
159                 <div class="dialog message">
160                     [% IF type == 'credit' %]
161                         Payment not found
162                     [% ELSIF type == 'debit' %]
163                         Fee not found
164                     [% END %]
165                 </div>
166             [% END %]
167
168             </main>
169         </div> <!-- /.col-sm-10.col-sm-push-2 -->
170
171         <div class="col-sm-2 col-sm-pull-10">
172             <aside>
173                 [% INCLUDE 'circ-menu.inc' %]
174             </aside>
175         </div> <!-- /.col-sm-2.col-sm-pull-10 -->
176     </div> <!-- /.row -->
177
178
179 [% MACRO jsinclude BLOCK %]
180     [% INCLUDE 'str/members-menu.inc' %]
181     [% Asset.js("js/members-menu.js") | $raw %]
182 [% END %]
183
184 [% INCLUDE 'intranet-bottom.inc' %]