Bug 21946: (follow-up) Restore join to biblioitems

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This commit is contained in:
Nick Clemens 2020-08-03 12:27:15 +00:00 committed by Jonathan Druart
parent a86a1a74b9
commit c6dfd6801f
1 changed files with 2 additions and 1 deletions

View File

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