Lines 278-284
sub GetReservesFromBiblionumber {
Link Here
|
278 |
my ($biblionumber) = shift or return (0, []); |
278 |
my ($biblionumber) = shift or return (0, []); |
279 |
my ($all_dates) = shift; |
279 |
my ($all_dates) = shift; |
280 |
my ($itemnumber) = shift; |
280 |
my ($itemnumber) = shift; |
281 |
warn "ITEMNUMBER: $itemnumber"; |
|
|
282 |
my $dbh = C4::Context->dbh; |
281 |
my $dbh = C4::Context->dbh; |
283 |
|
282 |
|
284 |
# Find the desired items in the reserves |
283 |
# Find the desired items in the reserves |
Lines 303-309
sub GetReservesFromBiblionumber {
Link Here
|
303 |
WHERE biblionumber = ? "; |
302 |
WHERE biblionumber = ? "; |
304 |
push( @params, $biblionumber ); |
303 |
push( @params, $biblionumber ); |
305 |
unless ( $all_dates ) { |
304 |
unless ( $all_dates ) { |
306 |
$query .= " AND reservedate <= CURRENT_DATE() "; |
305 |
$query .= " AND reservedate <= CAST(NOW() AS DATE) "; |
307 |
} |
306 |
} |
308 |
if ( $itemnumber ) { |
307 |
if ( $itemnumber ) { |
309 |
$query .= " AND ( itemnumber IS NULL OR itemnumber = ? )"; |
308 |
$query .= " AND ( itemnumber IS NULL OR itemnumber = ? )"; |