Bug 19454: (QA follow-up) Fix selection on categorycode

A follow-up on a preceding report introduced a join instead of a
subquery. This made the categorycode ambiguous.

Test plan:
See former patches.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This commit is contained in:
Marcel de Rooy 2018-03-14 13:22:46 +01:00 committed by Jonathan Druart
parent 906c9166a7
commit 5855b01543

View file

@ -57,7 +57,7 @@ WHERE bo.dateenrolled >= ?|;
if( $no_overwrite ) {
$sql .= " AND mp.borrowernumber IS NULL";
}
$sql .= " AND categorycode = ?" if $category;
$sql .= " AND bo.categorycode = ?" if $category;
my $sth = $dbh->prepare($sql);
$sth->execute($since, $category || () );
my $cnt = 0;