Koha/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember-print.tt
Josef Moravec d81f371e2d Bug 12001: (QA follow-up) Fix patron account summary print
Test plan:
Try to print patron account summary
--> without patch it explodes
--> with patch it works, and if there is a fee related to item, the title should be printed out

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2018-02-23 10:57:30 -03:00

131 lines
5.4 KiB
Text

[% USE Koha %]
[% USE Branches %]
[% USE KohaDates %]
[% USE Price %]
[% SET footerjs = 1 %]
[% INCLUDE 'doc-head-open.inc' %]
<title>Summary for [% patron.firstname %] [% patron.surname %] ([% patron.cardnumber %])</title>
[% INCLUDE 'doc-head-close.inc' %]
</head>
<body id="pat_moremember-print" class="pat">
<div id="main">
<h3><a href="/cgi-bin/koha/circ/circulation.pl?findborrower=[% patron.cardnumber %]">Account summary: [% patron.firstname %] [% patron.surname %] ([% patron.cardnumber %])</a></h3>
<ul>
[% IF Koha.Preference( 'AddressFormat' ) %]
[% INCLUDE "member-display-address-style-${ Koha.Preference( 'AddressFormat' ) }.inc" %]
[% ELSE %]
[% INCLUDE 'member-display-address-style-us.inc' %]
[% END %]
<li>[% IF ( patron.phone ) %][% patron.phone %][% ELSE %](no phone number on file)[% END %]</li>
<li>[% IF ( patron.email ) %][% patron.email %][% ELSE %](no primary email on file)[% END %]</li>
[% IF ( patron.emailpro ) %]
<li>[% patron.emailpro %]</li>
[% END %]
<li>Registration date: [% patron.dateenrolled | $KohaDates %]</li>
<li>Expiration date: [% patron.dateexpiry | $KohaDates %]</li>
<li>Library: [% Branches.GetName( patron.branchcode ) %]</li>
<li>Category: [% patron.category.description %]</li>
</ul>
[% IF ( issues ) %]
<table>
<caption>Items checked out</caption>
<tr>
<th>Title</th>
<th>Author</th>
<th>Call no</th>
<th>Item type</th>
<th>Date due</th>
<th>Barcode</th>
<th>Charge</th>
<th>Price</th>
<th>Status</th>
</tr>
[% FOREACH issue IN issues %]
[% IF ( issue.overdue ) %]<tr class="overdue">[% ELSE %]<tr>[% END %]
<td>
[% issue.title |html %]
<a href="/cgi-bin/koha/catalogue/detail.pl?item=[% issue.itemnumber %]&amp;biblionumber=[% issue.biblionumber %]&amp;bi=[% issue.biblioitemnumber %]"></a>
</td>
<td>[% issue.author %]</td>
<td>[% issue.itemcallnumber %]</td>
<td>[% issue.itemtype_description %]</td>
<td>[% issue.date_due | $KohaDates as_due_date => 1 %]</td>
<td>[% issue.barcode %]</td>
<td>[% issue.charge %]</td>
<td>[% issue.replacementprice %]</td>
<td>[% IF ( issue.overdue ) %]Overdue![% ELSE %]&nbsp;[% END %]</td>
</tr>
[% END %]
<tr>
<td colspan="6" style="text-align: right; font-weight:bold;">Totals:</td>
<td>[% totaldue %]</td>
<td>[% totalprice %]</td>
<td colspan="3">&nbsp;</td>
</tr>
</table>
[% END %]
[% IF ( reserves ) %]
<table>
<caption>Pending holds</caption>
<tr>
<th>Title</th>
<th>Author</th>
<th>Placed on</th>
<th>Expires on</th>
<th>Pick up location</th>
</tr>
[% 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 %]
<tr>
<td>
[% IF ( account.itemnumber ) %]<a href="/cgi-bin/koha/catalogue/moredetail.pl?biblionumber=[% account.item.biblionumber %]&amp;itemnumber=[% account.itemnumber %]">[% END %]
[% account.description %]&nbsp;[% IF account.itemnumber AND account.accounttype != 'F' AND account.accounttype != 'FU' %] [% account.item.biblio.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 %]
[% MACRO jsinclude BLOCK %]
[% INCLUDE 'slip-print.inc' #printThenClose %]
[% END %]
[% INCLUDE 'intranet-bottom.inc' %]