From 6c8feefecfae5b5ce1d3ea7a5d05d8c2f53f0c81 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20B=C3=BCren?= Date: Mon, 4 Nov 2024 12:19:04 +0100 Subject: [PATCH] SelfTest:check_missing_tax: Bei reverse_charge Steuer, kein Fehlalarm --- SL/BackgroundJob/SelfTest/Transactions.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SL/BackgroundJob/SelfTest/Transactions.pm b/SL/BackgroundJob/SelfTest/Transactions.pm index 3b62e278b4..db0d13f77e 100644 --- a/SL/BackgroundJob/SelfTest/Transactions.pm +++ b/SL/BackgroundJob/SelfTest/Transactions.pm @@ -523,7 +523,7 @@ 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 NOT IN (SELECT taxkey from tax where rate=0) AND trans_id NOT IN + WHERE taxkey NOT IN (SELECT taxkey from tax where rate=0 OR reverse_charge_chart_id is not null) 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 NOT IN (SELECT taxkey from tax where rate=0))) AND transdate >= ? AND transdate <= ?|;