From: Jan Büren Date: Fri, 29 Apr 2016 11:03:25 +0000 (+0200) Subject: SelfTests Buchungen ohne Steuer auch mit Steuerschlüssel 11, etc filtern X-Git-Tag: release-3.4.1~165 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=b4cc5e2acdb5464407c3f5a14e8cea69a13c8ea4;p=kivitendo-erp.git SelfTests Buchungen ohne Steuer auch mit Steuerschlüssel 11, etc filtern Nicht nur Steuerschlüssel 0 kann steuerfrei sein, sondern auch diverse andere (tax.rate beachten!) --- 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);