From 29de9cbfd7d3dc8f0473e3e0b872e2c7b9dbe6e8 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 --- .../intranet-tmpl/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.11.0