Polish language updates
[koha.git] / misc / cronjobs / notifyMailsOp.pl
index e2a086f..e44ab78 100755 (executable)
@@ -1,6 +1,13 @@
+#!/usr/bin/perl
 use strict;
+BEGIN {
+    # find Koha's Perl modules
+    # test carefully before changing this
+    use FindBin;
+    eval { require "$FindBin::Bin/../kohalib.pl" };
+}
 use C4::Context;
-use C4::Date;
+use C4::Dates qw/format_date/;
 use Mail::Sendmail;  # comment out if not doing e-mail notices
 use Getopt::Long;
 use C4::Circulation;
@@ -41,8 +48,6 @@ sub GetBorrowerNotifys{
                        AND
                        (notifys.borrowernumber=issues.borrowernumber AND notifys.itemnumber=issues.itemnumber)
                        AND
-                       issues.returndate IS NULL
-                       AND
                        notifys.borrowernumber=?
                        AND notify_send_date IS NULL");
                        $sth2->execute($borrowernumber);