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