From 88e913046aca1887723244620c5dd80d8a04f99a Mon Sep 17 00:00:00 2001 From: Ryan Higgins Date: Tue, 13 Nov 2007 23:57:59 -0600 Subject: [PATCH] fixing pending reserves to use dates specified Signed-off-by: Chris Cormack Signed-off-by: Joshua Ferraro --- circ/pendingreserves.pl | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/circ/pendingreserves.pl b/circ/pendingreserves.pl index 222c3b135d..76ad768171 100755 --- a/circ/pendingreserves.pl +++ b/circ/pendingreserves.pl @@ -64,9 +64,10 @@ my $todaysdate = my $dbh = C4::Context->dbh; my ($sqlorderby, $sqldatewhere) = ("",""); - -$sqldatewhere .= " && reservedate >= " . $dbh->quote($startdate) if ($startdate) ; -$sqldatewhere .= " && reservedate <= " . $dbh->quote($enddate) if ($enddate) ; +warn format_date_in_iso($startdate); +warn format_date_in_iso($enddate); +$sqldatewhere .= " AND reservedate >= " . $dbh->quote(format_date_in_iso($startdate)) if ($startdate) ; +$sqldatewhere .= " AND reservedate <= " . $dbh->quote(format_date_in_iso($enddate)) if ($enddate) ; if ($order eq "borrower") { $sqlorderby = " order by borrower, reservedate"; @@ -100,6 +101,7 @@ my $strsth = LEFT JOIN borrowers ON reserves.borrowernumber=borrowers.borrowernumber LEFT JOIN biblio ON reserves.biblionumber=biblio.biblionumber WHERE isnull(cancellationdate) + $sqldatewhere AND reserves.found is NULL "; if (C4::Context->preference('IndependantBranches')){ -- 2.39.2