Steuerkram/migrations/017_fix_ustva_kz.sql

34 lines
1.3 KiB
SQL
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

-- Migration 017: UStVA-Kennzahlen korrigieren
--
-- Problem 1: KZ 61 wurde fälschlich für normale Inlands-Vorsteuer (VSt19) verwendet.
-- Korrekt ist KZ 66 (§ 15 Abs. 1 Nr. 1 UStG, inländische Eingangsrechnungen).
-- KZ 61 = Vorsteuer aus innergemeinschaftlichem Erwerb (EU-Ausland).
--
-- Problem 2: KZ 62 wurde fälschlich für VSt7-Inlandsrechnungen verwendet.
-- Korrekt ist ebenfalls KZ 66.
-- KZ 62 = Einfuhrumsatzsteuer (Zollamt, Drittland).
--
-- Problem 3: KZ 35 (andere Steuersätze, Corona-Übergangszeitraum) wurde für
-- steuerfreie Inlandsumsätze verwendet.
-- Korrekt: KZ 48 (§ 4 Nr. 8–29 UStG, steuerfrei ohne VoSt-Abzug)
-- KZ 43 (§ 4 Nr. 1a UStG, Ausfuhrlieferungen Drittland)
-- VSt19-Konten: KZ 61 → 66
UPDATE accounts
SET ustva_kz = '66'
WHERE steuercode = 'VSt19' AND ustva_kz = '61';
-- VSt7-Konten: KZ 62 → 66
UPDATE accounts
SET ustva_kz = '66'
WHERE steuercode = 'VSt7' AND ustva_kz = '62';
-- Steuerfreie Inlandsumsätze § 4 Nr. 8ff / Nr. 12 / sonstige: KZ 35 → 48
UPDATE accounts
SET ustva_kz = '48'
WHERE kontonummer IN ('8100', '8105', '8110');
-- Ausfuhrlieferungen § 4 Nr. 1a UStG: KZ 35 → 43
UPDATE accounts
SET ustva_kz = '43'
WHERE kontonummer = '8120';