@@ -, +, @@ everytime a recalled item is put through returns until it is checked out to recall requester --- C4/Circulation.pm | 7 +++++-- catalogue/detail.pl | 2 ++ 2 files changed, 7 insertions(+), 2 deletions(-) --- a/C4/Circulation.pm +++ a/C4/Circulation.pm @@ -2044,10 +2044,14 @@ sub AddReturn { my ($resfound, $resrec); # find recalls..... - my $recall = Koha::Recalls->find({ itemnumber => $item->{'itemnumber'}, old => undef }); + my $recall = Koha::Recalls->find({ itemnumber => $item->{'itemnumber'}, status => 'R' }); + my $waiting_recall = Koha::Recalls->find({ itemnumber => $item->{'itemnumber'}, status => 'W' }); if (defined $recall){ $messages->{'RecallFound'} = 1; $messages->{'Recall'} = $recall; + } elsif (defined $waiting_recall){ + $messages->{'RecallFound'} = 1; + $messages->{'Recall'} = $waiting_recall; } else { # find reserves..... # if we don't have a reserve with the status W, we launch the Checkreserves routine @@ -2056,7 +2060,6 @@ sub AddReturn { if ($resfound) { $resrec->{'ResFound'} = $resfound; $messages->{'ResFound'} = $resrec; - } } # Record the fact that this book was returned. --- a/catalogue/detail.pl +++ a/catalogue/detail.pl @@ -47,6 +47,7 @@ use Koha::ItemTypes; use Koha::Patrons; use Koha::Virtualshelves; use Koha::Recalls; +use Data::Dumper; my $query = CGI->new(); @@ -330,6 +331,7 @@ foreach my $item (@items) { my $recall = Koha::Recalls->find({ itemnumber => $item->{itemnumber} }); if (defined $recall && $recall->status ne 'F' && $recall->status ne 'C'){ + warn 'item has been recalled'; $item->{recalled} = 1; $item->{recall} = $recall; } --