From e4ede103797bf983ee87ac30faa7e159bdbc7501 Mon Sep 17 00:00:00 2001 From: Pasi Kallinen Date: Wed, 23 Apr 2014 10:01:43 +0300 Subject: [PATCH] [Signed-off] Format some of the values in basket display with two decimals, as adding the values together loses the formatting given by get_order_infos() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit http://bugs.koha-community.org/show_bug.cgi?id=12128 To test open a basket and see some values without decimal formatting (e.g. in column Total tax exc.) Apply patch Values are now formatted wit two decimals. Patch behaves as expected. Signed-off-by: Marc VĂ©ron --- acqui/basket.pl | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/acqui/basket.pl b/acqui/basket.pl index 047ae84..c160814 100755 --- a/acqui/basket.pl +++ b/acqui/basket.pl @@ -363,6 +363,12 @@ if ( $op eq 'delete_confirm' ) { $total_gsti += $$line{totalgsti}; } + for my $tmpline (keys %foot) { + $foot{$tmpline}{gstvalue} = sprintf( "%.2f", $foot{$tmpline}{gstvalue} ); + $foot{$tmpline}{totalgste} = sprintf( "%.2f", $foot{$tmpline}{totalgste} ); + $foot{$tmpline}{totalgsti} = sprintf( "%.2f", $foot{$tmpline}{totalgsti} ); + } + push @book_foot_loop, map {$_} values %foot; # Get cancelled orders -- 1.7.10.4