From: Jan Büren Date: Tue, 1 Mar 2022 12:51:22 +0000 (+0100) Subject: DB-Upgrade tax_reverse_charge, syntaktischen Fehler behoben X-Git-Tag: kivitendo-mebil_0.1-0~10^2~2^2~156 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=bb84bc55a14e2124d1dfd899d8e7afaad152a35d;p=kivitendo-erp.git DB-Upgrade tax_reverse_charge, syntaktischen Fehler behoben --- diff --git a/sql/Pg-upgrade2/tax_reverse_charge.sql b/sql/Pg-upgrade2/tax_reverse_charge.sql index bf1a07d80..cf075a954 100644 --- a/sql/Pg-upgrade2/tax_reverse_charge.sql +++ b/sql/Pg-upgrade2/tax_reverse_charge.sql @@ -1,7 +1,7 @@ -- @tag: tax_reverse_charge -- @description: Reverse Charge für Kreditorenbelege --- @depends: release_3_6_0 --- @ignore: 1 +-- @depends: release_3_5_0 +-- @ignore: 0 ALTER TABLE tax add column reverse_charge_chart_id integer; @@ -102,7 +102,8 @@ WHERE EXISTS ( -- update only for SKR03 ; -- if not defined insert into taxkeys(chart_id,tax_id,taxkey_id,startdate) SELECT (SELECT chart_id FROM tax WHERE taxkey = '94'),0,0,'1970-01-01' WHERE NOT EXISTS - (SELECT chart_id from taxkeys where chart_id = ( SELECT chart_id FROM tax WHERE taxkey = '94') ; + (SELECT chart_id from taxkeys where chart_id = ( SELECT chart_id FROM tax WHERE taxkey = '94')); + insert into taxkeys(chart_id,tax_id,taxkey_id,startdate) SELECT (SELECT reverse_charge_chart_id FROM tax WHERE taxkey = '94'),0,0,'1970-01-01' WHERE NOT EXISTS - (SELECT chart_id from taxkeys where chart_id = ( SELECT reverse_charge_chart_id FROM tax WHERE taxkey = '94'); + (SELECT chart_id from taxkeys where chart_id = ( SELECT reverse_charge_chart_id FROM tax WHERE taxkey = '94'));