[Koha-patches] [PATCH] [SIGNED-OFF] BUG 4319 allow holds on waiting items
Nicole C. Engard
nengard at bywatersolutions.com
Wed May 11 21:13:40 CEST 2011
From: Fridolyn SOMERS <fridolyn.somers at progilone.fr>
Signed-off-by: Nicole C. Engard <nengard at bywatersolutions.com>
---
C4/Search.pm | 9 +++++++--
1 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/C4/Search.pm b/C4/Search.pm
index ab7cb59..4ce3abc 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}
@@ -1684,8 +1684,13 @@ sub searchResults {
$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';
+
$item->{status} = $item->{wthdrawn} . "-" . $item->{itemlost} . "-" . $item->{damaged} . "-" . $item->{notforloan};
+
+ # only withdrawn, lost and damaged avoid placing hold on item
+ $can_place_holds = 1 unless ($item->{withdrawn} || $item->{itemlost} || $item->{damaged});
+
$other_count++;
my $key = $prefix . $item->{status};
--
1.7.2.3
More information about the Koha-patches
mailing list