From 9d60d73a068d477e3f05f506e98eaac056615507 Mon Sep 17 00:00:00 2001 From: Tomas Cohen Arazi Date: Tue, 13 Aug 2013 10:56:15 -0300 Subject: [PATCH] [PASSED QA] Bug 10606: Remove MySQLism in GetUpcomingDueIssues To test: [1] Arrange to have at least one loan in your test database due one day from now. [2] Run misc/cronjobs/advance_notices.pl -c -n -v -m=2 and note the number of loans reported. [3] Apply the patch. [4] Run misc/cronjobs/advance_notices.pl -c -n -v -m=2 again and verify that the number of loans reported remains the same. Sponsored-by: Universidad Nacional de Cordoba Signed-off-by: Jonathan Druart Signed-off-by: Katrin Fischer All tests and QA script pass. Also tested with unit tests from bug 10719. --- C4/Circulation.pm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/C4/Circulation.pm b/C4/Circulation.pm index 2c568b4b..0b037fd 100644 --- a/C4/Circulation.pm +++ b/C4/Circulation.pm @@ -2423,12 +2423,13 @@ sub GetUpcomingDueIssues { my $dbh = C4::Context->dbh; my $statement = < 0 AND days_until_due < ? +AND (DATE( date_due )-DATE( NOW() )) > 0 +AND (DATE( date_due )-DATE( NOW() )) < ? END_SQL my @bind_parameters = ( $params->{'days_in_advance'} ); -- 1.7.9.5