# "INSERT INTO taxkeys (chart_id, tax_id, taxkey_id, pos_ustva, startdate)
# SELECT id, 0, 0, NULL, '01.01.1970' FROM chart WHERE charttype='A';",
"UPDATE chart SET taxkey_id = 0 WHERE taxkey_id ISNULL;",
- "UPDATE taxkeys SET pos_ustva='000' WHERE chart_id IN (SELECT id FROM chart WHERE accno IN (4010, 4015, 4020, 4025, 4030, 4035, 4040, 4045, 4050, 4310, 4315, 4320, 4322, 4325, 4330, 4335, 4340, 4345, 4350, 4450, 4029, 4329));",
- "UPDATE taxkeys SET pos_ustva='011' WHERE chart_id IN (SELECT id FROM chart WHERE accno IN (4029, 4329));",
- "UPDATE taxkeys SET pos_ustva='017' WHERE chart_id IN (SELECT id FROM chart WHERE accno IN (4015, 4025, 4035, 4045, 4315, 4325, 4335, 4345));",
- "UPDATE taxkeys SET pos_ustva='022' WHERE chart_id IN (SELECT id FROM chart WHERE accno IN (4040, 4045));",
- "UPDATE taxkeys SET pos_ustva='122' WHERE chart_id IN (SELECT id FROM chart WHERE accno IN (3520));",
- "UPDATE taxkeys SET pos_ustva='029' WHERE chart_id IN (SELECT id FROM chart WHERE accno IN (4010, 4015));",
- "UPDATE taxkeys SET pos_ustva='129' WHERE chart_id IN (SELECT id FROM chart WHERE accno IN (3510));",
- "UPDATE taxkeys SET pos_ustva='025' WHERE chart_id IN (SELECT id FROM chart WHERE accno IN (4012));",
- "UPDATE taxkeys SET pos_ustva='125' WHERE chart_id IN (SELECT id FROM chart WHERE accno IN (3512));",
- "UPDATE taxkeys SET pos_ustva='035' WHERE chart_id IN (SELECT id FROM chart WHERE accno IN (4016));",
- "UPDATE taxkeys SET pos_ustva='135' WHERE chart_id IN (SELECT id FROM chart WHERE accno IN (3516));",
- "UPDATE taxkeys SET pos_ustva='070' WHERE chart_id IN (SELECT id FROM chart WHERE accno IN (5015, 5025));",
- "UPDATE taxkeys SET pos_ustva='072' WHERE chart_id IN (SELECT id FROM chart WHERE accno IN (5025));",
- "UPDATE taxkeys SET pos_ustva='172' WHERE chart_id IN (SELECT id FROM chart WHERE accno IN (3502));",
- "UPDATE taxkeys SET pos_ustva='073' WHERE chart_id IN (SELECT id FROM chart WHERE accno IN (5015));",
- "UPDATE taxkeys SET pos_ustva='173' WHERE chart_id IN (SELECT id FROM chart WHERE accno IN (3501));",
- "UPDATE taxkeys SET pos_ustva='060' WHERE chart_id IN (SELECT id FROM chart WHERE accno IN (2510, 2512, 2516, 2519, 2520));",
- "UPDATE taxkeys SET pos_ustva='065' WHERE chart_id IN (SELECT id FROM chart WHERE accno IN (2515));",
+ "UPDATE taxkeys SET pos_ustva='000' WHERE chart_id IN (SELECT id FROM chart WHERE accno IN ('4010', '4015', '4020', '4025', '4030', '4035', '4040', '4045', '4050', '4310', '4315', '4320', '4322', '4325', '4330', '4335', '4340', '4345', '4350', '4450', '4029', '4329'));",
+ "UPDATE taxkeys SET pos_ustva='011' WHERE chart_id IN (SELECT id FROM chart WHERE accno IN ('4029', '4329'));",
+ "UPDATE taxkeys SET pos_ustva='017' WHERE chart_id IN (SELECT id FROM chart WHERE accno IN ('4015', '4025', '4035', '4045', '4315', '4325', '4335', '4345'));",
+ "UPDATE taxkeys SET pos_ustva='022' WHERE chart_id IN (SELECT id FROM chart WHERE accno IN ('4040', '4045'));",
+ "UPDATE taxkeys SET pos_ustva='122' WHERE chart_id IN (SELECT id FROM chart WHERE accno IN ('3520'));",
+ "UPDATE taxkeys SET pos_ustva='029' WHERE chart_id IN (SELECT id FROM chart WHERE accno IN ('4010', '4015'));",
+ "UPDATE taxkeys SET pos_ustva='129' WHERE chart_id IN (SELECT id FROM chart WHERE accno IN ('3510'));",
+ "UPDATE taxkeys SET pos_ustva='025' WHERE chart_id IN (SELECT id FROM chart WHERE accno IN ('4012'));",
+ "UPDATE taxkeys SET pos_ustva='125' WHERE chart_id IN (SELECT id FROM chart WHERE accno IN ('3512'));",
+ "UPDATE taxkeys SET pos_ustva='035' WHERE chart_id IN (SELECT id FROM chart WHERE accno IN ('4016'));",
+ "UPDATE taxkeys SET pos_ustva='135' WHERE chart_id IN (SELECT id FROM chart WHERE accno IN ('3516'));",
+ "UPDATE taxkeys SET pos_ustva='070' WHERE chart_id IN (SELECT id FROM chart WHERE accno IN ('5015', '5025'));",
+ "UPDATE taxkeys SET pos_ustva='072' WHERE chart_id IN (SELECT id FROM chart WHERE accno IN ('5025'));",
+ "UPDATE taxkeys SET pos_ustva='172' WHERE chart_id IN (SELECT id FROM chart WHERE accno IN ('3502'));",
+ "UPDATE taxkeys SET pos_ustva='073' WHERE chart_id IN (SELECT id FROM chart WHERE accno IN ('5015'));",
+ "UPDATE taxkeys SET pos_ustva='173' WHERE chart_id IN (SELECT id FROM chart WHERE accno IN ('3501'));",
+ "UPDATE taxkeys SET pos_ustva='060' WHERE chart_id IN (SELECT id FROM chart WHERE accno IN ('2510', '2512', '2516', '2519', '2520'));",
+ "UPDATE taxkeys SET pos_ustva='065' WHERE chart_id IN (SELECT id FROM chart WHERE accno IN ('2515'));",
);
for my $statement ( 0 .. $#copy_statements ) {