2599cd17c7
Bug 2546 removes the description DB field value in some case (3.15.00.003). But the receipt generated by scripts members/printfeercpt.pl and members/printinvoice.pl displays this field. When the description field is empty, the default value (based on accountlines.accounttype) should be displayed. Test plan: - Generate and pay some different kinds of fees for a patron without filling the 'description' field. - In Fines>Account, click on the 'print' link. - Before this patch, the "description of charges" values is empty if no description was given. It is a regression introduced by bug 2546, a default value was inserted in the description field depending on the account type selected. - After this patch, the "description of charges" values should be based on the account type. The string display on printing receipt should be the same as on the account screen (staff and opac). Note for QA: If removed the "payment" key, it is not used in template and generated a warning ("odd number of elements..."). Signed-off-by: Nick Clemens <nick@quecheelibrary.org> Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> This fixes the display of payments and other charges on the fines slip. Note: This patch fixes a line where the description in the database was still updated to say "Payment thanks" for partial payments. It might be worth to do a follow-up correcting the accountlines table and removing the unwanted comment (see bug 2546). Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
76 lines
2.5 KiB
Text
76 lines
2.5 KiB
Text
[% USE Koha %]
|
|
[% INCLUDE 'doc-head-open.inc' %]
|
|
<title>Print Receipt for [% cardnumber %]</title>
|
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
|
<link rel="shortcut icon" href="[% IF ( IntranetFavicon ) %][% IntranetFavicon %][% ELSE %][% interface %]/[% theme %]/img/favicon.ico[% END %]" type="image/x-icon" />
|
|
<link rel="stylesheet" type="text/css" href="[% themelang %]/css/printreceiptinvoice.css" />
|
|
[% INCLUDE 'slip-print.inc' #printThenClose %]
|
|
</head>
|
|
<body id="printinvoice" class="pat" onload="printThenClose();">
|
|
|
|
<div id="receipt">
|
|
<!-- The table with the account items -->
|
|
<table>
|
|
[% IF ( LibraryName ) %]
|
|
<tr>
|
|
<th colspan="4" class="centerednames">
|
|
<h3>[% LibraryName %]</h3>
|
|
</th>
|
|
</tr>
|
|
[% END %]
|
|
<tr>
|
|
<th colspan="4" class="centerednames">
|
|
<h2><u>INVOICE</u></h2>
|
|
</th>
|
|
</tr>
|
|
<tr>
|
|
<th colspan="4" class="centerednames">
|
|
[% IF ( branchname ) %]<h2>[% branchname %]</h2>[% END %]
|
|
</th>
|
|
</tr>
|
|
<tr>
|
|
<th colspan="4" >
|
|
Bill to: [% firstname %] [% surname %] <br />
|
|
Card number: [% cardnumber %]<br />
|
|
</th>
|
|
</tr>
|
|
<tr>
|
|
<th>Date</th>
|
|
<th>Description of charges</th>
|
|
<th style="text-align:right;">Amount</th>
|
|
<th style="text-align:right;">Amount outstanding</th>
|
|
</tr>
|
|
|
|
[% FOREACH account IN accounts %]
|
|
<tr class="highlight">
|
|
<td>[% account.date %]</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 %][% account.accounttype %]
|
|
[%- END -%]
|
|
[%- IF account.description %], [% account.description %][% END %]
|
|
</td>
|
|
[% IF ( account.amountcredit ) %]<td class="credit">[% ELSE %]<td class="debit">[% END %][% account.amount %]</td>
|
|
[% IF ( account.amountoutstandingcredit ) %]<td class="credit">[% ELSE %]<td class="debit">[% END %][% account.amountoutstanding %]</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 %]</td>
|
|
</tr>
|
|
</tfoot>
|
|
</table>
|
|
</div>
|
|
[% INCLUDE 'intranet-bottom.inc' %]
|