From 3638172077c95f0cba2f0e190f245e598e4b004d 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 --- .../prog/en/modules/members/moremember-print.tt | 8 ++++---- members/summary-print.pl | 2 +- 2 files changed, 5 insertions(+), 5 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 dcf0cb4a33..10ee5574e0 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 @@ -58,16 +58,16 @@ [% issue.itemtype_description | html %] [% issue.date_due | $KohaDates as_due_date => 1 %] [% issue.barcode | html %] - [% issue.charge | html %] - [% issue.replacementprice | html %] + [% issue.charge | $Price %] + [% issue.replacementprice | $Price %] [% IF ( issue.overdue ) %]Overdue![% ELSE %] [% END %] [% END %] Totals: - [% totaldue | html %] - [% totalprice | html %] + [% 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