@tasenor/common-plugins 1.9.85 → 1.9.86

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (48) hide show
  1. package/.turbo/turbo-build.log +1 -1
  2. package/.turbo/turbo-ci.log +2 -2
  3. package/data/FinnishBalanceSheetReport.mjs +3 -2
  4. package/data/FinnishBalanceSheetReportLite.mjs +3 -2
  5. package/data/FinnishIncomeStatementReport.mjs +3 -2
  6. package/data/FinnishIncomeStatementReportLite.mjs +3 -2
  7. package/data/FinnishLimitedCompanyComplete.mjs +3 -2
  8. package/data/FinnishLimitedCompanyLite.mjs +3 -2
  9. package/data/IncomeAndExpenses.mjs +3 -2
  10. package/data/PluginIndex.mjs +1 -1
  11. package/data/VATFinland.mjs +3 -2
  12. package/dist/index.d.ts +0 -3
  13. package/dist/index.js +0 -3
  14. package/dist/index.js.map +1 -1
  15. package/package.json +8 -6
  16. package/src/index.ts +0 -3
  17. package/data/FinnishBalanceSheetReportInvestment.mjs +0 -11
  18. package/data/FinnishIncomeStatementReportInvestment.mjs +0 -11
  19. package/data/FinnishInvestmentCompany.mjs +0 -5
  20. package/data/lib/utils.mjs +0 -314
  21. package/data/src/FinnishBalanceSheetReportInvestment - balance-sheet-detailed-fi.tsv +0 -100
  22. package/data/src/FinnishBalanceSheetReportInvestment - balance-sheet-fi.tsv +0 -52
  23. package/data/src/FinnishIncomeStatementReportInvestment - income-statement-detailed-fi.tsv +0 -96
  24. package/data/src/FinnishIncomeStatementReportInvestment - income-statement-fi.tsv +0 -39
  25. package/data/src/FinnishInvestmentCompany - fi-EUR.tsv +0 -722
  26. package/dist/FinnishBalanceSheetReportInvestment/backend/index.d.ts +0 -18
  27. package/dist/FinnishBalanceSheetReportInvestment/backend/index.js +0 -96
  28. package/dist/FinnishBalanceSheetReportInvestment/backend/index.js.map +0 -1
  29. package/dist/FinnishIncomeStatementReportInvestment/backend/index.d.ts +0 -26
  30. package/dist/FinnishIncomeStatementReportInvestment/backend/index.js +0 -190
  31. package/dist/FinnishIncomeStatementReportInvestment/backend/index.js.map +0 -1
  32. package/dist/FinnishInvestmentCompany/backend/index.d.ts +0 -10
  33. package/dist/FinnishInvestmentCompany/backend/index.js +0 -36
  34. package/dist/FinnishInvestmentCompany/backend/index.js.map +0 -1
  35. package/dist/FinnishInvestmentCompany/ui/index.d.ts +0 -16
  36. package/dist/FinnishInvestmentCompany/ui/index.js +0 -22
  37. package/dist/FinnishInvestmentCompany/ui/index.js.map +0 -1
  38. package/src/FinnishBalanceSheetReportInvestment/backend/balance-sheet-investment-detailed-fi.tsv +0 -100
  39. package/src/FinnishBalanceSheetReportInvestment/backend/balance-sheet-investment-fi.tsv +0 -52
  40. package/src/FinnishBalanceSheetReportInvestment/backend/index.ts +0 -107
  41. package/src/FinnishIncomeStatementReportInvestment/backend/income-statement-detailed-fi.tsv +0 -118
  42. package/src/FinnishIncomeStatementReportInvestment/backend/income-statement-fi.tsv +0 -45
  43. package/src/FinnishIncomeStatementReportInvestment/backend/income-statement-investment-detailed-fi.tsv +0 -96
  44. package/src/FinnishIncomeStatementReportInvestment/backend/income-statement-investment-fi.tsv +0 -39
  45. package/src/FinnishIncomeStatementReportInvestment/backend/index.ts +0 -212
  46. package/src/FinnishInvestmentCompany/backend/fi-EUR.tsv +0 -722
  47. package/src/FinnishInvestmentCompany/backend/index.ts +0 -46
  48. package/src/FinnishInvestmentCompany/ui/index.tsx +0 -26
