From 3e387f72a337b36d96e1b0df56965391ffc95213 Mon Sep 17 00:00:00 2001 From: Tomas Cohen Arazi Date: Mon, 5 Aug 2013 15:23:44 -0300 Subject: [PATCH] Bug 10663: restore ability of active hold requests to block renewal Sponsored-by: Universidad Nacional de Cordoba Signed-off-by: Katrin Fischer This reverts changes made to CanBookBeRenewed by patches from bug 9367. GetReserveStatus is not suitable to recognize if an item can fild a hold on return and CheckReserves is restored. Signed-off-by: Chris Cormack This patch includes a squash of a follow-up authored by Katrin Fischer : CheckReserves returns '' when no reserve is found, so $resfound will always be defined and we need to check if it's true. Signed-off-by: Chris Cormack Signed-off-by: Marcel de Rooy Signed-off-by: Galen Charlton --- C4/Circulation.pm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/C4/Circulation.pm b/C4/Circulation.pm index ca669313d7..c57821329d 100644 --- a/C4/Circulation.pm +++ b/C4/Circulation.pm @@ -2484,8 +2484,9 @@ sub CanBookBeRenewed { $error = "too_many"; } - my $resstatus = C4::Reserves::GetReserveStatus($itemnumber); - if ( $resstatus eq "Waiting" or $resstatus eq "Reserved" ) { + my ( $resfound, $resrec, undef ) = C4::Reserves::CheckReserves( $itemnumber ); + + if ( $resfound ) { # '' when no hold was found $renewokay = 0; $error = "on_reserve"; } -- 2.11.4.GIT