From ad707d027482d5b926df59c1660bc4fdb7670c94 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Thu, 19 Jan 2017 18:03:55 +0100 Subject: [PATCH] Bug 17968: Remove useless variable $item_format in C4::Overdues::parse_overdues_letter The variable $item_format is not used and should be removed from this subroutine. Moreover it the letter parameter, but it is never sent to this subroutine. letter_code is expected instead. Test plan: No test plan, just read the code and `git grep ` Signed-off-by: Mark Tompsett Signed-off-by: Marcel de Rooy Signed-off-by: Kyle M Hall --- C4/Overdues.pm | 6 ------ 1 file changed, 6 deletions(-) diff --git a/C4/Overdues.pm b/C4/Overdues.pm index 8300a1ed2c..c26b5f0678 100644 --- a/C4/Overdues.pm +++ b/C4/Overdues.pm @@ -1009,14 +1009,8 @@ sub parse_overdues_letter { my @item_tables; if ( my $i = $params->{'items'} ) { - my $item_format = ''; foreach my $item (@$i) { my $fine = GetFine($item->{'itemnumber'}, $params->{'borrowernumber'}); - if ( !$item_format and defined $params->{'letter'}->{'content'} ) { - $params->{'letter'}->{'content'} =~ m/(.*<\/item>)/; - $item_format = $1; - } - $item->{'fine'} = currency_format($currency_format, "$fine", FMT_SYMBOL); # if active currency isn't correct ISO code fallback to sprintf $item->{'fine'} = sprintf('%.2f', $fine) unless $item->{'fine'}; -- 2.39.5