From 1212be7e4999d05d31e3e9b627e4312c641c50ab Mon Sep 17 00:00:00 2001 From: Katrin Fischer Date: Sun, 13 Jan 2019 11:15:27 +0100 Subject: [PATCH] Bug 22120: Add price formattig to patron summary print The patron summary print lists the replacement prices and rental charges of items and totals them. With this patch they will be formatted according to the CurrencyFormat system preference. To test: - Find or create a patron with some checkouts - Make sure some items have replacement price set and some have a rental charge - "Print summary" from the account in staff - Verify that charges and prices in the checkouts table are formatted correctly - Toggle CurrencyFormat to different settings Signed-off-by: helene hickey Signed-off-by: Martin Renvoize Signed-off-by: Nick Clemens (cherry picked from commit 3c2cc8da26f7a907c0b51f928ffb100eefbfa692) Signed-off-by: Martin Renvoize (cherry picked from commit 3638172077c95f0cba2f0e190f245e598e4b004d) Signed-off-by: Lucas Gass --- .../en/modules/members/moremember-print.tt | 18 +++++++++--------- members/summary-print.pl | 2 +- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember-print.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember-print.tt index 0fe2e7e124..9a395bb59c 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember-print.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember-print.tt @@ -50,21 +50,21 @@ [% issue.title |html %] - [% issue.author %] - [% issue.itemcallnumber %] - [% issue.itemtype_description %] - [% issue.date_due | $KohaDates as_due_date => 1 %] - [% issue.barcode %] - [% issue.charge %] - [% issue.replacementprice %] + [% issue.author | html %] + [% issue.itemcallnumber | html %] + [% issue.itemtype_description | html %] + [% issue.date_due | $KohaDates as_due_date => 1 %] + [% issue.barcode | html %] + [% issue.charge | $Price %] + [% issue.replacementprice | $Price %] [% IF ( issue.overdue ) %]Overdue![% ELSE %] [% END %] [% END %] Totals: - [% totaldue %] - [% totalprice %] + [% totaldue | $Price %] + [% totalprice | $Price %]   diff --git a/members/summary-print.pl b/members/summary-print.pl index 352b49755e..76bb1d4213 100755 --- a/members/summary-print.pl +++ b/members/summary-print.pl @@ -96,7 +96,7 @@ sub build_issue_data { $itemtype = Koha::ItemTypes->find( $itemtype ); $checkout->{itemtype_description} = $itemtype->description; #FIXME Should not it be translated_description - $checkout->{charge} = sprintf( "%.2f", $charge ); # TODO Should be done in the template using Price + $checkout->{charge} = $charge; $checkout->{overdue} = $c->is_overdue; -- 2.39.5