From 140c58e2c40b71457c2a0d89f6d2b813dc08c6ff Mon Sep 17 00:00:00 2001 From: Marcel de Rooy Date: Tue, 3 Jul 2018 15:52:05 +0200 Subject: [PATCH] Bug 21033: Remove few warns in acqui/basket.pl Content-Type: text/plain; charset=utf-8 Resolve (line numbers based on 16.11.x): Use of uninitialized value in hash element at acqui/basket.pl line 337. Use of uninitialized value in hash element at acqui/basket.pl line 338. Use of uninitialized value in hash element at acqui/basket.pl line 340. Use of uninitialized value in hash element at acqui/basket.pl line 342. Use of uninitialized value in hash element at acqui/basket.pl line 344. Argument "" isn't numeric in multiplication (*) at koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tt line 486. Argument "" isn't numeric in multiplication (*) at koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tt line 591. Test plan: Open a basket that contains no prices. Compare warnings before and after this patch. --- acqui/basket.pl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/acqui/basket.pl b/acqui/basket.pl index 92fae60..9f2ffdf 100755 --- a/acqui/basket.pl +++ b/acqui/basket.pl @@ -340,8 +340,8 @@ if ( $op eq 'list' ) { $template->param( uncertainprices => 1 ); } - $line->{tax_rate} = $line->{tax_rate_on_ordering}; - $line->{tax_value} = $line->{tax_value_on_ordering}; + $line->{tax_rate} = $line->{tax_rate_on_ordering} // 0; + $line->{tax_value} = $line->{tax_value_on_ordering} // 0; push @books_loop, $line; -- 2.1.4