@@ -1,107 +0,0 @@
1
- import { AccountNumber, Language, PluginCode, ReportID, ReportOptions, Version } from '@tasenor/common'
2
- import { ReportPlugin } from '@tasenor/common-node'
3
- import dayjs from 'dayjs'
4
- import quarterOfYear from 'dayjs/plugin/quarterOfYear'
5
- dayjs.extend(quarterOfYear)
6
-
7
- class FinnishBalanceSheetReportInvestment extends ReportPlugin {
8
- constructor() {
9
- super('balance-sheet-investment-detailed' as ReportID, 'balance-sheet-investment' as ReportID)
10
-
11
- this.schemes = new Set(['FinnishInvestmentCompany'])
12
-
13
- this.code = 'FinnishBalanceSheetReportInvestment' as PluginCode
14
- this.title = 'Balance Sheet Report (Finnish - Investment)'
15
- this.version = '1.0.1' as Version
16
- this.icon = '<svg xmlns="http://www.w3.org/2000/svg" enable-background="new 0 0 24 24" height="24px" viewBox="0 0 24 24" width="24px" fill="#000000"><g><path d="M0,0h24v24H0V0z" fill="none"/></g><g><g><path d="M14,5H5v14h14v-9h-5V5z M8,17c-0.55,0-1-0.45-1-1s0.45-1,1-1s1,0.45,1,1S8.55,17,8,17z M8,13 c-0.55,0-1-0.45-1-1s0.45-1,1-1s1,0.45,1,1S8.55,13,8,13z M8,9C7.45,9,7,8.55,7,8s0.45-1,1-1s1,0.45,1,1S8.55,9,8,9z" opacity=".3"/><circle cx="8" cy="8" r="1"/><path d="M15,3H5C3.9,3,3.01,3.9,3.01,5L3,19c0,1.1,0.89,2,1.99,2H19c1.1,0,2-0.9,2-2V9L15,3z M19,19H5V5h9v5h5V19z"/><circle cx="8" cy="12" r="1"/><circle cx="8" cy="16" r="1"/></g></g></svg>'
17
- this.releaseDate = '2023-03-14'
18
- this.use = 'backend'
19
- this.type = 'report'
20
- this.description = 'Investment company balance sheet report translated in Finnish.'
21
-
22
- this.languages = {
23
- en: {
24
- 'report-balance-sheet-investment-detailed': 'Detailed balance sheet',
25
- 'report-balance-sheet-investment': 'Balance sheet'
26
- },
27
- fi: {
28
- 'report-balance-sheet-investment-detailed': 'Tase tilierittelyin',
29
- 'report-balance-sheet-investment': 'Tase'
30
- }
31
- }
32
- }
33
-
34
- forceOptions() {
35
- return {
36
- negateAssetAndProfit: true,
37
- addPreviousPeriod: true
38
- }
39
- }
40
-
41
- getLanguages(): Language[] {
42
- return ['fi']
43
- }
44
-
45
- getReportOptions(): ReportOptions {
46
- return {
47
- quarter1: 'radio:1',
48
- quarter2: 'radio:1',
49
- quarter3: 'radio:1',
50
- full: 'radio:1:default'
51
- }
52
- }
53
-
54
- columnTitle(id, period, options) {
55
- if (options.quarter1) {
56
- const year = dayjs(period.start_date).year()
57
- return `{${dayjs(`${year}-04-01`).subtract(1, 'day').format('YYYY-MM-DD')}}`
58
- } else if (options.quarter2) {
59
- const year = dayjs(period.start_date).year()
60
- return `{${dayjs(`${year}-07-01`).subtract(1, 'day').format('YYYY-MM-DD')}}`
61
- } else if (options.quarter3) {
62
- const year = dayjs(period.start_date).year()
63
- return `{${dayjs(`${year}-10-01`).subtract(1, 'day').format('YYYY-MM-DD')}}`
64
- } else {
65
- return `{${this.time2str(period.end_date)}}`
66
- }
67
- }
68
-
69
- preProcess(id, entries, options, settings, columns) {
70
- const columnNames = columns.map((col) => col.name)
71
-
72
- // Summarize all totals from the entries.
73
- const totals = {}
74
- columnNames.forEach((column) => (totals[column] = {}))
75
- const accountNames = {}
76
- const accountNumbers = new Set<AccountNumber>()
77
- entries.forEach((entry) => {
78
- const column = 'period' + entry.periodId
79
- totals[column][entry.number] = totals[column][entry.number] || 0
80
- totals[column][entry.number] += entry.amount
81
- accountNames[entry.number] = entry.name
82
- accountNumbers.add(entry.number)
83
- })
84
-
85
- return this.parseAndCombineReport([...accountNumbers], accountNames, columns, options.format, totals)
86
- }
87
-
88
- /**
89
- * Mark mismatching Vastaavaa and Vastattavaa with red.
90
- */
91
- postProcess(id, data) {
92
- const liabilities = data.find(line => line.name === 'Vastattavaa yhteensä')
93
- const assets = data.find(line => line.name === 'Vastaavaa yhteensä')
94
- if (liabilities && assets) {
95
- Object.values(liabilities.amounts).forEach((value, idx) => {
96
- if (Object.values(assets.amounts)[idx] !== value) {
97
- assets.error = true
98
- liabilities.error = true
99
- }
100
- })
101
- }
102
-
103
- return data
104
- }
105
- }
106
-
107
- export default FinnishBalanceSheetReportInvestment
@@ -1,118 +0,0 @@
1
- # accounts title flags
2
- 3000-3600 LIIKEVAIHTO DETAILS
3
- BREAK
4
- 3000-3600 LIIKEVAIHTO REQUIRED BOLD
5
- BREAK
6
- 3600-3630 Valmiiden ja keskeneräisten tuotteiden varastojen muutos HIDE_TOTAL BOLD
7
- 3600-3630 _Valmiiden ja keskeneräisten tuotteiden varastojen muutos DETAILS
8
- 3600-3630 Tuotteiden varastojen muutos yhteensä BOLD
9
- BREAK
10
- 3630-3650 Valmistus omaan käyttöön HIDE_TOTAL BOLD
11
- 3630-3650 _Valmistus omaan käyttöön DETAILS
12
- 3630-3650 Valmistus omaan käyttöön yhteensä BOLD
13
- BREAK
14
- 3650-4000 Liiketoiminnan muut tuotot HIDE_TOTAL BOLD
15
- 3650-4000 _Liiketoiminnan muut tuotot DETAILS
16
- 3650-4000 Liiketoiminnan muut tuotot yhteensä BOLD
17
- BREAK
18
- 4000-5000 Materiaalit ja palvelut HIDE_TOTAL BOLD
19
- 4000-4450 _Aineet, tarvikkeet ja tavarat HIDE_TOTAL BOLD
20
- 4000-4400 __Ostot tilikauden aikana HIDE_TOTAL BOLD
21
- 4000-4400 ___Ostot tilikauden aikana DETAILS
22
- 4000-4400 __Ostot tilikauden aikana yhteensä BOLD
23
- 4400-4450 __Varastojen muutos HIDE_TOTAL BOLD
24
- 4400-4450 ___Varastojen muutos DETAILS
25
- 4400-4450 __Varastojen muutos yhteensä BOLD
26
- 4000-4450 _Aineet, tarvikkeet ja tavarat yhteensä BOLD
27
- 4450-5000 _Ulkopuoliset palvelut HIDE_TOTAL BOLD
28
- 4450-5000 __Ulkopuoliset palvelut DETAILS
29
- 4450-5000 _Ulkopuoliset palvelut yhteensä BOLD
30
- 4000-5000 Materiaalit ja palvelut yhteensä BOLD
31
- BREAK
32
- 5000-6800 Henkilöstökulut HIDE_TOTAL BOLD
33
- 5000-6000 _Palkat ja palkkiot HIDE_TOTAL BOLD
34
- 5000-6000 __Palkat ja palkkiot DETAILS
35
- 5000-6000 _Palkat ja palkkiot yhteensä BOLD
36
- 6000-6800 _Henkilösivukulut HIDE_TOTAL BOLD
37
- 6000-6300 __Eläkekulut HIDE_TOTAL BOLD
38
- 6000-6300 ___Eläkekulut DETAILS
39
- 6000-6300 __Eläkekulut yhteensä BOLD
40
- 6300-6800 __Muut henkilösivukulut HIDE_TOTAL BOLD
41
- 6300-6800 ___Muut henkilösivukulut DETAILS
42
- 6300-6800 __Muut henkilösivukulut yhteensä BOLD
43
- 6000-6800 _Henkilösivukulut yhteensä BOLD
44
- 5000-6800 Henkilöstökulut yhteensä BOLD
45
- BREAK
46
- 6800-7000 Poistot ja arvonalentumiset HIDE_TOTAL BOLD
47
- 6800-6900 _Suunnitelman mukaiset poistot HIDE_TOTAL BOLD
48
- 6800-6900 __Suunnitelman mukaiset poistot DETAILS
49
- 6800-6900 _Suunnitelman mukaiset poistot yhteensä BOLD
50
- 6900-6990 _Arvonalentumiset pysyvien vastaavien hyödykkeistä HIDE_TOTAL BOLD
51
- 6900-6990 __Arvonalentumiset pysyvien vastaavien hyödykkeistä DETAILS
52
- 6900-6990 _Arvonalentumiset pysyvien vastaavien hyödykkeistä yht. BOLD
53
- 6990-7000 _Vaihtuvien vastaavien poikkeukselliset arvonalentumiset HIDE_TOTAL BOLD
54
- 6990-7000 __Vaihtuvien vastaavien poikkeukselliset arvonalentumiset DETAILS
55
- 6990-7000 _Vaihtuvien vastaavien poik. arvonalentumiset yht. BOLD
56
- 6800-7000 Poistot ja arvonalentumiset yhteensä BOLD
57
- BREAK
58
- 7000-8990 Liiketoiminnan muut kulut HIDE_TOTAL BOLD
59
- 7000-8990 _Liiketoiminnan muut kulut DETAILS
60
- 7000-8990 Liiketoiminnan muut kulut yhteensä BOLD
61
- BREAK
62
- 3000-9000 LIIKEVOITTO (-TAPPIO) REQUIRED BOLD
63
- BREAK
64
- 9000-9700 Rahoitustuotot ja -kulut HIDE_TOTAL BOLD
65
- 9000-9040 _Tuotot osuuksista saman konsernin yrityksissä HIDE_TOTAL BOLD
66
- 9000-9040 __Tuotot osuuksista saman konsernin yrityksissä DETAILS
67
- 9000-9040 _Tuotot osuuksista saman konsernin yrityksissä yht. BOLD
68
- 9040-9070 _Tuotot osuuksista omistusyhteysyrityksissä HIDE_TOTAL BOLD
69
- 9040-9070 __Tuotot osuuksista omistusyhteysyrityksissä DETAILS
70
- 9040-9070 _Tuotot osuuksista omistusyhteysyrityksissä yhteensä BOLD
71
- 9080-9150 _Tuotot muista pysyvien vastaavien sijoituksista HIDE_TOTAL BOLD
72
- 9080-9150 __Tuotot muista pysyvien vastaavien sijoituksista DETAILS
73
- 9080-9150 _Tuotot muista pysyvien vastaavien sijoituksista yht. BOLD
74
- 9150-9300 _Muut korko- ja rahoitustuotot HIDE_TOTAL BOLD
75
- 9150-9300 __Muut korko- ja rahoitustuotot DETAILS
76
- 9150-9300 _Muut korko- ja rahoitustuotot yhteensä BOLD
77
- 9300-9370 _Arvonalentumiset pysyvien vastaavien sijoituksista HIDE_TOTAL BOLD
78
- 9300-9370 __Arvonalentumiset pysyvien vastaavien sijoituksista DETAILS
79
- 9300-9370 _Arvonalentumiset pys. vastaavien sijoituksista yht. BOLD
80
- 9370-9420 _Arvonalentumiset vaihtuvien vastaavien rahoitusarvopapereista HIDE_TOTAL BOLD
81
- 9370-9420 __Arvonalentumiset vaihtuvien vastaavien rahoitusarvopapereista DETAILS
82
- 9370-9420 _Arvonalentumiset vaiht. vast. rahoitusarvopap. yht. BOLD
83
- 9420-9700 _Korkokulut ja muut rahoituskulut HIDE_TOTAL BOLD
84
- 9420-9700 __Korkokulut ja muut rahoituskulut DETAILS
85
- 9420-9700 _Korkokulut ja muut rahoituskulut yhteensä BOLD
86
- 9000-9700 Rahoitustuotot ja -kulut yhteensä BOLD
87
- BREAK
88
- 3000-9700 VOITTO (TAPPIO) ENNEN SATUNNAISIA ERIÄ REQUIRED BOLD
89
- BREAK
90
- 9700-9800 Satunnaiset erät HIDE_TOTAL BOLD
91
- 9700-9740 _Satunnaiset tuotot HIDE_TOTAL BOLD
92
- 9700-9740 __Satunnaiset tuotot DETAILS
93
- 9700-9740 _Satunnaiset tuotot yhteensä BOLD
94
- 9740-9780 _Satunnaiset kulut HIDE_TOTAL BOLD
95
- 9740-9780 __Satunnaiset kulut DETAILS
96
- 9740-9780 _Satunnaiset kulut yhteensä BOLD
97
- 9700-9800 Satunnaiset erät yhteensä BOLD
98
- BREAK
99
- 3000-9800 VOITTO (TAPPIO) ENNEN TILINPÄÄTÖSSIIRTOJA JA VEROJA REQUIRED BOLD
100
- BREAK
101
- 9800-9900 Tilinpäätössiirrot HIDE_TOTAL BOLD
102
- 9800-9840 _Poistoeron muutos HIDE_TOTAL BOLD
103
- 9800-9840 __Poistoeron muutos DETAILS
104
- 9800-9840 _Poistoeron muutos yhteensä BOLD
105
- 9840-9900 _Vapaaehtoisten varausten muutos HIDE_TOTAL BOLD
106
- 9840-9900 __Vapaaehtoisten varausten muutos DETAILS
107
- 9840-9900 _Vapaaehtoisten varausten muutos yhteensä BOLD
108
- 9800-9900 Tilinpäätössiirrot BOLD
109
- BREAK
110
- 9900-9980 Tuloverot HIDE_TOTAL BOLD
111
- 9900-9980 _Tuloverot DETAILS
112
- 9900-9980 Tuloverot yhteensä BOLD
113
- BREAK
114
- 9980-9990 Muut välittömät verot HIDE_TOTAL BOLD
115
- 9980-9990 _Muut välittömät verot DETAILS
116
- 9980-9990 Muut välittömät verot yhteensä BOLD
117
- BREAK
118
- 3000-9999 TILIKAUDEN VOITTO (TAPPIO) REQUIRED BOLD
@@ -1,45 +0,0 @@
1
- # accounts title flags
2
- 3000-3600 LIIKEVAIHTO REQUIRED BOLD
3
- 3600-3630 Valmiiden ja keskeneräisten tuotteiden varastojen muutos
4
- 3630-3650 Valmistus omaan käyttöön
5
- 3650-4000 Liiketoiminnan muut tuotot
6
- 4000-5000 Materiaalit ja palvelut HIDE_TOTAL
7
- 4000-4450 _Aineet, tarvikkeet ja tavarat HIDE_TOTAL
8
- 4000-4400 __Ostot tilikauden aikana
9
- 4400-4450 __Varastojen muutos
10
- 4450-5000 _Ulkopuoliset palvelut
11
- 4000-5000 Materiaalit ja palvelut yhteensä
12
- 5000-6800 Henkilöstökulut HIDE_TOTAL
13
- 5000-6000 _Palkat ja palkkiot
14
- 6000-6800 _Henkilösivukulut HIDE_TOTAL
15
- 6000-6300 __Eläkekulut
16
- 6300-6800 __Muut henkilösivukulut
17
- 5000-6800 Henkilöstökulut yhteensä
18
- 6800-7000 Poistot ja arvonalentumiset HIDE_TOTAL
19
- 6800-6900 _Suunnitelman mukaiset poistot
20
- 6900-6990 _Arvonalentumiset pysyvien vastaavien hyödykkeistä
21
- 6990-7000 _Vaihtuvien vastaavien poikkeukselliset arvonalentumiset
22
- 6800-7000 Poistot ja arvonalentumiset yhteensä
23
- 7000-8990 Liiketoiminnan muut kulut
24
- 3000-9000 LIIKEVOITTO (-TAPPIO) REQUIRED BOLD
25
- 9000-9700 Rahoitustuotot ja -kulut HIDE_TOTAL
26
- 9000-9040 _Tuotot osuuksista saman konsernin yrityksissä
27
- 9040-9070 _Tuotot osuuksista omistusyhteysyrityksissä
28
- 9080-9150 _Tuotot muista pysyvien vastaavien sijoituksista
29
- 9150-9300 _Muut korko- ja rahoitustuotot
30
- 9300-9370 _Arvonalentumiset pysyvien vastaavien sijoituksista
31
- 9370-9420 _Arvonalentumiset vaihtuvien vastaavien rahoitusarvopapereista
32
- 9420-9700 _Korkokulut ja muut rahoituskulut
33
- 9000-9700 Rahoitustuotot ja -kulut yhteensä
34
- 3000-9700 VOITTO (TAPPIO) ENNEN SATUNNAISIA ERIÄ REQUIRED BOLD
35
- 9700-9800 Satunnaiset erät HIDE_TOTAL
36
- 9700-9740 _Satunnaiset tuotot
37
- 9740-9780 _Satunnaiset kulut
38
- 9700-9800 Satunnaiset erät yhteensä
39
- 3000-9800 VOITTO (TAPPIO) ENNEN TILINPÄÄTÖSSIIRTOJA JA VEROJA REQUIRED BOLD
40
- 9800-9900 Tilinpäätössiirrot
41
- 9800-9840 _Poistoeron muutos
42
- 9840-9900 _Vapaaehtoisten varausten muutos
43
- 9900-9980 Tuloverot
44
- 9980-9990 Muut välittömät verot
45
- 3000-9999 TILIKAUDEN VOITTO (TAPPIO) REQUIRED BOLD
@@ -1,96 +0,0 @@
1
- # accounts title flags
2
- 5000-5110 LIIKEVAIHTO DETAILS
3
- BREAK
4
- 5000-5110 LIIKEVAIHTO REQUIRED BOLD
5
- BREAK
6
- 5110-5300 Liiketoiminnan muut tuotot HIDE_TOTAL BOLD
7
- 5110-5300 _Liiketoiminnan muut tuotot DETAILS
8
- 5110-5300 Liiketoiminnan muut tuotot yhteensä BOLD
9
- BREAK
10
- 5300-5400 Materiaalit ja palvelut HIDE_TOTAL BOLD
11
- 5300-5360 _Aineet, tarvikkeet ja tavarat HIDE_TOTAL BOLD
12
- 5300-5360 __Ostot tilikauden aikana HIDE_TOTAL BOLD
13
- 5300-5360 ___Ostot tilikauden aikana DETAILS
14
- 5300-5360 __Ostot tilikauden aikana yhteensä BOLD
15
- 5360-5360 __Varastojen muutos HIDE_TOTAL BOLD
16
- 5360-5360 ___Varastojen muutos DETAILS
17
- 5360-5360 __Varastojen muutos yhteensä BOLD
18
- 5300-5360 _Aineet, tarvikkeet ja tavarat yhteensä BOLD
19
- 5360-5400 _Ulkopuoliset palvelut HIDE_TOTAL BOLD
20
- 5360-5400 __Ulkopuoliset palvelut DETAILS
21
- 5360-5400 _Ulkopuoliset palvelut yhteensä BOLD
22
- 5300-5400 Materiaalit ja palvelut yhteensä BOLD
23
- BREAK
24
- 5400-6800 Henkilöstökulut HIDE_TOTAL BOLD
25
- 5400-6000 _Palkat ja palkkiot HIDE_TOTAL BOLD
26
- 5400-6000 __Palkat ja palkkiot DETAILS
27
- 5400-6000 _Palkat ja palkkiot yhteensä BOLD
28
- 6000-6800 _Henkilösivukulut HIDE_TOTAL BOLD
29
- 6000-6300 __Eläkekulut HIDE_TOTAL BOLD
30
- 6000-6300 ___Eläkekulut DETAILS
31
- 6000-6300 __Eläkekulut yhteensä BOLD
32
- 6300-6800 __Muut henkilösivukulut HIDE_TOTAL BOLD
33
- 6300-6800 ___Muut henkilösivukulut DETAILS
34
- 6300-6800 __Muut henkilösivukulut yhteensä BOLD
35
- 6000-6800 _Henkilösivukulut yhteensä BOLD
36
- 5400-6800 Henkilöstökulut yhteensä BOLD
37
- BREAK
38
- 6800-7000 Poistot ja arvonalentumiset HIDE_TOTAL BOLD
39
- 6800-6900 _Suunnitelman mukaiset poistot HIDE_TOTAL BOLD
40
- 6800-6900 __Suunnitelman mukaiset poistot DETAILS
41
- 6800-6900 _Suunnitelman mukaiset poistot yhteensä BOLD
42
- 6900-6990 _Arvonalentumiset pysyvien vastaavien hyödykkeistä HIDE_TOTAL BOLD
43
- 6900-6990 __Arvonalentumiset pysyvien vastaavien hyödykkeistä DETAILS
44
- 6900-6990 _Arvonalentumiset pysyvien vastaavien hyödykkeistä yht. BOLD
45
- 6990-7000 _Vaihtuvien vastaavien poikkeukselliset arvonalentumiset HIDE_TOTAL BOLD
46
- 6990-7000 __Vaihtuvien vastaavien poikkeukselliset arvonalentumiset DETAILS
47
- 6990-7000 _Vaihtuvien vastaavien poik. arvonalentumiset yht. BOLD
48
- 6800-7000 Poistot ja arvonalentumiset yhteensä BOLD
49
- BREAK
50
- 7000-8990 Liiketoiminnan muut kulut HIDE_TOTAL BOLD
51
- 7000-8990 _Liiketoiminnan muut kulut DETAILS
52
- 7000-8990 Liiketoiminnan muut kulut yhteensä BOLD
53
- BREAK
54
- 5000-9000 LIIKEVOITTO (-TAPPIO) REQUIRED BOLD
55
- 9000-9700 Rahoitustuotot ja -kulut HIDE_TOTAL BOLD
56
- 9150-9300 _Muut korko- ja rahoitustuotot HIDE_TOTAL BOLD
57
- 9150-9300 __Muut korko- ja rahoitustuotot DETAILS
58
- 9150-9300 _Muut korko- ja rahoitustuotot yhteensä BOLD
59
- 9300-9370 _Arvonalentumiset pysyvien vastaavien sijoituksista HIDE_TOTAL BOLD
60
- 9300-9370 __Arvonalentumiset pysyvien vastaavien sijoituksista DETAILS
61
- 9300-9370 _Arvonalentumiset pys. vastaavien sijoituksista yht. BOLD
62
- 9370-9420 _Arvonalentumiset vaihtuvien vastaavien rahoitusarvopapereista HIDE_TOTAL BOLD
63
- 9370-9420 __Arvonalentumiset vaihtuvien vastaavien rahoitusarvopapereista DETAILS
64
- 9370-9420 _Arvonalentumiset vaiht. vast. rahoitusarvopap. yht. BOLD
65
- 9420-9700 _Korkokulut ja muut rahoituskulut HIDE_TOTAL BOLD
66
- 9420-9700 __Korkokulut ja muut rahoituskulut DETAILS
67
- 9420-9700 _Korkokulut ja muut rahoituskulut yhteensä BOLD
68
- 9000-9700 Rahoitustuotot ja -kulut yhteensä BOLD
69
- BREAK
70
- 5000-9700 VOITTO (TAPPIO) ENNEN SATUNNAISIA ERIÄ REQUIRED BOLD
71
- 9700-9800 Satunnaiset erät HIDE_TOTAL BOLD
72
- 9700-9740 _Satunnaiset tuotot HIDE_TOTAL BOLD
73
- 9700-9740 __Satunnaiset tuotot DETAILS
74
- 9700-9740 _Satunnaiset tuotot yhteensä BOLD
75
- 9740-9780 _Satunnaiset kulut HIDE_TOTAL BOLD
76
- 9740-9780 __Satunnaiset kulut DETAILS
77
- 9740-9780 _Satunnaiset kulut yhteensä BOLD
78
- 9700-9800 Satunnaiset erät yhteensä BOLD
79
- BREAK
80
- 5000-9800 VOITTO (TAPPIO) ENNEN TILINPÄÄTÖSSIIRTOJA JA VEROJA REQUIRED BOLD
81
- 9800-9900 Tilinpäätössiirrot HIDE_TOTAL BOLD
82
- 9800-9840 _Poistoeron muutos HIDE_TOTAL BOLD
83
- 9800-9840 __Poistoeron muutos DETAILS
84
- 9800-9840 _Poistoeron muutos yhteensä BOLD
85
- 9840-9900 _Vapaaehtoisten varausten muutos HIDE_TOTAL BOLD
86
- 9840-9900 __Vapaaehtoisten varausten muutos DETAILS
87
- 9840-9900 _Vapaaehtoisten varausten muutos yhteensä BOLD
88
- 9800-9900 Tilinpäätössiirrot BOLD
89
- 9900-9980 Tuloverot HIDE_TOTAL BOLD
90
- 9900-9980 _Tuloverot DETAILS
91
- 9900-9980 Tuloverot yhteensä BOLD
92
- 9980-9990 Muut välittömät verot HIDE_TOTAL BOLD
93
- 9980-9990 _Muut välittömät verot DETAILS
94
- 9980-9990 Muut välittömät verot yhteensä BOLD
95
- BREAK
96
- 5000-9999 TILIKAUDEN VOITTO (TAPPIO) REQUIRED BOLD
@@ -1,39 +0,0 @@
1
- # accounts title flags
2
- 5000-5110 LIIKEVAIHTO REQUIRED BOLD
3
- 5110-5300 Liiketoiminnan muut tuotot
4
- 5300-5400 Materiaalit ja palvelut HIDE_TOTAL
5
- 5300-5360 _Aineet, tarvikkeet ja tavarat HIDE_TOTAL
6
- 5300-5360 __Ostot tilikauden aikana
7
- 5360-5400 _Ulkopuoliset palvelut
8
- 5300-5400 Materiaalit ja palvelut yhteensä
9
- 5400-6800 Henkilöstökulut HIDE_TOTAL
10
- 5400-6000 _Palkat ja palkkiot
11
- 6000-6800 _Henkilösivukulut HIDE_TOTAL
12
- 6000-6300 __Eläkekulut
13
- 6300-6800 __Muut henkilösivukulut
14
- 5400-6800 Henkilöstökulut yhteensä
15
- 6800-7000 Poistot ja arvonalentumiset HIDE_TOTAL
16
- 6800-6900 _Suunnitelman mukaiset poistot
17
- 6900-6990 _Arvonalentumiset pysyvien vastaavien hyödykkeistä
18
- 6990-7000 _Vaihtuvien vastaavien poikkeukselliset arvonalentumiset
19
- 6800-7000 Poistot ja arvonalentumiset yhteensä
20
- 7000-8990 Liiketoiminnan muut kulut
21
- 5000-9000 LIIKEVOITTO (-TAPPIO) REQUIRED BOLD
22
- 9000-9700 Rahoitustuotot ja -kulut HIDE_TOTAL
23
- 9150-9300 _Muut korko- ja rahoitustuotot
24
- 9300-9370 _Arvonalentumiset pysyvien vastaavien sijoituksista
25
- 9370-9420 _Arvonalentumiset vaihtuvien vastaavien rahoitusarvopapereista
26
- 9420-9700 _Korkokulut ja muut rahoituskulut
27
- 9000-9700 Rahoitustuotot ja -kulut yhteensä
28
- 5000-9700 VOITTO (TAPPIO) ENNEN SATUNNAISIA ERIÄ REQUIRED BOLD
29
- 9700-9800 Satunnaiset erät HIDE_TOTAL
30
- 9700-9740 _Satunnaiset tuotot
31
- 9740-9780 _Satunnaiset kulut
32
- 9700-9800 Satunnaiset erät yhteensä
33
- 5000-9800 VOITTO (TAPPIO) ENNEN TILINPÄÄTÖSSIIRTOJA JA VEROJA REQUIRED BOLD
34
- 9800-9900 Tilinpäätössiirrot
35
- 9800-9840 _Poistoeron muutos
36
- 9840-9900 _Vapaaehtoisten varausten muutos
37
- 9900-9980 Tuloverot
38
- 9980-9990 Muut välittömät verot
39
- 5000-9999 TILIKAUDEN VOITTO (TAPPIO) REQUIRED BOLD
@@ -1,212 +0,0 @@
1
- import { AccountNumber, Language, PluginCode, ReportID, ReportOptions, Version } from '@tasenor/common'
2
- import { ReportPlugin } from '@tasenor/common-node'
3
- import dayjs from 'dayjs'
4
- import quarterOfYear from 'dayjs/plugin/quarterOfYear'
5
- dayjs.extend(quarterOfYear)
6
-
7
- class FinnishIncomeStatementReportInvestment extends ReportPlugin {
8
-
9
- constructor() {
10
- super('income-statement-investment-detailed' as ReportID, 'income-statement-investment' as ReportID)
11
-
12
- this.schemes = new Set(['FinnishInvestmentCompany'])
13
-
14
- this.code = 'FinnishIncomeStatementReportInvestment' as PluginCode
15
- this.title = 'Income Statement Report (Finnish - Investment)'
16
- this.version = '1.0.1' as Version
17
- this.icon = '<svg xmlns="http://www.w3.org/2000/svg" enable-background="new 0 0 24 24" height="24px" viewBox="0 0 24 24" width="24px" fill="#000000"><g><path d="M0,0h24v24H0V0z" fill="none"/></g><g><g><path d="M14,5H5v14h14v-9h-5V5z M8,17c-0.55,0-1-0.45-1-1s0.45-1,1-1s1,0.45,1,1S8.55,17,8,17z M8,13 c-0.55,0-1-0.45-1-1s0.45-1,1-1s1,0.45,1,1S8.55,13,8,13z M8,9C7.45,9,7,8.55,7,8s0.45-1,1-1s1,0.45,1,1S8.55,9,8,9z" opacity=".3"/><circle cx="8" cy="8" r="1"/><path d="M15,3H5C3.9,3,3.01,3.9,3.01,5L3,19c0,1.1,0.89,2,1.99,2H19c1.1,0,2-0.9,2-2V9L15,3z M19,19H5V5h9v5h5V19z"/><circle cx="8" cy="12" r="1"/><circle cx="8" cy="16" r="1"/></g></g></svg>'
18
- this.releaseDate = '2023-03-14'
19
- this.use = 'backend'
20
- this.type = 'report'
21
- this.description = 'Investment company income statement report translated in Finnish.'
22
-
23
- this.languages = {
24
- en: {
25
- 'report-income-statement-investment-detailed': 'Detailed income statement',
26
- 'report-income-statement-investment': 'Income statement'
27
- },
28
- fi: {
29
- 'report-income-statement-investment-detailed': 'Tuloslaskelma tilierittelyin',
30
- 'report-income-statement-investment': 'Tuloslaskelma'
31
- }
32
- }
33
- }
34
-
35
- forceOptions(options) {
36
- return {
37
- negateAssetAndProfit: true,
38
- addPreviousPeriod: !options.byTags
39
- }
40
- }
41
-
42
- getLanguages(): Language[] {
43
- return ['fi']
44
- }
45
-
46
- getReportOptions(): ReportOptions {
47
- return {
48
- quarter1: 'radio:1',
49
- quarter2: 'radio:1',
50
- quarter3: 'radio:1',
51
- full: 'radio:1:default',
52
- byTags: 'boolean'
53
- }
54
- }
55
-
56
- /**
57
- * Construct column title for period.
58
- * @param formatName
59
- * @param period
60
- * @param settings
61
- */
62
- columnTitle(id, period, options) {
63
- const start = this.time2str(period.start_date)
64
- let end
65
- if (options.quarter1) {
66
- const year = dayjs(period.start_date).year()
67
- end = dayjs(`${year}-04-01`).subtract(1, 'day').format('YYYY-MM-DD')
68
- } else if (options.quarter2) {
69
- const year = dayjs(period.start_date).year()
70
- end = dayjs(`${year}-07-01`).subtract(1, 'day').format('YYYY-MM-DD')
71
- } else if (options.quarter3) {
72
- const year = dayjs(period.start_date).year()
73
- end = dayjs(`${year}-10-01`).subtract(1, 'day').format('YYYY-MM-DD')
74
- } else {
75
- end = this.time2str(period.end_date)
76
- }
77
-
78
- return '{' + start + '} - {' + end + '}'
79
- }
80
-
81
- async getColumns(id, entries, options, settings) {
82
- // Construct columns for each tag and extra column for non-tagged.
83
- if (options.byTags) {
84
- const columns = settings.tags.map((tag) => ({
85
- type: 'numeric',
86
- name: `tag-${tag.tag}`,
87
- title: tag.name
88
- }))
89
- columns.push({
90
- type: 'numeric',
91
- name: 'other',
92
- title: '{Other}'
93
- })
94
- columns.unshift({
95
- name: 'title',
96
- title: '',
97
- type: 'name'
98
- })
99
- return columns
100
- }
101
-
102
- return super.getColumns(id, entries, options, settings)
103
- }
104
-
105
- preProcessByTags(id, entries, options, settings, columns) {
106
- // Prepapre.
107
- const columnNames = columns.map((col) => col.name)
108
- const tagSet = new Set(settings.tags.map(t => t.tag))
109
-
110
- // Summarize all totals from the entries.
111
- const totals: Record<string, Record<string, number>> = {}
112
- columnNames.forEach((column) => (totals[column] = {}))
113
- const accountNames = {}
114
- const accountNumbers = new Set<AccountNumber>()
115
- const regex = /^((\[\w+\])+)/
116
- entries.forEach((entry) => {
117
- let shares: string[] = []
118
- const r = regex.exec(entry.description)
119
- if (r) {
120
- shares = r[1].substr(1, r[1].length - 2).split('][').filter(t => tagSet.has(t))
121
- }
122
- let amount = entry.amount
123
- if (shares.length) {
124
- // Share the amount so that rounding errors are split.
125
- const piece = amount < 0 ? Math.ceil(amount / shares.length) : Math.floor(amount / shares.length)
126
- shares.forEach((tag) => {
127
- const column = `tag-${tag}`
128
- totals[column][entry.number] = totals[column][entry.number] || 0
129
- totals[column][entry.number] += piece
130
- amount -= piece
131
- })
132
- if (amount) {
133
- // Make semi-random starting point and distribute cents.
134
- let i = (entry.periodId) % shares.length
135
- const delta = amount < 0 ? -1 : 1
136
- for (let count = Math.abs(amount); count > 0; count--) {
137
- const column = `tag-${shares[i]}`
138
- totals[column][entry.number] += delta
139
- amount -= delta
140
- i = (i + 1) % shares.length
141
- }
142
- }
143
- }
144
-
145
- if (amount) {
146
- totals.other[entry.number] = totals.other[entry.number] || 0
147
- totals.other[entry.number] += amount
148
- }
149
-
150
- accountNames[entry.number] = entry.name
151
- accountNumbers.add(entry.number)
152
- })
153
-
154
- return this.parseAndCombineReport([...accountNumbers], accountNames, columns, options.format, totals)
155
- }
156
-
157
- preProcess(id, entries, options, settings, columns) {
158
- if (options.byTags) {
159
- return this.preProcessByTags(id, entries, options, settings, columns)
160
- }
161
-
162
- const columnNames = columns.map((col) => col.name)
163
-
164
- // Summarize all totals from the entries.
165
- const totals = {}
166
- columnNames.forEach((column) => (totals[column] = {}))
167
- const accountNames = {}
168
- const accountNumbers = new Set<AccountNumber>()
169
- entries.forEach((entry) => {
170
- const column = 'period' + entry.periodId
171
- totals[column][entry.number] = totals[column][entry.number] || 0
172
- totals[column][entry.number] += entry.amount
173
- accountNames[entry.number] = entry.name
174
- accountNumbers.add(entry.number)
175
- })
176
-
177
- return this.parseAndCombineReport([...accountNumbers], accountNames, columns, options.format, totals)
178
- }
179
-
180
- /**
181
- * Remove empty columns if report made by tags.
182
- */
183
- postProcess(id, data, options, settings, columns) {
184
- if (!options.byTags) {
185
- return data
186
- }
187
-
188
- // Find empty columns.
189
- const found = new Set()
190
- for (const line of data) {
191
- if (!line.amounts) {
192
- continue
193
- }
194
- for (const [k, v] of Object.entries(line.amounts)) {
195
- if (v !== null && !isNaN(v as number)) {
196
- found.add(k)
197
- }
198
- }
199
- }
200
-
201
- // Remove empty columns.
202
- for (let i = 0; i < columns.length; i++) {
203
- if (columns[i].type === 'numeric' && !found.has(columns[i].name)) {
204
- columns.splice(i, 1)
205
- i--
206
- }
207
- }
208
- return data
209
- }
210
- }
211
-
212
- export default FinnishIncomeStatementReportInvestment