From 98f278022726c3622a1527cb4e8eb23228d28187 Mon Sep 17 00:00:00 2001 From: Fridolyn SOMERS Date: Wed, 1 Jun 2011 10:42:46 +0200 Subject: [PATCH] BUG4319 waiting items cannot be reserved Signed-off-by: Owen Leonard Signed-off-by: Chris Cormack --- C4/Search.pm | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/C4/Search.pm b/C4/Search.pm index ab7cb59721..c3cff65d0d 100644 --- a/C4/Search.pm +++ b/C4/Search.pm @@ -1671,7 +1671,7 @@ sub searchResults { ($reservestatus, $reserveitem) = C4::Reserves::CheckReserves($item->{itemnumber}); } - # item is withdrawn, lost or damaged + # item is withdrawn, lost, damaged, not for loan, reserved or in transit if ( $item->{wthdrawn} || $item->{itemlost} || $item->{damaged} @@ -1686,6 +1686,15 @@ sub searchResults { $item_in_transit_count++ if $transfertwhen ne ''; $item_onhold_count++ if $reservestatus eq 'Waiting'; $item->{status} = $item->{wthdrawn} . "-" . $item->{itemlost} . "-" . $item->{damaged} . "-" . $item->{notforloan}; + + # can place hold on item ? + if ((!$item->{damaged} || C4::Context->preference('AllowHoldsOnDamagedItems')) + && !$item->{itemlost} + && !$item->{withdrawn} + ) { + $can_place_holds = 1; + } + $other_count++; my $key = $prefix . $item->{status}; -- 2.39.5