From fad9338139f46820e26cd6bf24d0e8951973b1fd Mon Sep 17 00:00:00 2001 From: Olli-Antti Kivilahti Date: Sun, 1 Jun 2014 17:19:30 +0300 Subject: [PATCH] Bug 2465 - availability of a reserved book This fixes the issue with availability count with reserved Items in 'Reserved'-state. Now both 'Reserved' and 'Waiting' holds are counted to the availability metrics in catalogue/search.pl --- C4/Reserves.pm | 2 +- C4/Search.pm | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/C4/Reserves.pm b/C4/Reserves.pm index eb1ae2b..be01fb9 100644 --- a/C4/Reserves.pm +++ b/C4/Reserves.pm @@ -824,7 +824,7 @@ sub GetReserveStatus { } if(defined $found) { - return 'Waiting' if $found eq 'W' and $priority == 0; + return 'Waiting' if ($found eq 'W' || $found eq 'T') and $priority == 0; return 'Finished' if $found eq 'F'; } diff --git a/C4/Search.pm b/C4/Search.pm index 54723b8..f99930c 100644 --- a/C4/Search.pm +++ b/C4/Search.pm @@ -1956,14 +1956,14 @@ sub searchResults { || $item->{itemlost} || $item->{damaged} || $item->{notforloan} - || $reservestatus eq 'Waiting' + || $reservestatus eq 'Waiting' || $reservestatus eq 'Reserved' || ($transfertwhen ne '')) { $withdrawn_count++ if $item->{withdrawn}; $itemlost_count++ if $item->{itemlost}; $itemdamaged_count++ if $item->{damaged}; $item_in_transit_count++ if $transfertwhen ne ''; - $item_onhold_count++ if $reservestatus eq 'Waiting'; + $item_onhold_count++ if $reservestatus eq 'Waiting' || $reservestatus eq 'Reserved'; $item->{status} = $item->{withdrawn} . "-" . $item->{itemlost} . "-" . $item->{damaged} . "-" . $item->{notforloan}; # can place a hold on a item if -- 1.8.1.2