Lines 257-263
sub GetReservesFromBiblionumber {
Link Here
|
257 |
my ($biblionumber) = shift or return (0, []); |
257 |
my ($biblionumber) = shift or return (0, []); |
258 |
my ($all_dates) = shift; |
258 |
my ($all_dates) = shift; |
259 |
my ($itemnumber) = shift; |
259 |
my ($itemnumber) = shift; |
260 |
warn "ITEMNUMBER: $itemnumber"; |
|
|
261 |
my $dbh = C4::Context->dbh; |
260 |
my $dbh = C4::Context->dbh; |
262 |
|
261 |
|
263 |
# Find the desired items in the reserves |
262 |
# Find the desired items in the reserves |
Lines 281-287
sub GetReservesFromBiblionumber {
Link Here
|
281 |
WHERE biblionumber = ? "; |
280 |
WHERE biblionumber = ? "; |
282 |
push( @params, $biblionumber ); |
281 |
push( @params, $biblionumber ); |
283 |
unless ( $all_dates ) { |
282 |
unless ( $all_dates ) { |
284 |
$query .= " AND reservedate <= CURRENT_DATE() "; |
283 |
$query .= " AND reservedate <= CAST(NOW() AS DATE) "; |
285 |
} |
284 |
} |
286 |
if ( $itemnumber ) { |
285 |
if ( $itemnumber ) { |
287 |
$query .= " AND ( itemnumber IS NULL OR itemnumber = ? )"; |
286 |
$query .= " AND ( itemnumber IS NULL OR itemnumber = ? )"; |