From a95a1cfcccd7bd15f5f47e6cfac684d4cd8e3cff Mon Sep 17 00:00:00 2001 From: Pasi Kallinen Date: Wed, 23 Apr 2014 10:01:43 +0300 Subject: [PATCH] Format some of the values in basket display with two decimals, as adding the values together loses the formatting given by get_order_infos() --- 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.8.3.2