From 8700d5e03a3371c05b9520dd1dd7dc860af00d1c Mon Sep 17 00:00:00 2001 From: Nick Clemens Date: Wed, 7 Oct 2020 12:24:48 +0000 Subject: [PATCH] Bug 25969: (follow-up) If not coming from hold modal find item by barcode --- circ/returns.pl | 2 ++ 1 file changed, 2 insertions(+) diff --git a/circ/returns.pl b/circ/returns.pl index 6c9718495b..059ecef071 100755 --- a/circ/returns.pl +++ b/circ/returns.pl @@ -419,6 +419,8 @@ if ( $messages->{'ResFound'}) { my $branchCheck = ( $userenv_branch eq $reserve->{branchcode} ); if ( $reserve->{'ResFound'} eq "Reserved" && C4::Context->preference('HoldsAutoFill') ) { my $item = Koha::Items->find( $itemnumber ); + # For some cases of holds we don't have the itemnumebr so should find the item by barcode + $item = Koha::Items->find({ barcode => $barcode }) unless $item; my $biblio = $item->biblio; my $diffBranchSend = !$branchCheck ? $reserve->{branchcode} : undef; -- 2.11.0