Bug 23484: Update pendingreserves.pl to use circulation_rules

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit c21a9cf0b0)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This commit is contained in:
Nick Clemens 2019-08-21 13:39:14 +00:00 committed by Fridolin Somers
parent 7ce1fdc847
commit 39762da92f
1 changed files with 2 additions and 2 deletions

View File

@ -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