Bug 19489: Detailed Description of charges in Patron accounting
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / members / printinvoice.tt
1 [% USE raw %]
2 [% USE Asset %]
3 [% USE Koha %]
4 [% USE Branches %]
5 [% USE KohaDates %]
6 [% USE Price %]
7 [% SET footerjs = 1 %]
8
9 [% PROCESS 'accounts.inc' %]
10
11 [% INCLUDE 'doc-head-open.inc' %]
12 <title>Print receipt for [% patron.cardnumber | html %]</title>
13 [% INCLUDE 'doc-head-close.inc' %]
14 [% Asset.css("css/printreceiptinvoice.css") | $raw %]
15 </head>
16
17 <body id="printinvoice" class="pat">
18
19 <div id="receipt">
20 <!-- The table with the account items -->
21 <table>
22 [% IF ( LibraryName ) %]
23   <tr>
24     <th colspan="8" class="centerednames">
25         <h3>[% LibraryName | html %]</h3>
26         </th>
27   </tr>
28 [% END %]
29   <tr>
30     <th colspan="8" class="centerednames">
31         <h2><u>INVOICE</u></h2>
32     </th>
33   </tr>
34   <tr>
35     <th colspan="8" class="centerednames">
36         <h2>[% Branches.GetName( patron.branchcode ) | html %]</h2>
37         </th>
38   </tr>
39   <tr>
40     <th colspan="8" >
41         Bill to: [% patron.firstname | html %] [% patron.surname | html %] <br />
42         Card number: [% patron.cardnumber | html %]<br />
43         </th>
44   </tr>
45   <tr>
46         <th>Date</th>
47     <th>Description of charges</th>
48     <th>Barcode</th>
49     <th>Due date</th>
50     <th>Return date</th>
51     <th>Note</th>
52     <th style="text-align:right;">Amount</th>
53     <th style="text-align:right;">Amount outstanding</th>
54  </tr>
55
56   [% FOREACH account IN accounts %]
57 <tr class="highlight">
58       <td>[% account.date | $KohaDates%]</td>
59        <td>
60         [% PROCESS account_type_description account=account %]
61         [%- IF account.description %], [% account.description | html %][% END %]
62       </td>
63       <td>[% account.item.barcode | html %]</td>
64       <td>[% account.issue.date_due | $KohaDates as_due_date => 1 %]</td>
65       <td>[% account.issue.returndate | $KohaDates with_hours => 1 %]</td>
66       <td>[% account.note | html %]</td>
67       [% IF ( account.amountcredit ) %]<td class="credit">[% ELSE %]<td class="debit">[% END %][% account.amount | $Price %]</td>
68       [% IF ( account.amountoutstandingcredit ) %]<td class="credit">[% ELSE %]<td class="debit">[% END %][% account.amountoutstanding | $Price %]</td>
69     </tr>
70
71   [% END %]
72 <tfoot>
73   <tr>
74     <td colspan="7">Total outstanding dues as on date: </td>
75     [% IF ( totalcredit ) %]<td class="credit">[% ELSE %]<td class="debit">[% END %][% total | $Price %]</td>
76   </tr>
77   </tfoot>
78 </table>
79 </div>
80
81 [% MACRO jsinclude BLOCK %]
82     [% INCLUDE 'slip-print.inc' #printThenClose %]
83 [% END %]
84
85 [% INCLUDE 'intranet-bottom.inc' %]