184c44ee31
The prices were not formatted correctly on the printed receipts for fines and payments in the patron account. This patch introduces the use of the Price TT plugin to those templates. Also: - Fixes a few capitalization errors - Removes spaces in front of : - Updates accounttype-to-description list to the one used in other templats as a lot of values were missing (Credit etc.) To test: - Create several fines, use some .00 and some with other values - Pay some fines - Create a manual credit - Use print button for all of those (credit, fee, payment) - Verify that: - prices ending in .00 are displayed without the decimal part - instead of Credit only C is shown in the description - Apply patch - Print invoices and receipts again - Verify that: - prices are now formatted according to CurrencyFormat system preference, decimal part always included - verify that correct description for Credit is shown Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com> Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
97 lines
2.8 KiB
Text
97 lines
2.8 KiB
Text
[% USE raw %]
|
|
[% USE Asset %]
|
|
[% USE Koha %]
|
|
[% USE KohaDates %]
|
|
[% USE Branches %]
|
|
[% USE Price %]
|
|
[% SET footerjs = 1 %]
|
|
[% INCLUDE 'doc-head-open.inc' %]
|
|
<title>Print receipt for [% patron.cardnumber | html %]</title>
|
|
[% INCLUDE 'doc-head-close.inc' %]
|
|
[% Asset.css("css/printreceiptinvoice.css") | $raw %]
|
|
[% INCLUDE 'blocking_errors.inc' %]
|
|
</head>
|
|
|
|
<body id="pat_printfeercpt" class="pat">
|
|
|
|
<div id="receipt">
|
|
<!-- The table with the account items -->
|
|
<table>
|
|
[% IF ( LibraryName ) %]
|
|
<tr>
|
|
<th colspan=4 class="centerednames">
|
|
<h3>[% LibraryName | html %]</h3>
|
|
</th>
|
|
</tr>
|
|
[% END %]
|
|
<tr>
|
|
<th colspan=4 class="centerednames">
|
|
<h2><u>Fee receipt</u></h2>
|
|
</th>
|
|
</tr>
|
|
<tr>
|
|
<th colspan=4 class="centerednames">
|
|
<h2>[% Branches.GetName( patron.branchcode ) | html %]</h2>
|
|
</th>
|
|
</tr>
|
|
<tr>
|
|
<th colspan=4 >
|
|
Received with thanks from [% patron.firstname | html %] [% patron.surname | html %] <br />
|
|
Card number: [% patron.cardnumber | html %]<br />
|
|
</th>
|
|
</tr>
|
|
<tr>
|
|
<th>Date</th>
|
|
<th>Description of charges</th>
|
|
<th>Note</th>
|
|
<th>Amount</th>
|
|
</tr>
|
|
|
|
[% FOREACH account IN accounts %]
|
|
<tr class="highlight">
|
|
<td>[% account.date | $KohaDates %]</td>
|
|
<td>
|
|
[% SWITCH account.accounttype %]
|
|
[% CASE 'Pay' %]Payment, thanks
|
|
[% CASE 'Pay00' %]Payment, thanks (cash via SIP2)
|
|
[% CASE 'Pay01' %]Payment, thanks (VISA via SIP2)
|
|
[% CASE 'Pay02' %]Payment, thanks (credit card via SIP2)
|
|
[% CASE 'N' %]New card
|
|
[% CASE 'F' %]Fine
|
|
[% CASE 'A' %]Account management fee
|
|
[% CASE 'M' %]Sundry
|
|
[% CASE 'L' %]Lost item
|
|
[% CASE 'W' %]Writeoff
|
|
[% CASE 'FU' %]Accruing fine
|
|
[% CASE 'HE' %]Hold waiting too long
|
|
[% CASE 'Rent' %]Rental fee
|
|
[% CASE 'FOR' %]Forgiven
|
|
[% CASE 'LR' %]Lost item fee refund
|
|
[% CASE 'PF' %]Processing fee
|
|
[% CASE 'PAY' %]Payment
|
|
[% CASE 'WO' %]Writeoff
|
|
[% CASE 'C' %]Credit
|
|
[% CASE 'CR' %]Credit
|
|
[% CASE %][% account.accounttype | html %]
|
|
[%- END -%]
|
|
[%- IF account.description %], [% account.description | html %][% END %]
|
|
</td>
|
|
<td>[% account.note | html %]</td>
|
|
[% IF ( account.amountcredit ) %]<td class="credit">[% ELSE %]<td class="debit">[% END %][% account.amount | $Price %]</td>
|
|
</tr>
|
|
|
|
[% END %]
|
|
<tfoot>
|
|
<tr>
|
|
<td colspan="3">Total outstanding dues as on date: </td>
|
|
[% IF ( totalcredit ) %]<td class="credit">[% ELSE %]<td class="debit">[% END %][% total | $Price %]</td>
|
|
</tr>
|
|
</tfoot>
|
|
</table>
|
|
</div>
|
|
|
|
[% MACRO jsinclude BLOCK %]
|
|
[% INCLUDE 'slip-print.inc' #printThenClose %]
|
|
[% END %]
|
|
|
|
[% INCLUDE 'intranet-bottom.inc' %]
|