Koha/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember-print.tt
Martin Renvoize d661141890
Bug 23049: Update existing code to use debit_type
* Update C4::Accounts::chargelostitem
* Update C4::Accounts::manualinvoice
* Update C4::Circulation::_FixOverduesOnReturn
* Update C4::Circulation::_FixAccountForLostAndReturned
* Update C4::Overdues::UpdateFine
* Update C4::Overdues::GetFine
* Update C4::Overdues::GetOverduesForBranch
* Update Koha::Account->pay
* Update Koha::Account->add_debit
* Update Koha::Account->non_issues_charges
* Update Koha::Account::Line->apply
* Update Koha::Account::Line->adjust
* Update controller scripts
* Update reports scripts
* Update tests

Test Plan
1) Run the test suit and ensure everything still passes
2) Test reports/cash_register_stats still works
3) Test that adding manual invoices still works
4) Test that making payments still works
5) Test that lost item fee handling still works
6) Test that invoice printing still works
7) Test that the sco still works

Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2019-10-24 17:24:15 +01:00

160 lines
6.6 KiB
Text

[% USE Koha %]
[% USE Branches %]
[% USE KohaDates %]
[% USE Price %]
[% USE ItemTypes %]
[% SET footerjs = 1 %]
[% PROCESS 'accounts.inc' %]
[% INCLUDE 'doc-head-open.inc' %]
<title>Summary for [% patron.firstname | html %] [% patron.surname | html %] ([% patron.cardnumber | html %])</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 | uri %]">Account summary: [% patron.firstname | html %] [% patron.surname | html %] ([% patron.cardnumber | html %])</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 | html %][% ELSE %](no phone number on file)[% END %]</li>
<li>[% IF ( patron.email ) %][% patron.email | html %][% ELSE %](no primary email on file)[% END %]</li>
[% IF ( patron.emailpro ) %]
<li>[% patron.emailpro | html %]</li>
[% END %]
<li>Registration date: [% patron.dateenrolled | $KohaDates %]</li>
<li>Expiration date: [% patron.dateexpiry | $KohaDates %]</li>
<li>Library: [% Branches.GetName( patron.branchcode ) | html %]</li>
<li>Category: [% patron.category.description | html %]</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 | uri %]&amp;biblionumber=[% issue.biblionumber | uri %]&amp;bi=[% issue.biblioitemnumber | uri %]"></a>
</td>
<td>[% issue.author | html %]</td>
<td>[% issue.itemcallnumber | html %]</td>
<td>[% ItemTypes.GetDescription( issue.itype ) | html %]</td>
<td>[% issue.date_due | $KohaDates as_due_date => 1 %]</td>
<td>[% issue.barcode | html %]</td>
<td>[% issue.charge | $Price %]</td>
<td>[% issue.replacementprice | $Price %]</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 | $Price %]</td>
<td>[% totalprice | $Price %]</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 | html %]</td>
<td>[% reserve.author | html %]</td>
<td>[% reserve.reservedate | $KohaDates %]</td>
<td>[% reserve.expirationdate | $KohaDates %]</td>
<td>[% reserve.waiting_at | html %]</td>
</tr>
[% END %]
</table>
[% END %]
[% IF accounts && totaldue != 0 %]
<table id="table_account_fines">
<caption>Account fines and payments</caption>
<thead>
<tr>
<th>Date</th>
<th>Description of charges</th>
<th>Note</th>
<th>Amount</th>
<th>Outstanding</th>
</tr>
</thead>
[% FOREACH account IN accounts %]
<tr>
<td>[% account.date | $KohaDates %]</td>
<td>
[% PROCESS account_type_description account=account %]
[%- IF account.payment_type %]
, [% AuthorisedValues.GetByCode('PAYMENT_TYPE', account.payment_type) | html %]
[% END %]
[%- IF account.description %]
, [% account.description | html %]
[% END %]
&nbsp;
[% IF ( account.itemnumber AND account.debit_type_code != 'OVERDUE' ) %]
<a href="/cgi-bin/koha/catalogue/moredetail.pl?biblionumber=[% account.item.biblionumber | uri %]&amp;itemnumber=[% account.itemnumber | uri %]">[% account.item.biblio.title | html %]</a>
[% END %]
</td>
<td>
[% account.note | html_line_break %]
</td>
[% IF ( account.amount < 0 ) %]
<td class="credit" style="text-align: right;">
[% ELSE %]
<td class="debit" style="text-align: right;">
[% END %][% account.amount | $Price %]
</td>
[% IF ( account.amountoutstanding < 0 ) %]
<td class="credit" style="text-align: right;">
[% ELSE %]
<td class="debit" style="text-align: right;">
[% END %]
[% account.amountoutstanding | $Price %]
</td>
</tr>
[% END %]
<tfoot>
<tr>
<td colspan="4">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' %]