diff --git a/circ/pendingreserves.pl b/circ/pendingreserves.pl index 4fdfdacbd1..0b9744fa22 100755 --- a/circ/pendingreserves.pl +++ b/circ/pendingreserves.pl @@ -210,7 +210,7 @@ my $strsth = LEFT JOIN branchtransfers ON items.itemnumber=branchtransfers.itemnumber LEFT JOIN issues ON items.itemnumber=issues.itemnumber LEFT JOIN borrowers ON reserves.borrowernumber=borrowers.borrowernumber - LEFT JOIN default_branch_item_rules ON items.itype=default_branch_item_rules.itemtype + LEFT JOIN circulation_rules ON items.itype=circulation_rules.itemtype AND rule_name = 'holdallowed' AND circulation_rules.branchcode IS NULL AND circulation_rules.categorycode IS NULL WHERE reserves.found IS NULL $sqldatewhere @@ -221,7 +221,7 @@ my $strsth = AND reserves.priority <> 0 AND reserves.suspend = 0 AND notforloan = 0 AND itemlost = 0 AND withdrawn = 0 - AND ( default_branch_item_rules.holdallowed IS NULL OR default_branch_item_rules.holdallowed != 0 ) + AND ( circulation_rules.rule_value IS NULL OR circulation_rules.rule_value != 0 ) "; # GROUP BY reserves.biblionumber allows only items that are not checked out, else multiples occur when # multiple patrons have a hold on an item