From 63a8c5bc9df7585ac4e5796e9f1a62f25f52ebb0 Mon Sep 17 00:00:00 2001 From: Henri-Damien LAURENT Date: Mon, 1 Nov 2010 22:15:05 +1300 Subject: [PATCH] MT3801 followup : Cannot claim for issues was missing an opening ( Adding test script Signed-off-by: Colin Campbell --- C4/Serials.pm | 2 +- t/Serials.t | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/C4/Serials.pm b/C4/Serials.pm index caf5df55b8..f274b18b17 100644 --- a/C4/Serials.pm +++ b/C4/Serials.pm @@ -96,7 +96,7 @@ sub GetSuppliersWithLateIssues { FROM subscription LEFT JOIN serial ON serial.subscriptionid=subscription.subscriptionid LEFT JOIN aqbooksellers ON subscription.aqbooksellerid = aqbooksellers.id - WHERE id > 0 AND (planneddate < now() OR serial.STATUS = 3 OR serial.STATUS = 4) ORDER BY name|; + WHERE id > 0 AND ((planneddate < now() AND serial.status=1) OR serial.STATUS = 3 OR serial.STATUS = 4) ORDER BY name|; return $dbh->selectall_arrayref($query, { Slice => {} }); } diff --git a/t/Serials.t b/t/Serials.t index ff8e5e1b71..01cf853293 100644 --- a/t/Serials.t +++ b/t/Serials.t @@ -2,7 +2,9 @@ use strict; use warnings; -use Test::More tests => 1; +use Test::More; use_ok('C4::Serials'); - +my $supplierlist=eval{GetSuppliersWithLateIssues()}; +ok(length($@)==0,"No SQL problem in GetSuppliersWithLateIssues"); +done_testing(); -- 2.39.5