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 <mtompset@hotmail.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
This commit is contained in:
Jonathan Druart 2017-01-19 18:03:55 +01:00 committed by Kyle M Hall
parent e8420b5d80
commit ad707d0274

View file

@ -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>)/;
$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'};