Bug 13618: Add html filters to all the variables
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / members / accountline-details.tt
1 [%- USE Price -%]
2 [%- USE KohaDates -%]
3 [%- USE AuthorisedValues -%]
4 [%- USE Branches -%]
5
6 [% INCLUDE 'doc-head-open.inc' %]
7 <title>Koha &rsaquo; Patrons &rsaquo; Account for [% INCLUDE 'patron-title.inc' %]</title>
8 [% INCLUDE 'doc-head-close.inc' %]
9 </head>
10 <body id="pat_discharges" class="pat">
11 [% INCLUDE 'header.inc' %]
12 [% INCLUDE 'patron-search.inc' %]
13
14 <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; Details for account line [% accountline.id | html %]</div>
15
16 <div id="doc3" class="yui-t2">
17 <div id="bd">
18     <div id="yui-main">
19         <div class="yui-b">
20             [% IF accountline %]
21                 [% IF type == 'credit' %]
22                     <h2>Details for payment</h2>
23                 [% ELSIF type == 'debit' %]
24                     <h2>Details for fee</h2>
25                 [% END %]
26
27                 <table id="table_account_fines">
28                     <thead>
29                         <tr>
30                             <th class="title-string">Date</th>
31                             <th>Description of charges</th>
32                             <th>Note</th>
33                             <th>Amount</th>
34                             <th>Outstanding</th>
35                         </tr>
36                     </thead>
37
38                     <tbody>
39                         <tr>
40                             <td>
41                                 <span title="[% accountline.date | html %]">[% accountline.date |$KohaDates %]</span>
42                             </td>
43                             <td>
44                                 [%- INCLUDE 'accounttype.inc' account => accountline -%]
45                                 [%- IF accountline.payment_type -%]
46                                     , [% AuthorisedValues.GetByCode('PAYMENT_TYPE', accountline.payment_type) | html %]
47                                 [%- END =%]
48                                 [%- IF accountline.description -%]
49                                     , [% accountline.description | html %]
50                                 [%- END -%]
51
52                                 &nbsp;
53                                 [% IF ( accountline.itemnumber ) %]
54                                     [% SET biblio = accountline.item.biblio %]
55                                     <a href="/cgi-bin/koha/catalogue/moredetail.pl?biblionumber=[% biblio.biblionumber | html %]&amp;itemnumber=[% accountline.itemnumber | html %]">[% biblio.title | html %]</a>
56                                 [% END %]
57                             </td>
58
59                             <td>
60                                 [% accountline.note | html_line_break %]
61                             </td>
62
63                             <td>
64                                 [% accountline.amount | $Price | html %]
65                             </td>
66
67                             <td>
68                                 [% accountline.amountoutstanding | $Price | html %]
69                             </td>
70                         </tr>
71                     </tbody>
72                 </table>
73
74                 [% IF type == 'credit' %]
75                     <h3>Fees paid</h3>
76                 [% ELSIF type == 'debit' %]
77                     <h3>Payments</h3>
78                 [% END %]
79
80                 [% IF account_offsets %]
81                     <table class="accountline-offsets-table" id="accountline-debits-table">
82                         <thead>
83                             <tr>
84                                 <th>Date created</th>
85                                 <th>Date updated</th>
86                                 <th>Amount</th>
87                                 <th>Amount outstanding</th>
88                                 <th>Type</th>
89                                 <th>Note</th>
90                                 <th>Transacting librarian</th>
91                                 <th>Date/Time of change</th>
92                                 <th>Amount of change</th>
93                                 <th>Type of change</th>
94                                 <th>&nbsp;</th>
95                             </tr>
96                         </thead>
97
98                         <tbody>
99                             [% FOREACH ao IN account_offsets %]
100                                 [% IF type == 'credit' %]
101                                     [% SET offset_accountline = ao.debit %]
102                                 [% ELSIF type == 'debit' %]
103                                     [% SET offset_accountline = ao.credit %]
104                                 [% END %]
105
106                                 [% IF offset_accountline %]
107                                     <tr>
108                                         <td>[% offset_accountline.date | $KohaDates %]</td>
109                                         <td>[% offset_accountline.timestamp | $KohaDates with_hours => 1 | html %]</td>
110                                         <td>[% offset_accountline.amount | $Price | html %]</td>
111                                         <td>[% offset_accountline.amountoutstanding | $Price | html %]</td>
112                                         <td>[% INCLUDE 'accounttype.inc' account => offset_accountline %]</td>
113                                         <td>[% offset_accountline.note | html %]</td>
114                                         <td>[% IF offset_accountline.manager_id %]<a href="moremember.pl?borrowernumber=[% offset_accountline.manager_id | html %]">[% offset_accountline.manager_id | html %]</a>[% END %]</td>
115                                         <td>[% ao.created_on | $KohaDates with_hours => 1 | html %]</td>
116                                         <td>[% ao.amount | $Price | html %]</td>
117                                         <td>[% INCLUDE 'account_offset_type.inc' account_offset => ao %]</td>
118                                         <td><a href="accountline-details.pl?accountlines_id=[% offset_accountline.id | html %]" class="btn btn-default btn-xs"><i class="fa fa-list"></i> Details</a></td>
119                                     </tr>
120                                 [% END %]
121                             [% END %]
122                         </tbody>
123                     </table>
124                 [% ELSE %]
125                     No details available for this payment.
126                 [% END %]
127             [% ELSE %]
128                 <div class="dialog message">
129                     <p>Account line not found.</p>
130                 </div>
131             [% END %]
132         </div>
133     </div>
134
135     <div class="yui-b">
136         [% INCLUDE 'circ-menu.inc' %]
137     </div>
138 </div>
139 [% INCLUDE 'intranet-bottom.inc' %]