Revision 3922a3c1
Von Andreas Rudin vor fast 4 Jahren hinzugefügt
sql/Pg-upgrade2/konjunkturpaket_2020.sql | ||
---|---|---|
49 | 49 |
-- (13, 0.19, 0.16, null, null); |
50 | 50 |
|
51 | 51 |
|
52 |
create temp table temp_taxkey_conversions (taxkey int, old_rate numeric, old_chart text, new_rate numeric, new_chart text); |
|
53 |
|
|
54 |
IF ( select coa from defaults ) = 'Germany-DATEV-SKR03EU' THEN |
|
55 |
insert into temp_taxkey_conversions (taxkey, old_rate, old_chart, new_rate, new_chart) |
|
56 |
values (9, 0.19, '1576', 0.16, '1575'), |
|
57 |
(8, 0.07, '1571', 0.05, '1568'), |
|
58 |
(3, 0.19, '1776', 0.16, '1575'), |
|
59 |
(2, 0.07, '1771', 0.05, '1775'); |
|
52 |
create temp table temp_taxkey_conversions (taxkey int, old_rate numeric, old_chart text, new_rate numeric, new_chart text);
|
|
53 |
|
|
54 |
IF ( select coa from defaults ) = 'Germany-DATEV-SKR03EU' THEN
|
|
55 |
insert into temp_taxkey_conversions (taxkey, old_rate, old_chart, new_rate, new_chart)
|
|
56 |
values (9, 0.19, '1576', 0.16, '1575'),
|
|
57 |
(8, 0.07, '1571', 0.05, '1568'),
|
|
58 |
(3, 0.19, '1776', 0.16, '1575'),
|
|
59 |
(2, 0.07, '1771', 0.05, '1775');
|
|
60 | 60 |
--1776 => 19% |
61 | 61 |
--1775 => 16% |
62 | 62 |
--1775 => 5% |
... | ... | |
199 | 199 |
|
200 | 200 |
-- RAISE NOTICE 'inserted 2 taxkeys for chart % with taxkey %', (select accno from chart where id = current_taxkey.chart_id), current_taxkey.taxkey_id; |
201 | 201 |
END LOOP; -- |
202 |
END IF; -- DATEV coa |
|
203 | 202 |
|
204 |
END $$;
|
|
203 |
drop table temp_taxkey_conversions;
|
|
205 | 204 |
|
206 |
drop table temp_taxkey_conversions; |
|
205 |
END IF; |
|
206 |
|
|
207 |
END $$; |
|
207 | 208 |
|
208 | 209 |
-- select * from taxkeys where startdate >= '2020-01-01'; |
209 | 210 |
-- rollback; |
Auch abrufbar als: Unified diff
Zeile 'drop table temp_taxkey_conversions;' vor 'END IF;'