(bug #4043) fix checkoverdues sqlquery
authorNahuel ANGELINETTI <nahuel.angelinetti@biblibre.com>
Thu, 14 Jan 2010 09:01:22 +0000 (10:01 +0100)
committerHenri-Damien LAURENT <henridamien.laurent@biblibre.com>
Tue, 19 Jan 2010 21:08:17 +0000 (22:08 +0100)
this fix the sqlquery to use "curdate()" instead of "now()", because now return a "datetime", and in date_due we have only a "date", so now() > curdate() everytime, it cause some problems in messages.

C4/Overdues.pm

index 707bd1b..f67f16a 100644 (file)
@@ -169,7 +169,7 @@ sub checkoverdues {
          LEFT JOIN biblio      ON items.biblionumber     = biblio.biblionumber
          LEFT JOIN biblioitems ON items.biblioitemnumber = biblioitems.biblioitemnumber
             WHERE issues.borrowernumber  = ?
-            AND   issues.date_due < NOW()"
+            AND   issues.date_due < CURDATE()"
     );
     # FIXME: SELECT * across 4 tables?  do we really need the marc AND marcxml blobs??
     $sth->execute($borrowernumber);