@tasenor/common-plugins 1.17.12 → 1.17.14
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.
- package/.turbo/turbo-release.log +2 -7
- package/data/EstonianBalanceSheetReport.mjs +3 -3
- package/data/EstonianIncomeStatementReport.mjs +10 -0
- package/data/src/EstonianBalanceSheetReport - balance-sheet-detailed-fi.tsv +40 -0
- package/data/src/EstonianIncomeStatementReport - income-statement-detailed-fi.tsv +42 -0
- package/data/src/EstonianIncomeStatementReport - income-statement-fi.tsv +13 -0
- package/package.json +6 -6
- package/src/EstonianBalanceSheetReport/backend/balance-sheet-detailed-fi.tsv +40 -0
- package/src/EstonianBalanceSheetReport/backend/balance-sheet-fi.tsv +25 -0
- package/src/EstonianIncomeStatementReport/backend/income-statement-detailed-fi.tsv +42 -0
- package/src/EstonianIncomeStatementReport/backend/income-statement-fi.tsv +13 -0
- package/src/EstonianIncomeStatementReport/backend/index.ts +235 -0
- package/src/FinnishBalanceSheetReport/backend/balance-sheet-fi.tsv +91 -23
package/.turbo/turbo-release.log
CHANGED
|
@@ -1,13 +1,8 @@
|
|
|
1
1
|
|
|
2
2
|
|
|
3
|
-
> @tasenor/common-plugins@1.17.
|
|
3
|
+
> @tasenor/common-plugins@1.17.13 release /home/wigy/project/tasenor-qa/tasenor-bookkeeper/packages/tasenor-common-plugins
|
|
4
4
|
> pnpm version patch && pnpm publish --force --access public --no-git-checks
|
|
5
5
|
|
|
6
6
|
[1mnpm[22m [33mwarn[39m [94mUnknown env config "auto-install-peers". This will stop working in the next major version of npm.[39m
|
|
7
|
-
v1.17.
|
|
7
|
+
v1.17.14
|
|
8
8
|
[43m[30m WARN [39m[49m using --force I sure hope you know what you are doing
|
|
9
|
-
[1mnpm[22m [33mwarn[39m [94mUnknown cli config "--git-checks". This will stop working in the next major version of npm.[39m
|
|
10
|
-
[1mnpm[22m [33mwarn[39m [94mUnknown env config "auto-install-peers". This will stop working in the next major version of npm.[39m
|
|
11
|
-
[1mnpm[22m [33mwarn[39m [94mUnknown project config "auto-install-peers". This will stop working in the next major version of npm.[39m
|
|
12
|
-
[1mnpm[22m [33mwarn[39m [94musing --force[39m Recommended protections disabled.
|
|
13
|
-
⠙[1G[0K⠹[1G[0K⠸[1G[0K⠼[1G[0K⠴[1G[0K⠦[1G[0K⠧[41m[30m ELIFECYCLE [39m[49m [31mCommand failed.[39m
|
|
@@ -3,7 +3,7 @@ import commonNode from '@tasenor/common-node'
|
|
|
3
3
|
const { readFile, saveText, trimCRLF } = commonNode.dataUtils
|
|
4
4
|
|
|
5
5
|
let tsv = trimCRLF(readFile('EstonianBalanceSheetReport - balance-sheet-fi.tsv'))
|
|
6
|
-
saveText('
|
|
6
|
+
saveText('EstonianBalanceSheetReport', 'balance-sheet-fi.tsv', tsv)
|
|
7
7
|
|
|
8
|
-
tsv = trimCRLF(readFile('
|
|
9
|
-
saveText('
|
|
8
|
+
tsv = trimCRLF(readFile('EstonianBalanceSheetReport - balance-sheet-detailed-fi.tsv'))
|
|
9
|
+
saveText('EstonianBalanceSheetReport', 'balance-sheet-detailed-fi.tsv', tsv)
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
#!/usr/bin/env -S npx tsx
|
|
2
|
+
import commonNode from '@tasenor/common-node'
|
|
3
|
+
const { readFile, saveText, trimCRLF } = commonNode.dataUtils
|
|
4
|
+
|
|
5
|
+
let tsv
|
|
6
|
+
tsv = trimCRLF(readFile('EstonianIncomeStatementReport - income-statement-fi.tsv'))
|
|
7
|
+
saveText('EstonianIncomeStatementReport', 'income-statement-fi.tsv', tsv)
|
|
8
|
+
|
|
9
|
+
tsv = trimCRLF(readFile('EstonianIncomeStatementReport - income-statement-detailed-fi.tsv'))
|
|
10
|
+
saveText('EstonianIncomeStatementReport', 'income-statement-detailed-fi.tsv', tsv)
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# accounts title flags
|
|
2
|
+
1000-2999 VASTAAVAA HIDE_TOTAL REQUIRED BOLD
|
|
3
|
+
1000-1299 _PYSYVÄT VASTAAVAT
|
|
4
|
+
1000-1099 __Aineettomat hyödykkeet HIDE_TOTAL BOLD
|
|
5
|
+
1000-1099 ___Aineettomat hyödykkeet DETAILS
|
|
6
|
+
1000-1099 __Aineettomat hyödykkeet yhteensä BOLD
|
|
7
|
+
1100-1199 __Aineelliset hyödykkeet HIDE_TOTAL BOLD
|
|
8
|
+
1100-1199 ___Aineelliset hyödykkeet DETAILS
|
|
9
|
+
1100-1199 __Aineelliset hyödykkeet yhteensä BOLD
|
|
10
|
+
1200-1299 __Kertyneet poistot HIDE_TOTAL BOLD
|
|
11
|
+
1200-1299 ___Kertyneet poistot DETAILS
|
|
12
|
+
1200-1299 __Kertyneet poistot yhteensä BOLD
|
|
13
|
+
2000-2999 _VAIHTUVAT VASTAAVAT HIDE_TOTAL REQUIRED BOLD
|
|
14
|
+
2000-2099 __Saamiset HIDE_TOTAL
|
|
15
|
+
2010-2019 ___Myyntisaamiset HIDE_TOTAL BOLD
|
|
16
|
+
2010-2019 ____Myyntisaamiset DETAILS
|
|
17
|
+
2010-2019 ___Myyntisaamiset yhteensä BOLD
|
|
18
|
+
2020-2029 ___Siirtosaamiset HIDE_TOTAL BOLD
|
|
19
|
+
2020-2029 ____Siirtosaamiset DETAILS
|
|
20
|
+
2020-2029 ___Siirtosaamiset yhteensä BOLD
|
|
21
|
+
2000-2099 __Saamiset yhteensä BOLD
|
|
22
|
+
2100-2199 __Rahat ja pankkisaamiset HIDE_TOTAL BOLD
|
|
23
|
+
2100-2199 ___Rahat ja pankkisaamiset DETAILS
|
|
24
|
+
2100-2199 __Rahat ja pankkisaamiset yhteensä BOLD
|
|
25
|
+
2000-2999 _Vaihtuvat vastaavat yhteensä BOLD
|
|
26
|
+
1000-2999 Vastaavaa yhteensä REQUIRED BOLD
|
|
27
|
+
NEW_PAGE
|
|
28
|
+
VASTATTAVAA HIDE_TOTAL REQUIRED BOLD
|
|
29
|
+
3000-3199 5000-9999 _OMA PÄÄOMA HIDE_TOTAL REQUIRED BOLD
|
|
30
|
+
3000-3099 __Osakepääoma HIDE_TOTAL BOLD
|
|
31
|
+
3000-3099 __Osakepääoma DETAILS
|
|
32
|
+
3100-3199 __Edellisten tilikausien voitto (tappio)
|
|
33
|
+
5000-9999 __Tilikauden voitto (tappio)
|
|
34
|
+
3000-3199 5000-9999 _Oma pääoma yhteensä BOLD
|
|
35
|
+
4000-4999 _VIERAS PÄÄOMA HIDE_TOTAL REQUIRED BOLD
|
|
36
|
+
4000-4999 __Velat HIDE_TOTAL BOLD
|
|
37
|
+
4000-4999 ___Velat DETAILS
|
|
38
|
+
4000-4999 __Velat yhteensä BOLD
|
|
39
|
+
4000-4999 _Vieras pääoma yhteensä BOLD
|
|
40
|
+
3000-3199 4000-4999 5000-9999 Vastattavaa yhteensä REQUIRED BOLD
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
# accounts title flags
|
|
2
|
+
5000-5999 LIIKEVAIHTO DETAILS
|
|
3
|
+
BREAK
|
|
4
|
+
5000-5999 LIIKEVAIHTO REQUIRED BOLD
|
|
5
|
+
6000-6999 Liiketoiminnan muut tuotot HIDE_TOTAL BOLD
|
|
6
|
+
6000-6999 _Liiketoiminnan muut tuotot DETAILS
|
|
7
|
+
6000-6999 Liiketoiminnan muut tuotot yhteensä BOLD
|
|
8
|
+
BREAK
|
|
9
|
+
7000-7099 Ostot ja alihankinta HIDE_TOTAL BOLD
|
|
10
|
+
7000-7099 _Ostot ja alihankinta DETAILS
|
|
11
|
+
7000-7099 Ostot ja alihankinta yhteensä BOLD
|
|
12
|
+
BREAK
|
|
13
|
+
7100-7199 Henkilöstökulut HIDE_TOTAL BOLD
|
|
14
|
+
7100-7199 _Henkilöstökulut DETAILS
|
|
15
|
+
7100-7199 Henkilöstökulut yhteensä BOLD
|
|
16
|
+
BREAK
|
|
17
|
+
7200-7299 Hallintokulut HIDE_TOTAL BOLD
|
|
18
|
+
7200-7299 _Hallintokulut DETAILS
|
|
19
|
+
7200-7299 Hallintokulut yhteensä BOLD
|
|
20
|
+
BREAK
|
|
21
|
+
7300-7399 Markkinointi ja myynti HIDE_TOTAL BOLD
|
|
22
|
+
7300-7399 _Markkinointi ja myynti DETAILS
|
|
23
|
+
7300-7399 Markkinointi ja myynti yhteensä BOLD
|
|
24
|
+
BREAK
|
|
25
|
+
7400-7499 Matkakulut HIDE_TOTAL BOLD
|
|
26
|
+
7400-7499 _Matkakulut DETAILS
|
|
27
|
+
7400-7499 Matkakulut yhteensä BOLD
|
|
28
|
+
BREAK
|
|
29
|
+
7500-7599 Poistot ja arvonalentumiset HIDE_TOTAL BOLD
|
|
30
|
+
7500-7599 _Poistot ja arvonalentumiset DETAILS
|
|
31
|
+
7500-7599 Poistot ja arvonalentumiset yhteensä BOLD
|
|
32
|
+
BREAK
|
|
33
|
+
7600-7699 Liiketoiminnan muut kulut HIDE_TOTAL BOLD
|
|
34
|
+
7600-7699 _Liiketoiminnan muut kulut DETAILS
|
|
35
|
+
7600-7699 Liiketoiminnan muut kulut yhteensä BOLD
|
|
36
|
+
BREAK
|
|
37
|
+
5000-7999 VOITTO (TAPPIO) ENNEN VEROJA REQUIRED BOLD
|
|
38
|
+
8000-8999 Verot HIDE_TOTAL BOLD
|
|
39
|
+
8000-8999 _Verot DETAILS
|
|
40
|
+
8000-8999 Verot yhteensä BOLD
|
|
41
|
+
BREAK
|
|
42
|
+
5000-8999 TILIKAUDEN VOITTO (TAPPIO) REQUIRED BOLD
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# accounts title flags
|
|
2
|
+
5000-5999 LIIKEVAIHTO REQUIRED BOLD
|
|
3
|
+
6000-6999 Liiketoiminnan muut tuotot
|
|
4
|
+
7000-7099 Ostot ja alihankinta
|
|
5
|
+
7100-7199 Henkilöstökulut
|
|
6
|
+
7200-7299 Hallintokulut
|
|
7
|
+
7300-7399 Markkinointi ja myynti
|
|
8
|
+
7400-7499 Matkakulut
|
|
9
|
+
7500-7599 Poistot ja arvonalentumiset
|
|
10
|
+
7600-7699 Liiketoiminnan muut kulut
|
|
11
|
+
5000-7999 VOITTO (TAPPIO) ENNEN VEROJA REQUIRED BOLD
|
|
12
|
+
8000-8999 Verot yhteensä
|
|
13
|
+
5000-8999 TILIKAUDEN VOITTO (TAPPIO) REQUIRED BOLD
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tasenor/common-plugins",
|
|
3
|
-
"version": "1.17.
|
|
3
|
+
"version": "1.17.14",
|
|
4
4
|
"description": "Shared common plugins of Tasenor project",
|
|
5
5
|
"repository": "git@github.com:dataplugoy/tasenor-bookkeeper.git",
|
|
6
6
|
"author": "Tommi Ronkainen <tommi.ronkainen@gmail.com>",
|
|
@@ -13,9 +13,9 @@
|
|
|
13
13
|
"dayjs": "1.10.8",
|
|
14
14
|
"sprintf-js": "^1.1.2",
|
|
15
15
|
"tsx": "^4.7.0",
|
|
16
|
-
"@tasenor/common-
|
|
17
|
-
"@tasenor/common": "1.17.
|
|
18
|
-
"@tasenor/common
|
|
16
|
+
"@tasenor/common-node": "1.17.14",
|
|
17
|
+
"@tasenor/common-ui": "1.17.14",
|
|
18
|
+
"@tasenor/common": "1.17.14"
|
|
19
19
|
},
|
|
20
20
|
"devDependencies": {
|
|
21
21
|
"@mui/icons-material": "^5.14.1",
|
|
@@ -31,8 +31,8 @@
|
|
|
31
31
|
"react-i18next": "^14.0.5",
|
|
32
32
|
"react-router-dom": "^6.14.1",
|
|
33
33
|
"typescript": "^5.1.6",
|
|
34
|
-
"
|
|
35
|
-
"
|
|
34
|
+
"@tasenor/config": "1.17.14",
|
|
35
|
+
"eslint-config-tasenor": "0.0.0"
|
|
36
36
|
},
|
|
37
37
|
"peerDependencies": {
|
|
38
38
|
"@mui/icons-material": "^5.14.1",
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# accounts title flags
|
|
2
|
+
1000-2999 VASTAAVAA HIDE_TOTAL REQUIRED BOLD
|
|
3
|
+
1000-1299 _PYSYVÄT VASTAAVAT
|
|
4
|
+
1000-1099 __Aineettomat hyödykkeet HIDE_TOTAL BOLD
|
|
5
|
+
1000-1099 ___Aineettomat hyödykkeet DETAILS
|
|
6
|
+
1000-1099 __Aineettomat hyödykkeet yhteensä BOLD
|
|
7
|
+
1100-1199 __Aineelliset hyödykkeet HIDE_TOTAL BOLD
|
|
8
|
+
1100-1199 ___Aineelliset hyödykkeet DETAILS
|
|
9
|
+
1100-1199 __Aineelliset hyödykkeet yhteensä BOLD
|
|
10
|
+
1200-1299 __Kertyneet poistot HIDE_TOTAL BOLD
|
|
11
|
+
1200-1299 ___Kertyneet poistot DETAILS
|
|
12
|
+
1200-1299 __Kertyneet poistot yhteensä BOLD
|
|
13
|
+
2000-2999 _VAIHTUVAT VASTAAVAT HIDE_TOTAL REQUIRED BOLD
|
|
14
|
+
2000-2099 __Saamiset HIDE_TOTAL
|
|
15
|
+
2010-2019 ___Myyntisaamiset HIDE_TOTAL BOLD
|
|
16
|
+
2010-2019 ____Myyntisaamiset DETAILS
|
|
17
|
+
2010-2019 ___Myyntisaamiset yhteensä BOLD
|
|
18
|
+
2020-2029 ___Siirtosaamiset HIDE_TOTAL BOLD
|
|
19
|
+
2020-2029 ____Siirtosaamiset DETAILS
|
|
20
|
+
2020-2029 ___Siirtosaamiset yhteensä BOLD
|
|
21
|
+
2000-2099 __Saamiset yhteensä BOLD
|
|
22
|
+
2100-2199 __Rahat ja pankkisaamiset HIDE_TOTAL BOLD
|
|
23
|
+
2100-2199 ___Rahat ja pankkisaamiset DETAILS
|
|
24
|
+
2100-2199 __Rahat ja pankkisaamiset yhteensä BOLD
|
|
25
|
+
2000-2999 _Vaihtuvat vastaavat yhteensä BOLD
|
|
26
|
+
1000-2999 Vastaavaa yhteensä REQUIRED BOLD
|
|
27
|
+
NEW_PAGE
|
|
28
|
+
VASTATTAVAA HIDE_TOTAL REQUIRED BOLD
|
|
29
|
+
3000-3199 5000-9999 _OMA PÄÄOMA HIDE_TOTAL REQUIRED BOLD
|
|
30
|
+
3000-3099 __Osakepääoma HIDE_TOTAL BOLD
|
|
31
|
+
3000-3099 __Osakepääoma DETAILS
|
|
32
|
+
3100-3199 __Edellisten tilikausien voitto (tappio)
|
|
33
|
+
5000-9999 __Tilikauden voitto (tappio)
|
|
34
|
+
3000-3199 5000-9999 _Oma pääoma yhteensä BOLD
|
|
35
|
+
4000-4999 _VIERAS PÄÄOMA HIDE_TOTAL REQUIRED BOLD
|
|
36
|
+
4000-4999 __Velat HIDE_TOTAL BOLD
|
|
37
|
+
4000-4999 ___Velat DETAILS
|
|
38
|
+
4000-4999 __Velat yhteensä BOLD
|
|
39
|
+
4000-4999 _Vieras pääoma yhteensä BOLD
|
|
40
|
+
3000-3199 4000-4999 5000-9999 Vastattavaa yhteensä REQUIRED BOLD
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# accounts title flags
|
|
2
|
+
1000-2999 VASTAAVAA HIDE_TOTAL REQUIRED BOLD
|
|
3
|
+
1000-1299 _PYSYVÄT VASTAAVAT
|
|
4
|
+
1000-1099 __Aineettomat hyödykkeet HIDE_TOTAL
|
|
5
|
+
1100-1199 __Aineelliset hyödykkeet HIDE_TOTAL
|
|
6
|
+
1200-1299 __Kertyneet poistot HIDE_TOTAL
|
|
7
|
+
2000-2999 _VAIHTUVAT VASTAAVAT HIDE_TOTAL REQUIRED BOLD
|
|
8
|
+
2000-2099 __Saamiset HIDE_TOTAL
|
|
9
|
+
2010-2019 ___Myyntisaamiset
|
|
10
|
+
2020-2029 ___Siirtosaamiset
|
|
11
|
+
2000-2099 __Saamiset yhteensä BOLD
|
|
12
|
+
2100-2199 __Rahat ja pankkisaamiset
|
|
13
|
+
2000-2999 _Vaihtuvat vastaavat yhteensä BOLD
|
|
14
|
+
1000-2999 Vastaavaa yhteensä REQUIRED BOLD
|
|
15
|
+
NEW_PAGE
|
|
16
|
+
VASTATTAVAA HIDE_TOTAL REQUIRED BOLD
|
|
17
|
+
3000-3199 5000-9999 _OMA PÄÄOMA HIDE_TOTAL REQUIRED BOLD
|
|
18
|
+
3000-3099 __Osakepääoma
|
|
19
|
+
3100-3199 __Edellisten tilikausien voitto (tappio)
|
|
20
|
+
5000-9999 __Tilikauden voitto (tappio)
|
|
21
|
+
3000-3199 5000-9999 _Oma pääoma yhteensä BOLD
|
|
22
|
+
4000-4999 _VIERAS PÄÄOMA HIDE_TOTAL REQUIRED BOLD
|
|
23
|
+
4000-4999 __Velat
|
|
24
|
+
4000-4999 _Vieras pääoma yhteensä BOLD
|
|
25
|
+
3000-3199 4000-4999 5000-9999 Vastattavaa yhteensä REQUIRED BOLD
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
# accounts title flags
|
|
2
|
+
5000-5999 LIIKEVAIHTO DETAILS
|
|
3
|
+
BREAK
|
|
4
|
+
5000-5999 LIIKEVAIHTO REQUIRED BOLD
|
|
5
|
+
6000-6999 Liiketoiminnan muut tuotot HIDE_TOTAL BOLD
|
|
6
|
+
6000-6999 _Liiketoiminnan muut tuotot DETAILS
|
|
7
|
+
6000-6999 Liiketoiminnan muut tuotot yhteensä BOLD
|
|
8
|
+
BREAK
|
|
9
|
+
7000-7099 Ostot ja alihankinta HIDE_TOTAL BOLD
|
|
10
|
+
7000-7099 _Ostot ja alihankinta DETAILS
|
|
11
|
+
7000-7099 Ostot ja alihankinta yhteensä BOLD
|
|
12
|
+
BREAK
|
|
13
|
+
7100-7199 Henkilöstökulut HIDE_TOTAL BOLD
|
|
14
|
+
7100-7199 _Henkilöstökulut DETAILS
|
|
15
|
+
7100-7199 Henkilöstökulut yhteensä BOLD
|
|
16
|
+
BREAK
|
|
17
|
+
7200-7299 Hallintokulut HIDE_TOTAL BOLD
|
|
18
|
+
7200-7299 _Hallintokulut DETAILS
|
|
19
|
+
7200-7299 Hallintokulut yhteensä BOLD
|
|
20
|
+
BREAK
|
|
21
|
+
7300-7399 Markkinointi ja myynti HIDE_TOTAL BOLD
|
|
22
|
+
7300-7399 _Markkinointi ja myynti DETAILS
|
|
23
|
+
7300-7399 Markkinointi ja myynti yhteensä BOLD
|
|
24
|
+
BREAK
|
|
25
|
+
7400-7499 Matkakulut HIDE_TOTAL BOLD
|
|
26
|
+
7400-7499 _Matkakulut DETAILS
|
|
27
|
+
7400-7499 Matkakulut yhteensä BOLD
|
|
28
|
+
BREAK
|
|
29
|
+
7500-7599 Poistot ja arvonalentumiset HIDE_TOTAL BOLD
|
|
30
|
+
7500-7599 _Poistot ja arvonalentumiset DETAILS
|
|
31
|
+
7500-7599 Poistot ja arvonalentumiset yhteensä BOLD
|
|
32
|
+
BREAK
|
|
33
|
+
7600-7699 Liiketoiminnan muut kulut HIDE_TOTAL BOLD
|
|
34
|
+
7600-7699 _Liiketoiminnan muut kulut DETAILS
|
|
35
|
+
7600-7699 Liiketoiminnan muut kulut yhteensä BOLD
|
|
36
|
+
BREAK
|
|
37
|
+
5000-7999 VOITTO (TAPPIO) ENNEN VEROJA REQUIRED BOLD
|
|
38
|
+
8000-8999 Verot HIDE_TOTAL BOLD
|
|
39
|
+
8000-8999 _Verot DETAILS
|
|
40
|
+
8000-8999 Verot yhteensä BOLD
|
|
41
|
+
BREAK
|
|
42
|
+
5000-8999 TILIKAUDEN VOITTO (TAPPIO) REQUIRED BOLD
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# accounts title flags
|
|
2
|
+
5000-5999 LIIKEVAIHTO REQUIRED BOLD
|
|
3
|
+
6000-6999 Liiketoiminnan muut tuotot
|
|
4
|
+
7000-7099 Ostot ja alihankinta
|
|
5
|
+
7100-7199 Henkilöstökulut
|
|
6
|
+
7200-7299 Hallintokulut
|
|
7
|
+
7300-7399 Markkinointi ja myynti
|
|
8
|
+
7400-7499 Matkakulut
|
|
9
|
+
7500-7599 Poistot ja arvonalentumiset
|
|
10
|
+
7600-7699 Liiketoiminnan muut kulut
|
|
11
|
+
5000-7999 VOITTO (TAPPIO) ENNEN VEROJA REQUIRED BOLD
|
|
12
|
+
8000-8999 Verot yhteensä
|
|
13
|
+
5000-8999 TILIKAUDEN VOITTO (TAPPIO) REQUIRED BOLD
|
|
@@ -0,0 +1,235 @@
|
|
|
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 EstonianIncomeStatementReport extends ReportPlugin {
|
|
8
|
+
|
|
9
|
+
constructor() {
|
|
10
|
+
super('income-statement-detailed' as ReportID, 'income-statement' as ReportID)
|
|
11
|
+
|
|
12
|
+
this.schemes = new Set(['EstonianLimitedCompanyLite'])
|
|
13
|
+
|
|
14
|
+
this.code = 'EstonianIncomeStatementReport' as PluginCode
|
|
15
|
+
this.title = 'Income Statement Report (Estonian)'
|
|
16
|
+
this.version = '1.0.18' 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 = 'Income statement report translated in Finnish and English.'
|
|
22
|
+
|
|
23
|
+
this.languages = {
|
|
24
|
+
en: {
|
|
25
|
+
'report-income-statement-detailed': 'Detailed income statement',
|
|
26
|
+
'report-income-statement': 'Income statement'
|
|
27
|
+
},
|
|
28
|
+
fi: {
|
|
29
|
+
'report-income-statement-detailed': 'Tuloslaskelma tilierittelyin',
|
|
30
|
+
'report-income-statement': '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
|
+
month1: 'radio:1',
|
|
49
|
+
month2: 'radio:1',
|
|
50
|
+
quarter1: 'radio:1',
|
|
51
|
+
month4: 'radio:1',
|
|
52
|
+
month5: 'radio:1',
|
|
53
|
+
quarter2: 'radio:1',
|
|
54
|
+
month7: 'radio:1',
|
|
55
|
+
month8: 'radio:1',
|
|
56
|
+
quarter3: 'radio:1',
|
|
57
|
+
month10: 'radio:1',
|
|
58
|
+
month11: 'radio:1',
|
|
59
|
+
full: 'radio:1:default',
|
|
60
|
+
byTags: 'boolean'
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* Construct column title for period.
|
|
66
|
+
* @param formatName
|
|
67
|
+
* @param period
|
|
68
|
+
* @param settings
|
|
69
|
+
*/
|
|
70
|
+
columnTitle(id, period, options) {
|
|
71
|
+
const start = this.time2str(period.start_date)
|
|
72
|
+
const year = dayjs(period.start_date).year()
|
|
73
|
+
let end
|
|
74
|
+
|
|
75
|
+
if (options.month1) {
|
|
76
|
+
end = `{${dayjs(`${year}-02-01`).subtract(1, 'day').format('YYYY-MM-DD')}}`
|
|
77
|
+
} else if (options.month2) {
|
|
78
|
+
end = `{${dayjs(`${year}-03-01`).subtract(1, 'day').format('YYYY-MM-DD')}}`
|
|
79
|
+
} else if (options.month4) {
|
|
80
|
+
end = `{${dayjs(`${year}-05-01`).subtract(1, 'day').format('YYYY-MM-DD')}}`
|
|
81
|
+
} else if (options.month5) {
|
|
82
|
+
end = `{${dayjs(`${year}-06-01`).subtract(1, 'day').format('YYYY-MM-DD')}}`
|
|
83
|
+
} else if (options.month7) {
|
|
84
|
+
end = `{${dayjs(`${year}-08-01`).subtract(1, 'day').format('YYYY-MM-DD')}}`
|
|
85
|
+
} else if (options.month8) {
|
|
86
|
+
end = `{${dayjs(`${year}-09-01`).subtract(1, 'day').format('YYYY-MM-DD')}}`
|
|
87
|
+
} else if (options.month10) {
|
|
88
|
+
end = `{${dayjs(`${year}-11-01`).subtract(1, 'day').format('YYYY-MM-DD')}}`
|
|
89
|
+
} else if (options.month11) {
|
|
90
|
+
end = `{${dayjs(`${year}-12-01`).subtract(1, 'day').format('YYYY-MM-DD')}}`
|
|
91
|
+
} else if (options.quarter1) {
|
|
92
|
+
end = `{${dayjs(`${year}-04-01`).subtract(1, 'day').format('YYYY-MM-DD')}}`
|
|
93
|
+
} else if (options.quarter2) {
|
|
94
|
+
end = `{${dayjs(`${year}-07-01`).subtract(1, 'day').format('YYYY-MM-DD')}}`
|
|
95
|
+
} else if (options.quarter3) {
|
|
96
|
+
end = `{${dayjs(`${year}-10-01`).subtract(1, 'day').format('YYYY-MM-DD')}}`
|
|
97
|
+
} else {
|
|
98
|
+
end = `{${this.time2str(period.end_date)}}`
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
return '{' + start + '} — {' + end + '}'
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
async getColumns(id, entries, options, settings) {
|
|
105
|
+
// Construct columns for each tag and extra column for non-tagged.
|
|
106
|
+
if (options.byTags) {
|
|
107
|
+
const columns = settings.tags.map((tag) => ({
|
|
108
|
+
type: 'currency',
|
|
109
|
+
name: `tag-${tag.tag}`,
|
|
110
|
+
title: tag.name
|
|
111
|
+
}))
|
|
112
|
+
columns.push({
|
|
113
|
+
type: 'currency',
|
|
114
|
+
name: 'other',
|
|
115
|
+
title: '{Other}'
|
|
116
|
+
})
|
|
117
|
+
columns.unshift({
|
|
118
|
+
name: 'title',
|
|
119
|
+
title: '',
|
|
120
|
+
type: 'name'
|
|
121
|
+
})
|
|
122
|
+
return columns
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
return super.getColumns(id, entries, options, settings)
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
preProcessByTags(id, entries, options, settings, columns) {
|
|
129
|
+
// Prepapre.
|
|
130
|
+
const columnNames = columns.map((col) => col.name)
|
|
131
|
+
const tagSet = new Set(settings.tags.map(t => t.tag))
|
|
132
|
+
|
|
133
|
+
// Summarize all totals from the entries.
|
|
134
|
+
const totals: Record<string, Record<string, number>> = {}
|
|
135
|
+
columnNames.forEach((column) => (totals[column] = {}))
|
|
136
|
+
const accountNames = {}
|
|
137
|
+
const accountNumbers = new Set<AccountNumber>()
|
|
138
|
+
const regex = /^((\[\w+\])+)/
|
|
139
|
+
entries.forEach((entry) => {
|
|
140
|
+
let shares: string[] = []
|
|
141
|
+
const r = regex.exec(entry.description)
|
|
142
|
+
if (r) {
|
|
143
|
+
shares = r[1].substr(1, r[1].length - 2).split('][').filter(t => tagSet.has(t))
|
|
144
|
+
}
|
|
145
|
+
let amount = entry.amount
|
|
146
|
+
if (shares.length) {
|
|
147
|
+
// Share the amount so that rounding errors are split.
|
|
148
|
+
const piece = amount < 0 ? Math.ceil(amount / shares.length) : Math.floor(amount / shares.length)
|
|
149
|
+
shares.forEach((tag) => {
|
|
150
|
+
const column = `tag-${tag}`
|
|
151
|
+
totals[column][entry.number] = totals[column][entry.number] || 0
|
|
152
|
+
totals[column][entry.number] += piece
|
|
153
|
+
amount -= piece
|
|
154
|
+
})
|
|
155
|
+
if (amount) {
|
|
156
|
+
// Make semi-random starting point and distribute cents.
|
|
157
|
+
let i = (entry.periodId) % shares.length
|
|
158
|
+
const delta = amount < 0 ? -1 : 1
|
|
159
|
+
for (let count = Math.abs(amount); count > 0; count--) {
|
|
160
|
+
const column = `tag-${shares[i]}`
|
|
161
|
+
totals[column][entry.number] += delta
|
|
162
|
+
amount -= delta
|
|
163
|
+
i = (i + 1) % shares.length
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
if (amount) {
|
|
169
|
+
totals.other[entry.number] = totals.other[entry.number] || 0
|
|
170
|
+
totals.other[entry.number] += amount
|
|
171
|
+
}
|
|
172
|
+
|
|
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
|
+
async preProcess(id, entries, options, settings, columns) {
|
|
181
|
+
if (options.byTags) {
|
|
182
|
+
return this.preProcessByTags(id, entries, options, settings, columns)
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
const columnNames = columns.map((col) => col.name)
|
|
186
|
+
|
|
187
|
+
// Summarize all totals from the entries.
|
|
188
|
+
const totals = {}
|
|
189
|
+
columnNames.forEach((column) => (totals[column] = {}))
|
|
190
|
+
const accountNames = {}
|
|
191
|
+
const accountNumbers = new Set<AccountNumber>()
|
|
192
|
+
entries.forEach((entry) => {
|
|
193
|
+
const column = 'period' + entry.periodId
|
|
194
|
+
totals[column][entry.number] = totals[column][entry.number] || 0
|
|
195
|
+
totals[column][entry.number] += entry.amount
|
|
196
|
+
accountNames[entry.number] = entry.name
|
|
197
|
+
accountNumbers.add(entry.number)
|
|
198
|
+
})
|
|
199
|
+
|
|
200
|
+
return this.parseAndCombineReport([...accountNumbers], accountNames, columns, options.format, totals)
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
/**
|
|
204
|
+
* Remove empty columns if report made by tags.
|
|
205
|
+
*/
|
|
206
|
+
async postProcess(id, data, options, settings, columns) {
|
|
207
|
+
if (!options.byTags) {
|
|
208
|
+
return data
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
// Find empty columns.
|
|
212
|
+
const found = new Set()
|
|
213
|
+
for (const line of data) {
|
|
214
|
+
if (!line.values) {
|
|
215
|
+
continue
|
|
216
|
+
}
|
|
217
|
+
for (const [k, v] of Object.entries(line.values)) {
|
|
218
|
+
if (v !== null && !isNaN(v as number)) {
|
|
219
|
+
found.add(k)
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
// Remove empty columns.
|
|
225
|
+
for (let i = 0; i < columns.length; i++) {
|
|
226
|
+
if ((columns[i].type === 'currency' || columns[i].type === 'numeric') && !found.has(columns[i].name)) {
|
|
227
|
+
columns.splice(i, 1)
|
|
228
|
+
i--
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
return data
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
export default EstonianIncomeStatementReport
|
|
@@ -1,25 +1,93 @@
|
|
|
1
1
|
# accounts title flags
|
|
2
|
-
1000-
|
|
3
|
-
1000-
|
|
4
|
-
1000-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
2
|
+
1000-2000 VASTAAVAA HIDE_TOTAL REQUIRED BOLD
|
|
3
|
+
1000-1500 _PYSYVÄT VASTAAVAT HIDE_TOTAL REQUIRED BOLD
|
|
4
|
+
1000-1100 __Aineettomat hyödykkeet HIDE_TOTAL
|
|
5
|
+
1020-1030 ___Kehittämismenot
|
|
6
|
+
1030-1050 ___Aineettomat oikeudet
|
|
7
|
+
1050-1070 ___Liikearvo
|
|
8
|
+
1070-1090 ___Muut pitkävaikutteiset menot
|
|
9
|
+
1090-1100 ___Ennakkomaksut
|
|
10
|
+
1000-1100 __Aineettomat hyödykkeet yhteensä BOLD
|
|
11
|
+
1100-1400 __Aineelliset hyödykkeet HIDE_TOTAL
|
|
12
|
+
1100-1120 ___Maa- ja vesialueet
|
|
13
|
+
1120-1160 ___Rakennukset ja rakennelmat
|
|
14
|
+
1160-1300 ___Koneet ja kalusto
|
|
15
|
+
1300-1380 ___Muut aineelliset hyödykkeet
|
|
16
|
+
1380-1400 ___Ennakkomaksut ja keskeneräiset hankinnat
|
|
17
|
+
1100-1400 __Aineelliset hyödykkeet yhteensä BOLD
|
|
18
|
+
1400-1500 __Sijoitukset HIDE_TOTAL
|
|
19
|
+
1400-1410 ___Osuudet saman konsernin yrityksissä
|
|
20
|
+
1410-1420 ___Saamiset saman konsernin yrityksiltä
|
|
21
|
+
1420-1430 ___Osuudet omistusyhteysyrityksissä
|
|
22
|
+
1430-1440 ___Saamiset omistusyhteysyrityksiltä
|
|
23
|
+
1440-1470 ___Muut osakkeet ja osuudet
|
|
24
|
+
1470-1500 ___Muut saamiset
|
|
25
|
+
1400-1500 __Sijoitukset yhteensä BOLD
|
|
26
|
+
1000-1500 _Pysyvät vastaavat yhteensä BOLD
|
|
27
|
+
1500-2000 _VAIHTUVAT VASTAAVAT HIDE_TOTAL REQUIRED BOLD
|
|
28
|
+
1500-1600 __Vaihto-omaisuus HIDE_TOTAL
|
|
29
|
+
1500-1510 ___Aineet ja tarvikkeet
|
|
30
|
+
1510-1520 ___Keskeneräiset tuotteet
|
|
31
|
+
1520-1540 ___Valmiit tuotteet/tavarat
|
|
32
|
+
1540-1550 ___Muu vaihto-omaisuus
|
|
33
|
+
1550-1560 ___Ennakkomaksut
|
|
34
|
+
1500-1600 __Vaihto-omaisuus yhteensä BOLD
|
|
35
|
+
1600-1860 __Saamiset HIDE_TOTAL
|
|
36
|
+
1600-1630 1700-1730 ___Myyntisaamiset
|
|
37
|
+
1630-1640 1730-1740 ___Saamiset saman konsernin yrityksiltä
|
|
38
|
+
1640-1650 1740-1750 ___Saamiset omistusyhteysyrityksiltä
|
|
39
|
+
1650-1660 1750-1760 ___Lainasaamiset
|
|
40
|
+
1660-1670 1760-1780 ___Muut saamiset
|
|
41
|
+
1670-1680 1780-1800 ___Maksamattomat osakkeet/osuudet
|
|
42
|
+
1680-1690 1800-1850 ___Siirtosaamiset
|
|
43
|
+
1600-1860 __Saamiset yhteensä BOLD
|
|
44
|
+
1860-1900 __Rahoitusarvopaperit HIDE_TOTAL
|
|
45
|
+
1860-1870 ___Osuudet saman konsernin yrityksissä
|
|
46
|
+
1880-1890 ___Muut osakkeet ja osuudet
|
|
47
|
+
1890-1900 ___Muut arvopaperit
|
|
48
|
+
1860-1900 __Rahoitusarvopaperit yhteensä
|
|
49
|
+
1900-2000 __Rahat ja pankkisaamiset
|
|
50
|
+
1500-2000 _Vaihtuvat vastaavat yhteensä BOLD
|
|
51
|
+
1000-2000 Vastaavaa yhteensä REQUIRED BOLD
|
|
15
52
|
NEW_PAGE
|
|
16
|
-
VASTATTAVAA HIDE_TOTAL REQUIRED BOLD
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
53
|
+
2000-9999 VASTATTAVAA HIDE_TOTAL REQUIRED BOLD
|
|
54
|
+
2000-2400 _OMA PÄÄOMA HIDE_TOTAL REQUIRED BOLD
|
|
55
|
+
2000-2020 __Osakepääoma
|
|
56
|
+
2100-2110 __Osuuspääoma
|
|
57
|
+
2150-2160 2180-2190 2340-2360 __Pääomapanokset
|
|
58
|
+
2200-2210 2360-2370 __Peruspääoma
|
|
59
|
+
2020-2030 __Ylikurssirahasto
|
|
60
|
+
2030-2040 2110-2120 __Arvonkorotusrahasto
|
|
61
|
+
2050-2100 __Muut rahastot HIDE_TOTAL
|
|
62
|
+
2050-2060 ___Vararahasto
|
|
63
|
+
2060-2070 ___Yhtiöjärjestyksen tai sääntöjen mukaiset rahastot
|
|
64
|
+
2070-2100 ___Muut rahastot
|
|
65
|
+
2050-2100 __Muut rahastot yhteensä
|
|
66
|
+
2250-2330 __Edellisten tilikausien voitto (tappio)
|
|
67
|
+
2330-2340 __Pääomavajaus
|
|
68
|
+
3000-9999 __Tilikauden voitto (tappio)
|
|
69
|
+
2380-2390 __Pääomalainat
|
|
70
|
+
2000-2400 3000-9999 _Oma pääoma yhteensä BOLD
|
|
71
|
+
2400-2500 _TILINPÄÄTÖSSIIRTOJEN KERTYMÄ HIDE_TOTAL BOLD
|
|
72
|
+
2400-2450 __Poistoero
|
|
73
|
+
2450-2500 __Vapaaehtoiset varaukset
|
|
74
|
+
2400-2500 _Tilinpäätössiirtojen kertymä yhteensä BOLD
|
|
75
|
+
2500-2600 _PAKOLLISET VARAUKSET HIDE_TOTAL BOLD
|
|
76
|
+
2500-2530 __Eläkevaraukset
|
|
77
|
+
2530-2550 __Verovaraukset
|
|
78
|
+
2550-2590 __Muut pakolliset varaukset
|
|
79
|
+
2500-2600 _Pakolliset varaukset yhteensä BOLD
|
|
80
|
+
2600-3000 _VIERAS PÄÄOMA HIDE_TOTAL REQUIRED BOLD
|
|
81
|
+
2600-2610 2800-2810 __Joukkovelkakirjalainat
|
|
82
|
+
2610-2620 2810-2820 __Vaihtovelkakirjalainat
|
|
83
|
+
2620-2650 2820-2850 __Lainat rahoituslaitoksilta
|
|
84
|
+
2650-2660 2850-2860 __Eläkelainat
|
|
85
|
+
2660-2670 2860-2870 __Saadut ennakot
|
|
86
|
+
2670-2690 2870-2890 __Ostovelat
|
|
87
|
+
2690-2700 2890-2900 __Rahoitusvekselit
|
|
88
|
+
2700-2710 2900-2910 __Velat saman konsernin yrityksille
|
|
89
|
+
2710-2720 2910-2920 __Velat omistusyhteysyrityksille
|
|
90
|
+
2720-2750 2920-2950 __Muut velat
|
|
91
|
+
2750-2800 2950-3000 __Siirtovelat
|
|
92
|
+
2600-3000 _Vieras pääoma yhteensä BOLD
|
|
93
|
+
2000-9999 Vastattavaa yhteensä REQUIRED BOLD
|