From 980877a3d8ace9a2ded325ed0e4d683f3c90cd9f Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Tue, 9 Jan 2007 14:48:03 +0000 Subject: [PATCH] =?utf8?q?In=20den=20Kontenrahmendefinitionen=20f=C3=BCr?= =?utf8?q?=20den=20SKR03=20und=20den=20SKR04=20werden=20ung=C3=BCltige=20(?= =?utf8?q?weil=20nicht=20existierende)=20Steuerschl=C3=BCssel=20referenzie?= =?utf8?q?rt.=20Diese=20Referenzen=20werden=20einfach=20auf=200=20gesetzt?= =?utf8?q?=20(=20=3D=20keine=20Steuer).=20Die=20fehlerhaften=20Eintr=C3=A4?= =?utf8?q?ge=20in=20taxkeys=20sind=20Resultat=20der=20fehlerhaften=20Eintr?= =?utf8?q?=C3=A4ge=20in=20chart.?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- sql/Pg-upgrade2/invalid_taxkeys.sql | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 sql/Pg-upgrade2/invalid_taxkeys.sql diff --git a/sql/Pg-upgrade2/invalid_taxkeys.sql b/sql/Pg-upgrade2/invalid_taxkeys.sql new file mode 100644 index 000000000..3b11ebd39 --- /dev/null +++ b/sql/Pg-upgrade2/invalid_taxkeys.sql @@ -0,0 +1,5 @@ +-- @tag: invalid_taxkesy +-- @description: Ungültige Steuerschlüssel in den Kontenrahmendefinitionen und daraus resultierende falsche Einträge in anderen Tabellen werden korrigiert. +-- @depends: tax_primary_key_taxkeys_foreign_keys +UPDATE chart SET taxkey_id = 0 WHERE taxkey_id NOT IN (SELECT DISTINCT taxkey_id FROM taxkeys); +UPDATE taxkeys SET taxkey_id = 0, tax_id = 0 WHERE taxkey_id NOT IN (SELECT DISTINCT taxkey_id FROM taxkeys); -- 2.20.1