From 7438fac0c96b38ae4f3514b1744aa2bd91b15918 Mon Sep 17 00:00:00 2001 From: Jon Knight Date: Wed, 18 Oct 2017 17:00:10 +0000 Subject: [PATCH] Bug 19479: Patch to format totals according to the CurrencyFormat syspref. On the page acqui/basketgroup.pl the prices of baskets should be shown according to the selected CurrencyFormat syspref. Test plan: 1) Create some baskets with items in them. 2) Go to acqui/basketgroup.pl page and check that the price format matches the current CurrencyFormat syspref. 3) Go to Administration and change CurrencyFormat syspref to one of the other available options and recheck step 2. https://bugs.koha-community.org/show_bug.cgi?id=19479 --- acqui/basketgroup.pl | 3 +++ 1 file changed, 3 insertions(+) diff --git a/acqui/basketgroup.pl b/acqui/basketgroup.pl index 0e8a9a1..58a11ae 100755 --- a/acqui/basketgroup.pl +++ b/acqui/basketgroup.pl @@ -56,6 +56,7 @@ use Koha::EDI qw/create_edi_order get_edifact_ean/; use Koha::Biblioitems; use Koha::Acquisition::Booksellers; +use Koha::Number::Price; use Koha::ItemTypes; use Koha::Patrons; @@ -83,6 +84,8 @@ sub BasketTotal { $total = $total + ( $order->{ecost_tax_excluded} * $order->{quantity} ); } } + my $formattotal = new Koha::Number::Price($total); + $total = $formattotal->format(); $total .= " " . ($bookseller->invoiceprice // 0); return $total; } -- 2.1.4