The original WHERE condition wasn't enclosed in parenthesis, and hence
was subject to binding precedence issues in some situations.
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
if ( $ignore_waiting_holds ) {
$query .= "LEFT JOIN reserves ON items.itemnumber = reserves.itemnumber ";
- push( @where_strings, q{reserves.found != 'W' OR reserves.found IS NULL} );
+ push( @where_strings, q{(reserves.found != 'W' OR reserves.found IS NULL)} );
}
if ( @where_strings ) {
homebranch => $library->id,
holdingbranch => $library->id,
itype => $itemtype->itemtype,
+ reserves => undef
}
}
);
homebranch => $library->id,
holdingbranch => $library->id,
itype => $itemtype->itemtype,
+ reserves => undef
}
}
);