From b5abb626b03cbca0ec7189894375c31d7b588951 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Bernd=20Ble=C3=9Fmann?= Date: Wed, 1 Jul 2020 11:50:32 +0200 Subject: [PATCH] =?utf8?q?SKR04:=20Steuer=20mit=20Schl=C3=BCssel=2015=20un?= =?utf8?q?d=2017=20(16%)=20bei=20SKR04=20entfernen=20=E2=80=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit …, wenn unbenutzt. Wenn nicht angepasst, dann sind diese Steuern mit reservierten Steuerkonten verknüpft, die jetzt für die neue Steuer verwendet/umbenannt wurden. Zudem gibt es keine Konten, die diese Steuerschlüssel für die Steuerautomatik verwenden. --- sql/Pg-upgrade2/remove_taxkey_15_17_skr04.sql | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 sql/Pg-upgrade2/remove_taxkey_15_17_skr04.sql diff --git a/sql/Pg-upgrade2/remove_taxkey_15_17_skr04.sql b/sql/Pg-upgrade2/remove_taxkey_15_17_skr04.sql new file mode 100644 index 000000000..e431c51e8 --- /dev/null +++ b/sql/Pg-upgrade2/remove_taxkey_15_17_skr04.sql @@ -0,0 +1,19 @@ +-- @tag: remove_taxkey_15_17_skr04 +-- @description: Steuer mit Schlüssel 15 und 17 (16%) für SKR04 entfernen, wenn nicht verknüpft +-- @depends: release_3_5_5 + +DELETE FROM tax + WHERE (SELECT coa FROM defaults) LIKE 'Germany-DATEV-SKR04EU' + AND taxkey = 17 + AND chart_id = (SELECT chart_id FROM chart WHERE accno LIKE '1403') + AND rate = .16 + AND NOT EXISTS (SELECT id FROM taxkeys WHERE tax_id = tax.id) + AND NOT EXISTS (SELECT id FROM acc_trans WHERE tax_id = tax.id); + +DELETE FROM tax + WHERE (SELECT coa FROM defaults) LIKE 'Germany-DATEV-SKR04EU' + AND taxkey = 15 + AND chart_id = (SELECT chart_id FROM chart WHERE accno LIKE '3803') + AND rate = .16 + AND NOT EXISTS (SELECT id FROM taxkeys WHERE tax_id = tax.id) + AND NOT EXISTS (SELECT id FROM acc_trans WHERE tax_id = tax.id); -- 2.20.1