From: Jan Büren Date: Fri, 29 Apr 2016 10:30:26 +0000 (+0200) Subject: SelfTests: Verwaiste invoice-Einträge auch auf Zeitraum beschränken X-Git-Tag: release-3.4.1~166 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=552b1b8ba168cda80a7cedf40dcb950c1b11381a;p=kivitendo-erp.git SelfTests: Verwaiste invoice-Einträge auch auf Zeitraum beschränken --- 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 }) {