From: erickson Date: Mon, 7 Aug 2006 20:21:18 +0000 (+0000) Subject: added checks for basic hold flags X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=1f0ce91e09c679963bd6fabd96340a38da46d1db;p=Evergreen.git added checks for basic hold flags git-svn-id: svn://svn.open-ils.org/ILS/trunk@5349 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- diff --git a/Open-ILS/src/perlmods/OpenILS/Utils/PermitHold.pm b/Open-ILS/src/perlmods/OpenILS/Utils/PermitHold.pm index 95e054721c..5113b975b6 100644 --- a/Open-ILS/src/perlmods/OpenILS/Utils/PermitHold.pm +++ b/Open-ILS/src/perlmods/OpenILS/Utils/PermitHold.pm @@ -39,6 +39,16 @@ sub permit_copy_hold { my $runner = OpenILS::Application::Circ::ScriptBuilder->build($ctx); + # check the various holdable flags + push( @allevents, OpenILS::Event->new('ITEM_NOT_HOLDABLE') ) + unless $U->is_true($ctx->{copy}->holdable); + + push( @allevents, OpenILS::Event->new('ITEM_NOT_HOLDABLE') ) + unless $U->is_true($ctx->{copy}->location->holdable); + + push( @allevents, OpenILS::Event->new('ITEM_NOT_HOLDABLE') ) + unless $U->is_true($ctx->{copy}->status->holdable); + my $evt = check_age_protect($ctx->{patron}, $ctx->{copy}); push( @allevents, $evt ) if $evt;