@@ -, +, @@ receipt - 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.) - 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 --- .../prog/en/modules/members/printfeercpt.tt | 41 ++++++++++++++-------- .../prog/en/modules/members/printinvoice.tt | 37 ++++++++++++------- members/printfeercpt.pl | 7 ++-- 3 files changed, 53 insertions(+), 32 deletions(-) --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/printfeercpt.tt +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/members/printfeercpt.tt @@ -3,6 +3,7 @@ [% USE Koha %] [% USE KohaDates %] [% USE Branches %] +[% USE Price %] [% SET footerjs = 1 %] [% INCLUDE 'doc-head-open.inc' %] Print receipt for [% patron.cardnumber | html %] @@ -36,7 +37,7 @@ Received with thanks from [% patron.firstname | html %] [% patron.surname | html %]
- Card number : [% patron.cardnumber | html %]
+ Card number: [% patron.cardnumber | html %]
@@ -51,29 +52,39 @@ [% account.date | $KohaDates %] [% 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 | html %] + [% 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 %] [% account.note | html %] - [% IF ( account.amountcredit ) %][% ELSE %][% END %][% account.amount | html %] + [% IF ( account.amountcredit ) %][% ELSE %][% END %][% account.amount | $Price %] [% END %] - Total outstanding dues as on date : - [% IF ( totalcredit ) %][% ELSE %][% END %][% total | html %] + Total outstanding dues as on date: + [% IF ( totalcredit ) %][% ELSE %][% END %][% total | $Price %] --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/printinvoice.tt +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/members/printinvoice.tt @@ -3,6 +3,7 @@ [% USE Koha %] [% USE Branches %] [% USE KohaDates %] +[% USE Price %] [% SET footerjs = 1 %] [% INCLUDE 'doc-head-open.inc' %] Print receipt for [% patron.cardnumber | html %] @@ -51,30 +52,40 @@ [% account.date | $KohaDates%] [% 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 | html %] + [% 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 %] [% account.note | html %] [% IF ( account.amountcredit ) %][% ELSE %][% END %][% account.amount | html %] - [% IF ( account.amountoutstandingcredit ) %][% ELSE %][% END %][% account.amountoutstanding | html %] + [% IF ( account.amountoutstandingcredit ) %][% ELSE %][% END %][% account.amountoutstanding | $Price %] [% END %] Total outstanding dues as on date: - [% IF ( totalcredit ) %][% ELSE %][% END %][% total | html %] + [% IF ( totalcredit ) %][% ELSE %][% END %][% total | $Price %] --- a/members/printfeercpt.pl +++ a/members/printfeercpt.pl @@ -84,9 +84,8 @@ my %row = ( 'amountcredit' => $accountline->{'amountcredit'}, 'amountoutstandingcredit' => $accountline->{'amountoutstandingcredit'}, 'description' => $accountline->{'description'}, - 'amount' => sprintf( "%.2f", $accountline->{'amount'} ), - 'amountoutstanding' => - sprintf( "%.2f", $accountline->{'amountoutstanding'} ), + 'amount' => $accountline->{'amount'}, + 'amountoutstanding' => $accountline->{'amountoutstanding'}, 'accountno' => $accountline->{'accountno'}, accounttype => $accountline->{accounttype}, 'note' => $accountline->{'note'}, @@ -96,7 +95,7 @@ my %row = ( $template->param( patron => $patron, finesview => 1, - total => sprintf("%.2f",$total), + total => $total, totalcredit => $totalcredit, accounts => [$accountline], # FIXME There is always only 1 row! ); --