+[% USE KohaDates %]
[% INCLUDE 'doc-head-open.inc' %]
<title>Summary for [% firstname %] [% surname %] ([% cardnumber %])</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<li>[% IF ( phone ) %][% phone %][% ELSE %](no phone number on file)[% END %]</li>
<li>[% IF ( email ) %][% email %][% ELSE %](no primary email on file)[% END %]</li>
[% IF ( emailpro ) %]<li>[% emailpro %]</li>[% END %]
+<li>Registration date: [% dateenrolled %]</li>
+<li>Expiration date: [% dateexpiry %]</li>
+<li>Library: [% branchname %]</li>
+<li>Category: [% description %]</li>
</ul>
[% IF ( issueloop ) %]
</table>
[% END %]
+[% IF ( accounts ) %]
+<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 %]
+ <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>[% account.amount %]</td>
+ <td>[% account.amountoutstanding %]</td>
+ </tr>
+ [% END %]
+ <tfoot>
+ <tr>
+ <td colspan="3">Total due</td>
+ <td colspan="2">[% totaldue %]</td>
+ </tr>
+ </tfoot>
+</table>
+[% END %]
+
[% INCLUDE 'intranet-bottom.inc' %]
$template->param( lib1 => $lib1 ) if ($lib1);
$template->param( lib2 => $lib2 ) if ($lib2);
+# If printing a page, send the account informations to the template
+if ($print eq "page") {
+ foreach my $accountline (@$accts) {
+ $accountline->{amount} = sprintf '%.2f', $accountline->{amount};
+ $accountline->{amountoutstanding} = sprintf '%.2f', $accountline->{amountoutstanding};
+
+ if ($accountline->{accounttype} ne 'F' && $accountline->{accounttype} ne 'FU'){
+ $accountline->{printtitle} = 1;
+ }
+ }
+ $template->param( accounts => $accts );
+}
+
# Show OPAC privacy preference is system preference is set
if ( C4::Context->preference('OPACPrivacy') ) {
$template->param( OPACPrivacy => 1);