Revision 1f3fcb1b
Von Jan Büren vor etwa 2 Jahren hinzugefügt
sql/Pg-upgrade2/undo_delete_wrong_charts_for_taxkeys.sql | ||
---|---|---|
1 |
-- @tag: undo_delete_wrong_charts_for_taxkeys |
|
2 |
-- @description: chart_id kann doch mehrdeutig sein in der Tabelle für SKR04 |
|
3 |
-- @depends: release_3_7_0 delete_wrong_charts_for_taxkeys delete_wrong_charts_for_taxkeys_04 |
|
4 |
ALTER TABLE tax DROP CONSTRAINT IF EXISTS chart_id_unique_tax; |
|
5 |
-- skr04 |
|
6 |
|
|
7 |
update tax set chart_id = (select chart_id from tax where chart_id is not null and taxkey=7 and rate=0.16) where chart_id is null |
|
8 |
AND taxkey=9 and rate=0.16 AND EXISTS (SELECT * FROM defaults WHERE coa = 'Germany-DATEV-SKR04EU'); |
|
9 |
|
|
10 |
update tax set chart_id = (select chart_id from tax where chart_id is not null and taxkey=5 and rate=0.16) where chart_id is null and taxkey=3 and rate=0.16 |
|
11 |
AND EXISTS (SELECT * FROM defaults WHERE coa = 'Germany-DATEV-SKR04EU'); |
|
12 |
|
Auch abrufbar als: Unified diff
DB-Skript zuviel in der 3.6 korrigiert.
Für SKR04 brauchen wir zwei identische Automatik-Steuerkonten für
verschiedene Steuerschlüssel