From: Jan Büren Date: Sun, 8 Jan 2017 16:19:24 +0000 (+0100) Subject: SelfTest Kosmetik X-Git-Tag: release-3.5.4~1761 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=ed11f8c7cbf055eee2a32328b09189fcf6f29b53;p=kivitendo-erp.git SelfTest Kosmetik Ein überflüssiges JOIN entfernt und etwas sinnvoller den Code formatiert. --- diff --git a/SL/BackgroundJob/SelfTest/Transactions.pm b/SL/BackgroundJob/SelfTest/Transactions.pm index f0d6da9c1..89dfd58ce 100644 --- a/SL/BackgroundJob/SelfTest/Transactions.pm +++ b/SL/BackgroundJob/SelfTest/Transactions.pm @@ -205,13 +205,15 @@ sub check_summe_stornobuchungen { my ($self) = @_; my $query = qq| - select sum(amount) from ar a JOIN customer c ON (a.customer_id = c.id) - WHERE a.id in (SELECT id from ap where storno is true AND a.transdate >= ? and a.transdate <= ?)|; + SELECT sum(amount) from ar a WHERE a.id IN + (SELECT id from ap where storno is true + AND a.transdate >= ? and a.transdate <= ?)|; my ($summe_stornobuchungen_ar) = selectfirst_array_query($::form, $self->dbh, $query, $self->fromdate, $self->todate); $query = qq| - select sum(amount) from ap a JOIN vendor c ON (a.vendor_id = c.id) - WHERE a.id in (SELECT id from ap where storno is true AND a.transdate >= ? and a.transdate <= ?)|; + SELECT sum(amount) from ap a WHERE a.id IN + (SELECT id from ap where storno is true + AND a.transdate >= ? and a.transdate <= ?)|; my ($summe_stornobuchungen_ap) = selectfirst_array_query($::form, $self->dbh, $query, $self->fromdate, $self->todate); $self->tester->ok($summe_stornobuchungen_ap == 0, 'Summe aller Einkaufsrechnungen (stornos + stornierte) soll 0 sein');