Lines 372-378
sub GetReservesFromItemnumber {
Link Here
|
372 |
WHERE itemnumber=? |
372 |
WHERE itemnumber=? |
373 |
"; |
373 |
"; |
374 |
unless ( $all_dates ) { |
374 |
unless ( $all_dates ) { |
375 |
$query .= " AND reservedate <= CURRENT_DATE()"; |
375 |
$query .= " AND reservedate <= CAST(now() AS date)"; |
376 |
} |
376 |
} |
377 |
my $sth_res = $dbh->prepare($query); |
377 |
my $sth_res = $dbh->prepare($query); |
378 |
$sth_res->execute($itemnumber); |
378 |
$sth_res->execute($itemnumber); |
Lines 942-948
sub CancelExpiredReserves {
Link Here
|
942 |
# Cancel reserves that have passed their expiration date. |
942 |
# Cancel reserves that have passed their expiration date. |
943 |
my $dbh = C4::Context->dbh; |
943 |
my $dbh = C4::Context->dbh; |
944 |
my $sth = $dbh->prepare( " |
944 |
my $sth = $dbh->prepare( " |
945 |
SELECT * FROM reserves WHERE DATE(expirationdate) < DATE( CURDATE() ) |
945 |
SELECT * FROM reserves WHERE DATE(expirationdate) < CAST(now() AS date) |
946 |
AND expirationdate IS NOT NULL |
946 |
AND expirationdate IS NOT NULL |
947 |
AND found IS NULL |
947 |
AND found IS NULL |
948 |
" ); |
948 |
" ); |
Lines 1810-1816
sub _Findgroupreserve {
Link Here
|
1810 |
AND reserves.reservedate = reserveconstraints.reservedate ) |
1810 |
AND reserves.reservedate = reserveconstraints.reservedate ) |
1811 |
OR reserves.constrainttype='a' ) |
1811 |
OR reserves.constrainttype='a' ) |
1812 |
AND (reserves.itemnumber IS NULL OR reserves.itemnumber = ?) |
1812 |
AND (reserves.itemnumber IS NULL OR reserves.itemnumber = ?) |
1813 |
AND reserves.reservedate <= DATE_ADD(NOW(),INTERVAL ? DAY) |
1813 |
AND reserves.reservedate <= CAST(now() AS date) |
1814 |
AND suspend = 0 |
1814 |
AND suspend = 0 |
1815 |
/; |
1815 |
/; |
1816 |
$sth = $dbh->prepare($query); |
1816 |
$sth = $dbh->prepare($query); |