From 821bd665645f5072a9f86f3395decec2429cf8fe Mon Sep 17 00:00:00 2001 From: Alex Buckley Date: Sat, 21 Jul 2018 10:57:20 +0000 Subject: [PATCH] Bug 19532: Amended the detail.pl call to retrieve recalls so now it retrieves recalls with the status of 'R' or 'W' This means the 'Item recalled by' text is displayed in the holdings table in detail.pl for items with a recall with the status of recalled or waiting. Sponsored-By: Toi Ohomai Institute of Technology, New Zealand --- catalogue/detail.pl | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/catalogue/detail.pl b/catalogue/detail.pl index 57d9356..4c47005 100755 --- a/catalogue/detail.pl +++ b/catalogue/detail.pl @@ -335,10 +335,14 @@ foreach my $item (@items) { } } - my $recall = Koha::Recalls->find({ itemnumber => $item->{itemnumber} }); - if (defined $recall && $recall->status ne 'F' && $recall->status ne 'C'){ + my $recall = Koha::Recalls->find({ itemnumber => $item->{itemnumber}, status => 'R' }); + my $waiting_recall = Koha::Recalls->find({ itemnumber => $item->{'itemnumber'}, status => 'W' }); + if (defined $recall){ $item->{recalled} = 1; $item->{recall} = $recall; + } elsif (defined $waiting_recall) { + $item->{recalled} = 1; + $item->{recall} = $waiting_recall; } if ($currentbranch and $currentbranch ne "NO_LIBRARY_SET" -- 2.1.4