]> git.evergreen-ils.org Git - Evergreen.git/blob - Open-ILS/web/templates/default/opac-poc/myopac/fines.tt2
Merge branch 'master' of git+ssh://yeti.esilibrary.com/home/evergreen/evergreen-equin...
[Evergreen.git] / Open-ILS / web / templates / default / opac-poc / myopac / fines.tt2
1 [% BLOCK html_head %]
2 <style>
3     table { width: 100%; text-align: center; padding: 20px; margin-top: 30px; }
4     table { border-collapse: collapse; }
5     table { padding: 3px; border-bottom: 1px solid #ddd; text-align: left;}
6     table tr:nth-child(odd) { background-color:#ded; }
7     h2 { margin-bottom: 0; }
8 </style>
9 [% END %]
10
11 [% PROCESS "default/opac/common.tt2" %]
12 [% WRAPPER "default/opac/base.tt2" %]
13 [% INCLUDE "default/opac/myopac/_links.tt2" myopac_page = "fines" %]
14 <h2>Summary</h2>
15 <table>
16     <thead>
17         <tr>
18             <th>Total Owed</th>
19             <th>Total Paid</th>
20             <th>Balance Owed</th>
21         </tr>
22     </thead>
23     <tbody>
24         <tr>
25             <td>[% money(ctx.fines.total_owed) %]</td>
26             <td>[% money(ctx.fines.total_paid) %]</td>
27             <td>[% money(ctx.fines.balance_owed) %]</td>
28         </tr>
29     </tbody>
30 </table>
31
32 [% IF ctx.fines.circulation.size > 0 %]
33 <h2>Overdue materials</h2>
34 <table>
35     <thead>
36         <tr>
37             <th>Title</th>
38             <th>Author</th>
39             <th>Checkout Date</th>
40             <th>Due Date</th>
41             <th>Date Returned</th>
42             <th>Balance Owed</th>
43         </tr>
44     </thead>
45     <tbody>
46     [% FOR f IN ctx.fines.circulation %]
47         [% attrs = {marc_xml => f.marc_xml}; %]
48         [% PROCESS get_marc_attrs args=attrs; %]
49         <tr>
50             <td>[% attrs.title %]</td>
51             <td>[% attrs.author %]</td>
52             <td>[% date.format(
53                 ctx.parse_datetime(f.xact.circulation.xact_start), "%Y-%m-%d"
54             ) %]</td>
55             <td>[% date.format(
56                 ctx.parse_datetime(f.xact.circulation.due_date), "%Y-%m-%d"
57             ) %]</td>
58             <td>[%
59                 IF f.xact.circulation.checkin_time;
60                     date.format(
61                         ctx.parse_datetime(f.xact.circulation.checkin_time),
62                         "%Y-%m-%d"
63                     );
64                 END %]</td><!-- XXX TODO display stop_fines_time if set? Display something instead of blank like "fines accruing" ? -->
65             <td>[% money(f.xact.balance_owed) %]</td>
66         </tr>
67     [% END %]
68     </tbody>
69 </table>
70 [% END %]
71
72 [% IF ctx.fines.grocery.size > 0 %]
73 <h2>Other Fees</h2>
74 <table>
75     <thead>
76         <tr>
77             <th>Transaction Start Time</th>
78             <th>Last Payment Time</th>
79             <th>Initial Amount Owed</th>
80             <th>Total Amount Paid</th>
81             <th>Balance Owed</th>
82             <th>Billing Type</th>
83         </tr>
84     </thead>
85     <tbody>
86     [% FOR f IN ctx.fines.grocery %]
87         <tr>
88             <td>[%
89                 date.format(
90                     ctx.parse_datetime(f.xact.xact_start), "%Y-%m-%d"
91                 ) %]</td>
92             <td>[% IF f.xact.last_payment_ts;
93                     date.format(
94                         ctx.parse_datetime(f.xact.last_payment_ts), "%Y-%m-%d"
95                         );
96                     END %]</td>
97             <td>[% money(f.xact.total_owed) %]</td>
98             <td>[% money(f.xact.total_paid) %]</td>
99             <td>[% money(f.xact.balance_owed) %]</td>
100             <td>[% f.xact.last_billing_type %]</td>
101         </tr>
102     [% END %]
103     </tbody>
104 </table>
105 [% END %]
106
107 [% END %]