From b4cc5e2acdb5464407c3f5a14e8cea69a13c8ea4 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jan=20B=C3=BCren?= Date: Fri, 29 Apr 2016 13:03:25 +0200 Subject: [PATCH] =?utf8?q?SelfTests=20Buchungen=20ohne=20Steuer=20auch=20m?= =?utf8?q?it=20Steuerschl=C3=BCssel=2011,=20etc=20filtern?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Nicht nur Steuerschlüssel 0 kann steuerfrei sein, sondern auch diverse andere (tax.rate beachten!) --- SL/BackgroundJob/SelfTest/Transactions.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/SL/BackgroundJob/SelfTest/Transactions.pm b/SL/BackgroundJob/SelfTest/Transactions.pm index eedbbee20..5580ba620 100644 --- a/SL/BackgroundJob/SelfTest/Transactions.pm +++ b/SL/BackgroundJob/SelfTest/Transactions.pm @@ -500,9 +500,9 @@ sub check_missing_tax_bookings { # check tax bookings. all taxkey <> 0 should have tax bookings in acc_trans my $query = qq| select trans_id, chart.accno,transdate from acc_trans left join chart on (chart.id = acc_trans.chart_id) - WHERE taxkey <> 0 AND trans_id NOT IN + WHERE taxkey NOT IN (SELECT taxkey from tax where rate=0) AND trans_id NOT IN (select trans_id from acc_trans where chart_link ilike '%tax%' and trans_id IN - (SELECT trans_id from acc_trans where taxkey <> 0)) + (SELECT trans_id from acc_trans where taxkey NOT IN (SELECT taxkey from tax where rate=0))) AND transdate >= ? AND transdate <= ?|; my $missing_tax_bookings = selectall_hashref_query($::form, $self->dbh, $query, $self->fromdate, $self->todate); -- 2.20.1