-[% FOREACH reserveloo IN reserveloop %]
- <tr>
- <td><a href="/cgi-bin/koha/reserve/request.pl?biblionumber=[% reserveloo.biblionumber %]">[% reserveloo.btitle %]</a></td>
- <td>[% reserveloo.author %]</td>
- <td>[% reserveloo.description %]</td>
- <td>[% reserveloo.reservedate2 %]</td>
- </tr>
- [% END %]
-</table>
-[% END %]
+ [% FOREACH reserve IN reserves %]
+ <tr>
+ <td>[% reserve.title %]</td>
+ <td>[% reserve.author %]</td>
+ <td>[% reserve.reservedate | $KohaDates %]</td>
+ <td>[% reserve.expirationdate | $KohaDates %]</td>
+ <td>[% reserve.waiting_at %]</td>
+ </tr>
+ [% END %]
+ </table>
+ [% END %]
+ [% IF accounts && totaldue != 0 %]
+ <table>
+ <caption>Account fines and payments</caption>
+ <tr>
+ <th>Description of charges</th>
+ <th>Date</th>
+ <th>Amount</th>
+ <th>Outstanding</th>
+ </tr>
+
+ [% FOREACH account IN accounts %]
+ [% NEXT IF account.amountoutstanding == 0 %]
+ <tr>
+ <td>
+ [% IF ( account.itemnumber ) %]<a href="/cgi-bin/koha/catalogue/moredetail.pl?biblionumber=[% account.biblionumber %]&itemnumber=[% account.itemnumber %]">[% END %]
+ [% account.description %] [% IF ( account.printtitle ) %] [% account.title |html %][% END %]
+ [% IF ( account.itemnumber ) %]</a>[% END %]
+ </td>
+ <td>[% account.date | $KohaDates %]</td>
+ <td style="text-align:right;">[% account.amount | $Price %]</td>
+ <td style="text-align:right;">[% account.amountoutstanding | $Price %]</td>
+ </tr>
+ [% END %]
+
+ <tfoot>
+ <tr>
+ <td colspan="3">Total due</td>
+ <td colspan="2" style="text-align:right;">[% totaldue | $Price %]</td>
+ </tr>
+ </tfoot>
+ </table>
+ [% END %]