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