From ed11f8c7cbf055eee2a32328b09189fcf6f29b53 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jan=20B=C3=BCren?= Date: Sun, 8 Jan 2017 17:19:24 +0100 Subject: [PATCH] SelfTest Kosmetik MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Ein überflüssiges JOIN entfernt und etwas sinnvoller den Code formatiert. --- SL/BackgroundJob/SelfTest/Transactions.pm | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) 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'); -- 2.20.1