@@ -, +, @@ --- Koha/Holds.pm | 10 ++++++++++ 1 file changed, 10 insertions(+) --- a/Koha/Holds.pm +++ a/Koha/Holds.pm @@ -131,6 +131,15 @@ sub get_items_that_can_fill { } ); + my @hold_not_allowed_itypes = Koha::CirculationRules->search( + { + rule_name => 'holdallowed', + branchcode => undef, + categorycode => undef, + rule_value => 0, + } + )->get_column('itemtype'); + return Koha::Items->search( { biblionumber => { in => \@biblionumbers }, @@ -139,6 +148,7 @@ sub get_items_that_can_fill { notforloan => 0, onloan => undef, itemnumber => { -not_in => [ @branchtransfers, @waiting_holds ] }, + itype => { -not_in => \@hold_not_allowed_itypes }, } ); } --