From 07f9dd9f8c2abb43a031c91449661a779ff53746 Mon Sep 17 00:00:00 2001 From: Chris Cormack Date: Sat, 7 Feb 2015 17:04:40 +1300 Subject: [PATCH] Bug 13679 : Bug in listing overdues To test 1/ Create some overdues and some issues due in the future 2/ Run the overdues script 3/ Notice item due in the future is in the list 4/ Apply patch 5/ Run script again 6/ Notice in the future not in the list Signed-off-by: Nick Signed-off-by: Jonathan Druart Signed-off-by: Tomas Cohen Arazi --- misc/cronjobs/overdue_notices.pl | 2 ++ 1 file changed, 2 insertions(+) diff --git a/misc/cronjobs/overdue_notices.pl b/misc/cronjobs/overdue_notices.pl index 4d05ff71d6..8db858d0e4 100755 --- a/misc/cronjobs/overdue_notices.pl +++ b/misc/cronjobs/overdue_notices.pl @@ -602,6 +602,8 @@ END_SQL my $j = 0; my $exceededPrintNoticesMaxLines = 0; while ( my $item_info = $sth2->fetchrow_hashref() ) { + next unless ( DateTime->compare( $date_to_run, dt_from_string($item_info->{date_due})) ) == 1; + if ( C4::Context->preference('OverdueNoticeCalendar') ) { my $calendar = Koha::Calendar->new( branchcode => $branchcode ); -- 2.39.5