From 552b1b8ba168cda80a7cedf40dcb950c1b11381a Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jan=20B=C3=BCren?= Date: Fri, 29 Apr 2016 12:30:26 +0200 Subject: [PATCH] =?utf8?q?SelfTests:=20Verwaiste=20invoice-Eintr=C3=A4ge?= =?utf8?q?=20auch=20auf=20Zeitraum=20beschr=C3=A4nken?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- SL/BackgroundJob/SelfTest/Transactions.pm | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/SL/BackgroundJob/SelfTest/Transactions.pm b/SL/BackgroundJob/SelfTest/Transactions.pm index 667213d4b..eedbbee20 100644 --- a/SL/BackgroundJob/SelfTest/Transactions.pm +++ b/SL/BackgroundJob/SelfTest/Transactions.pm @@ -136,9 +136,15 @@ sub check_verwaiste_invoice_eintraege { my ($self) = @_; my $query = qq| select * from invoice i - where trans_id not in (select id from ar union select id from ap order by id) |; + where trans_id not in (select id from ar WHERE ar.transdate >=? AND ar.transdate <=? + UNION + select id from ap WHERE ap.transdate >= ? and ap.transdate <= ?) + AND i.transdate >=? AND i.transdate <=?|; + + my $verwaiste_invoice = selectall_hashref_query($::form, $self->dbh, $query, $self->fromdate, $self->todate, + $self->fromdate, $self->todate, $self->fromdate, $self->todate); + - my $verwaiste_invoice = selectall_hashref_query($::form, $self->dbh, $query); if (@$verwaiste_invoice) { $self->tester->ok(0, "Es gibt verwaiste invoice Einträge! (wo ar/ap-Eintrag fehlt)"); for my $invoice ( @{ $verwaiste_invoice }) { -- 2.20.1