From c6dfd6801f20b0faa5e2b6ea4f783a4e3233f2de Mon Sep 17 00:00:00 2001 From: Nick Clemens Date: Mon, 3 Aug 2020 12:27:15 +0000 Subject: [PATCH] Bug 21946: (follow-up) Restore join to biblioitems Signed-off-by: Jonathan Druart --- C4/Circulation.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/C4/Circulation.pm b/C4/Circulation.pm index 58b24161c7..76aebdf253 100644 --- a/C4/Circulation.pm +++ b/C4/Circulation.pm @@ -460,7 +460,8 @@ sub TooMany { if (C4::Context->preference('item-level_itypes')) { $count_query .= " WHERE items.itype NOT IN ( $issuing_itemtypes_query )"; } else { - $count_query .= " WHERE biblioitems.itemtype NOT IN ( $issuing_itemtypes_query )"; + $count_query .= " JOIN biblioitems USING (biblionumber) + WHERE biblioitems.itemtype NOT IN ( $issuing_itemtypes_query )"; } push @bind_params, $maxissueqty_rule->branchcode; push @bind_params, $maxissueqty_rule->categorycode; -- 2.39.5