Bug 6292 followup
authorSophie Meynieux <sophie.meynieux@biblibre.com>
Fri, 12 Aug 2011 14:04:13 +0000 (16:04 +0200)
committerPaul Poulain <paul.poulain@biblibre.com>
Fri, 16 Dec 2011 16:45:36 +0000 (17:45 +0100)
selection of items to be listed in an overdue notice included
both limits (upper and lower). So items with an overdue equal
to a limit appeared on both notices. This patch fix this,
including lower limit and excluding upper limit for the selection.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
misc/cronjobs/overdue_notices.pl

index 6e723b2..fa13c59 100755 (executable)
@@ -410,7 +410,7 @@ END_SQL
             my $mindays = $overdue_rules->{"delay$i"};    # the notice will be sent after mindays days (grace period)
             my $maxdays = (
                   $overdue_rules->{ "delay" . ( $i + 1 ) }
-                ? $overdue_rules->{ "delay" . ( $i + 1 ) }
+                ? $overdue_rules->{ "delay" . ( $i + 1 ) } - 1
                 : ($MAX)
             );                                            # issues being more than maxdays late are managed somewhere else. (borrower probably suspended)