@tasenor/common-plugins 1.17.13 → 1.17.15
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 -2
- package/data/EstonianBalanceSheetReport.mjs +4 -0
- package/data/EstonianIncomeStatementReport.mjs +14 -0
- package/data/src/EstonianBalanceSheetReport - balance-sheet-detailed-en.tsv +40 -0
- package/data/src/EstonianBalanceSheetReport - balance-sheet-en.tsv +1 -1
- package/data/src/EstonianIncomeStatementReport - income-statement-detailed-en.tsv +42 -0
- package/data/src/EstonianIncomeStatementReport - income-statement-detailed-fi.tsv +42 -0
- package/data/src/EstonianIncomeStatementReport - income-statement-en.tsv +13 -0
- package/data/src/EstonianIncomeStatementReport - income-statement-fi.tsv +13 -0
- package/package.json +5 -5
- package/src/EstonianBalanceSheetReport/backend/balance-sheet-detailed-en.tsv +40 -0
- package/src/EstonianBalanceSheetReport/backend/balance-sheet-en.tsv +25 -0
- package/src/EstonianBalanceSheetReport/backend/index.ts +2 -3
- package/src/EstonianIncomeStatementReport/backend/income-statement-detailed-en.tsv +42 -0
- package/src/EstonianIncomeStatementReport/backend/income-statement-detailed-fi.tsv +42 -0
- package/src/EstonianIncomeStatementReport/backend/income-statement-en.tsv +13 -0
- package/src/EstonianIncomeStatementReport/backend/income-statement-fi.tsv +13 -0
- package/src/EstonianIncomeStatementReport/backend/index.ts +235 -0
package/.turbo/turbo-release.log
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
|
|
2
2
|
|
|
3
|
-
> @tasenor/common-plugins@1.17.
|
|
3
|
+
> @tasenor/common-plugins@1.17.14 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.15
|
|
8
8
|
[43m[30m WARN [39m[49m using --force I sure hope you know what you are doing
|
|
@@ -4,6 +4,10 @@ const { readFile, saveText, trimCRLF } = commonNode.dataUtils
|
|
|
4
4
|
|
|
5
5
|
let tsv = trimCRLF(readFile('EstonianBalanceSheetReport - balance-sheet-fi.tsv'))
|
|
6
6
|
saveText('EstonianBalanceSheetReport', 'balance-sheet-fi.tsv', tsv)
|
|
7
|
+
tsv = trimCRLF(readFile('EstonianBalanceSheetReport - balance-sheet-en.tsv'))
|
|
8
|
+
saveText('EstonianBalanceSheetReport', 'balance-sheet-en.tsv', tsv)
|
|
7
9
|
|
|
8
10
|
tsv = trimCRLF(readFile('EstonianBalanceSheetReport - balance-sheet-detailed-fi.tsv'))
|
|
9
11
|
saveText('EstonianBalanceSheetReport', 'balance-sheet-detailed-fi.tsv', tsv)
|
|
12
|
+
tsv = trimCRLF(readFile('EstonianBalanceSheetReport - balance-sheet-detailed-en.tsv'))
|
|
13
|
+
saveText('EstonianBalanceSheetReport', 'balance-sheet-detailed-en.tsv', tsv)
|
|
@@ -0,0 +1,14 @@
|
|
|
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
|
+
tsv = trimCRLF(readFile('EstonianIncomeStatementReport - income-statement-en.tsv'))
|
|
9
|
+
saveText('EstonianIncomeStatementReport', 'income-statement-en.tsv', tsv)
|
|
10
|
+
|
|
11
|
+
tsv = trimCRLF(readFile('EstonianIncomeStatementReport - income-statement-detailed-fi.tsv'))
|
|
12
|
+
saveText('EstonianIncomeStatementReport', 'income-statement-detailed-fi.tsv', tsv)
|
|
13
|
+
tsv = trimCRLF(readFile('EstonianIncomeStatementReport - income-statement-detailed-en.tsv'))
|
|
14
|
+
saveText('EstonianIncomeStatementReport', 'income-statement-detailed-en.tsv', tsv)
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# accounts title flags
|
|
2
|
+
1000-2999 ASSETS HIDE_TOTAL REQUIRED BOLD
|
|
3
|
+
1000-1299 _FIXED ASSETS
|
|
4
|
+
1000-1099 __Intanglible Assets HIDE_TOTAL BOLD
|
|
5
|
+
1000-1099 ___Intanglible Assets DETAILS
|
|
6
|
+
1000-1099 __Total Intanglible Assets BOLD
|
|
7
|
+
1100-1199 __Tanglible Assets HIDE_TOTAL BOLD
|
|
8
|
+
1100-1199 ___Tanglible Assets DETAILS
|
|
9
|
+
1100-1199 __Total Tanglible Assets BOLD
|
|
10
|
+
1200-1299 __Accumulated Depreciation HIDE_TOTAL BOLD
|
|
11
|
+
1200-1299 ___Accumulated Depreciation DETAILS
|
|
12
|
+
1200-1299 __Total Accumulated Depreciation BOLD
|
|
13
|
+
2000-2999 _CURRENT ASSETS HIDE_TOTAL REQUIRED BOLD
|
|
14
|
+
2000-2099 __Receivables HIDE_TOTAL
|
|
15
|
+
2010-2019 ___Trade Receivables HIDE_TOTAL BOLD
|
|
16
|
+
2010-2019 ____Trade Receivables DETAILS
|
|
17
|
+
2010-2019 ___Total Trade Receivables BOLD
|
|
18
|
+
2020-2029 ___Accrued Income HIDE_TOTAL BOLD
|
|
19
|
+
2020-2029 ____Accrued Income DETAILS
|
|
20
|
+
2020-2029 ___Total Accrued Income BOLD
|
|
21
|
+
2000-2099 __Total Receivables BOLD
|
|
22
|
+
2100-2199 __Disposable Assets HIDE_TOTAL BOLD
|
|
23
|
+
2100-2199 ___Disposable Assets DETAILS
|
|
24
|
+
2100-2199 __Total Disposable Assets BOLD
|
|
25
|
+
2000-2999 _Total Variable Assets BOLD
|
|
26
|
+
1000-2999 Total Assets REQUIRED BOLD
|
|
27
|
+
NEW_PAGE
|
|
28
|
+
CAPITAL, RESERVES & LIABILITIES HIDE_TOTAL REQUIRED BOLD
|
|
29
|
+
3000-3199 5000-9999 _CAPITAL & RESERVES HIDE_TOTAL REQUIRED BOLD
|
|
30
|
+
3000-3099 __Capital HIDE_TOTAL BOLD
|
|
31
|
+
3000-3099 __Capital DETAILS
|
|
32
|
+
3100-3199 __Retained Profits (Loss)
|
|
33
|
+
5000-9999 __Profit (Loss) for the financial year
|
|
34
|
+
3000-3199 5000-9999 _Total Equity BOLD
|
|
35
|
+
4000-4999 _CREDITORS HIDE_TOTAL REQUIRED BOLD
|
|
36
|
+
4000-4999 __Trade Creditors HIDE_TOTAL BOLD
|
|
37
|
+
4000-4999 ___Trade Creditors DETAILS
|
|
38
|
+
4000-4999 __Total Trade Creditors BOLD
|
|
39
|
+
4000-4999 _Total Creditors BOLD
|
|
40
|
+
3000-3199 4000-9999 Total Liabilities REQUIRED BOLD
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
# accounts title flags
|
|
2
|
+
5000-5999 NET REVENUE DETAILS
|
|
3
|
+
BREAK
|
|
4
|
+
5000-5999 NET REVENUE REQUIRED BOLD
|
|
5
|
+
6000-6999 Other Operating Income HIDE_TOTAL BOLD
|
|
6
|
+
6000-6999 _Other Operating Income DETAILS
|
|
7
|
+
6000-6999 Total Other Operating Income BOLD
|
|
8
|
+
BREAK
|
|
9
|
+
7000-7099 Purchases and Subcontracting HIDE_TOTAL BOLD
|
|
10
|
+
7000-7099 _Purchases and Subcontracting DETAILS
|
|
11
|
+
7000-7099 Total Purchases and Subcontracting BOLD
|
|
12
|
+
BREAK
|
|
13
|
+
7100-7199 Personnel Expenses HIDE_TOTAL BOLD
|
|
14
|
+
7100-7199 _Personnel Expenses DETAILS
|
|
15
|
+
7100-7199 Total Personnel Expenses BOLD
|
|
16
|
+
BREAK
|
|
17
|
+
7200-7299 Administrative Expenses HIDE_TOTAL BOLD
|
|
18
|
+
7200-7299 _Administrative Expenses DETAILS
|
|
19
|
+
7200-7299 Total Administrative Expenses BOLD
|
|
20
|
+
BREAK
|
|
21
|
+
7300-7399 Marketing and Sales Expenses HIDE_TOTAL BOLD
|
|
22
|
+
7300-7399 _Marketing and Sales Expenses DETAILS
|
|
23
|
+
7300-7399 Total Marketing and Sales Expenses BOLD
|
|
24
|
+
BREAK
|
|
25
|
+
7400-7499 Travel Expenses HIDE_TOTAL BOLD
|
|
26
|
+
7400-7499 _Travel Expenses DETAILS
|
|
27
|
+
7400-7499 Total Travel Expenses BOLD
|
|
28
|
+
BREAK
|
|
29
|
+
7500-7599 Depreciation and Impairment Losses HIDE_TOTAL BOLD
|
|
30
|
+
7500-7599 _Depreciation and Impairment Losses DETAILS
|
|
31
|
+
7500-7599 Total Depreciation and Impairment Losses BOLD
|
|
32
|
+
BREAK
|
|
33
|
+
7600-7699 Other Operating Expenses HIDE_TOTAL BOLD
|
|
34
|
+
7600-7699 _Other Operating Expenses DETAILS
|
|
35
|
+
7600-7699 Total Other Operating Expenses BOLD
|
|
36
|
+
BREAK
|
|
37
|
+
5000-7999 PROFIT (LOSS) BEFORE TAXES REQUIRED BOLD
|
|
38
|
+
8000-8999 Taxes HIDE_TOTAL BOLD
|
|
39
|
+
8000-8999 _Taxes DETAILS
|
|
40
|
+
8000-8999 Total Taxes BOLD
|
|
41
|
+
BREAK
|
|
42
|
+
5000-8999 PROFIT (LOSS) FOR THE FINANCIAL YEAR 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 NET REVENUE REQUIRED BOLD
|
|
3
|
+
6000-6999 Other Operating Income
|
|
4
|
+
7000-7099 Purchases and Subcontracting
|
|
5
|
+
7100-7199 Personnel Expenses
|
|
6
|
+
7200-7299 Administrative Expenses
|
|
7
|
+
7300-7399 Marketing and Sales Expenses
|
|
8
|
+
7400-7499 Travel Expenses
|
|
9
|
+
7500-7599 Depreciation and Impairment Losses
|
|
10
|
+
7600-7699 Other Operating Expenses
|
|
11
|
+
5000-7999 PROFIT (LOSS) BEFORE TAXES REQUIRED BOLD
|
|
12
|
+
8000-8999 Income Taxes
|
|
13
|
+
5000-8999 PROFIT (LOSS) FOR THE FINANCIAL YEAR 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.15",
|
|
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": "1.17.
|
|
17
|
-
"@tasenor/common-
|
|
18
|
-
"@tasenor/common-
|
|
16
|
+
"@tasenor/common": "1.17.15",
|
|
17
|
+
"@tasenor/common-node": "1.17.15",
|
|
18
|
+
"@tasenor/common-ui": "1.17.15"
|
|
19
19
|
},
|
|
20
20
|
"devDependencies": {
|
|
21
21
|
"@mui/icons-material": "^5.14.1",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"react-i18next": "^14.0.5",
|
|
32
32
|
"react-router-dom": "^6.14.1",
|
|
33
33
|
"typescript": "^5.1.6",
|
|
34
|
-
"@tasenor/config": "1.17.
|
|
34
|
+
"@tasenor/config": "1.17.15",
|
|
35
35
|
"eslint-config-tasenor": "0.0.0"
|
|
36
36
|
},
|
|
37
37
|
"peerDependencies": {
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# accounts title flags
|
|
2
|
+
1000-2999 ASSETS HIDE_TOTAL REQUIRED BOLD
|
|
3
|
+
1000-1299 _FIXED ASSETS
|
|
4
|
+
1000-1099 __Intanglible Assets HIDE_TOTAL BOLD
|
|
5
|
+
1000-1099 ___Intanglible Assets DETAILS
|
|
6
|
+
1000-1099 __Total Intanglible Assets BOLD
|
|
7
|
+
1100-1199 __Tanglible Assets HIDE_TOTAL BOLD
|
|
8
|
+
1100-1199 ___Tanglible Assets DETAILS
|
|
9
|
+
1100-1199 __Total Tanglible Assets BOLD
|
|
10
|
+
1200-1299 __Accumulated Depreciation HIDE_TOTAL BOLD
|
|
11
|
+
1200-1299 ___Accumulated Depreciation DETAILS
|
|
12
|
+
1200-1299 __Total Accumulated Depreciation BOLD
|
|
13
|
+
2000-2999 _CURRENT ASSETS HIDE_TOTAL REQUIRED BOLD
|
|
14
|
+
2000-2099 __Receivables HIDE_TOTAL
|
|
15
|
+
2010-2019 ___Trade Receivables HIDE_TOTAL BOLD
|
|
16
|
+
2010-2019 ____Trade Receivables DETAILS
|
|
17
|
+
2010-2019 ___Total Trade Receivables BOLD
|
|
18
|
+
2020-2029 ___Accrued Income HIDE_TOTAL BOLD
|
|
19
|
+
2020-2029 ____Accrued Income DETAILS
|
|
20
|
+
2020-2029 ___Total Accrued Income BOLD
|
|
21
|
+
2000-2099 __Total Receivables BOLD
|
|
22
|
+
2100-2199 __Disposable Assets HIDE_TOTAL BOLD
|
|
23
|
+
2100-2199 ___Disposable Assets DETAILS
|
|
24
|
+
2100-2199 __Total Disposable Assets BOLD
|
|
25
|
+
2000-2999 _Total Variable Assets BOLD
|
|
26
|
+
1000-2999 Total Assets REQUIRED BOLD
|
|
27
|
+
NEW_PAGE
|
|
28
|
+
CAPITAL, RESERVES & LIABILITIES HIDE_TOTAL REQUIRED BOLD
|
|
29
|
+
3000-3199 5000-9999 _CAPITAL & RESERVES HIDE_TOTAL REQUIRED BOLD
|
|
30
|
+
3000-3099 __Capital HIDE_TOTAL BOLD
|
|
31
|
+
3000-3099 __Capital DETAILS
|
|
32
|
+
3100-3199 __Retained Profits (Loss)
|
|
33
|
+
5000-9999 __Profit (Loss) for the financial year
|
|
34
|
+
3000-3199 5000-9999 _Total Equity BOLD
|
|
35
|
+
4000-4999 _CREDITORS HIDE_TOTAL REQUIRED BOLD
|
|
36
|
+
4000-4999 __Trade Creditors HIDE_TOTAL BOLD
|
|
37
|
+
4000-4999 ___Trade Creditors DETAILS
|
|
38
|
+
4000-4999 __Total Trade Creditors BOLD
|
|
39
|
+
4000-4999 _Total Creditors BOLD
|
|
40
|
+
3000-3199 4000-9999 Total Liabilities REQUIRED BOLD
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# accounts title flags
|
|
2
|
+
1000-2999 ASSETS HIDE_TOTAL REQUIRED BOLD
|
|
3
|
+
1000-1299 _FIXED ASSETS
|
|
4
|
+
1000-1099 __Intanglible Assets HIDE_TOTAL
|
|
5
|
+
1100-1199 __Tanglible Assets HIDE_TOTAL
|
|
6
|
+
1200-1299 __Accumulated Depreciation HIDE_TOTAL
|
|
7
|
+
2000-2999 _CURRENT ASSETS HIDE_TOTAL REQUIRED BOLD
|
|
8
|
+
2000-2099 __Receivables HIDE_TOTAL
|
|
9
|
+
2010-2019 ___Trade Receivables
|
|
10
|
+
2020-2029 ___Accrued Income
|
|
11
|
+
2000-2099 __Total Receivables BOLD
|
|
12
|
+
2100-2199 __Disposable Assets
|
|
13
|
+
2000-2999 _Total Variable Assets BOLD
|
|
14
|
+
1000-2999 Total Assets REQUIRED BOLD
|
|
15
|
+
NEW_PAGE
|
|
16
|
+
CAPITAL, RESERVES & LIABILITIES HIDE_TOTAL REQUIRED BOLD
|
|
17
|
+
3000-3199 5000-9999 _CAPITAL & RESERVES HIDE_TOTAL REQUIRED BOLD
|
|
18
|
+
3000-3099 __Capital
|
|
19
|
+
3100-3199 __Retained Profits (Loss)
|
|
20
|
+
5000-9999 __Profit (Loss) for the financial year
|
|
21
|
+
3000-3199 5000-9999 _Total Equity BOLD
|
|
22
|
+
4000-4999 _CREDITORS HIDE_TOTAL REQUIRED BOLD
|
|
23
|
+
4000-4999 __Trade Creditors
|
|
24
|
+
4000-4999 _Total Liabilities BOLD
|
|
25
|
+
3000-3199 4000-9999 Total Liabilities REQUIRED BOLD
|
|
@@ -12,7 +12,7 @@ class EstonianBalanceSheetReport extends ReportPlugin {
|
|
|
12
12
|
|
|
13
13
|
this.code = 'EstonianBalanceSheetReport' as PluginCode
|
|
14
14
|
this.title = 'Balance Sheet Report (Estonian)'
|
|
15
|
-
this.version = '1.0.
|
|
15
|
+
this.version = '1.0.1' as Version
|
|
16
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
17
|
this.releaseDate = '2026-02-05'
|
|
18
18
|
this.use = 'backend'
|
|
@@ -39,8 +39,7 @@ class EstonianBalanceSheetReport extends ReportPlugin {
|
|
|
39
39
|
}
|
|
40
40
|
|
|
41
41
|
getLanguages(): Language[] {
|
|
42
|
-
|
|
43
|
-
return ['fi']
|
|
42
|
+
return ['fi', 'en']
|
|
44
43
|
}
|
|
45
44
|
|
|
46
45
|
getReportOptions(): ReportOptions {
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
# accounts title flags
|
|
2
|
+
5000-5999 NET REVENUE DETAILS
|
|
3
|
+
BREAK
|
|
4
|
+
5000-5999 NET REVENUE REQUIRED BOLD
|
|
5
|
+
6000-6999 Other Operating Income HIDE_TOTAL BOLD
|
|
6
|
+
6000-6999 _Other Operating Income DETAILS
|
|
7
|
+
6000-6999 Total Other Operating Income BOLD
|
|
8
|
+
BREAK
|
|
9
|
+
7000-7099 Purchases and Subcontracting HIDE_TOTAL BOLD
|
|
10
|
+
7000-7099 _Purchases and Subcontracting DETAILS
|
|
11
|
+
7000-7099 Total Purchases and Subcontracting BOLD
|
|
12
|
+
BREAK
|
|
13
|
+
7100-7199 Personnel Expenses HIDE_TOTAL BOLD
|
|
14
|
+
7100-7199 _Personnel Expenses DETAILS
|
|
15
|
+
7100-7199 Total Personnel Expenses BOLD
|
|
16
|
+
BREAK
|
|
17
|
+
7200-7299 Administrative Expenses HIDE_TOTAL BOLD
|
|
18
|
+
7200-7299 _Administrative Expenses DETAILS
|
|
19
|
+
7200-7299 Total Administrative Expenses BOLD
|
|
20
|
+
BREAK
|
|
21
|
+
7300-7399 Marketing and Sales Expenses HIDE_TOTAL BOLD
|
|
22
|
+
7300-7399 _Marketing and Sales Expenses DETAILS
|
|
23
|
+
7300-7399 Total Marketing and Sales Expenses BOLD
|
|
24
|
+
BREAK
|
|
25
|
+
7400-7499 Travel Expenses HIDE_TOTAL BOLD
|
|
26
|
+
7400-7499 _Travel Expenses DETAILS
|
|
27
|
+
7400-7499 Total Travel Expenses BOLD
|
|
28
|
+
BREAK
|
|
29
|
+
7500-7599 Depreciation and Impairment Losses HIDE_TOTAL BOLD
|
|
30
|
+
7500-7599 _Depreciation and Impairment Losses DETAILS
|
|
31
|
+
7500-7599 Total Depreciation and Impairment Losses BOLD
|
|
32
|
+
BREAK
|
|
33
|
+
7600-7699 Other Operating Expenses HIDE_TOTAL BOLD
|
|
34
|
+
7600-7699 _Other Operating Expenses DETAILS
|
|
35
|
+
7600-7699 Total Other Operating Expenses BOLD
|
|
36
|
+
BREAK
|
|
37
|
+
5000-7999 PROFIT (LOSS) BEFORE TAXES REQUIRED BOLD
|
|
38
|
+
8000-8999 Taxes HIDE_TOTAL BOLD
|
|
39
|
+
8000-8999 _Taxes DETAILS
|
|
40
|
+
8000-8999 Total Taxes BOLD
|
|
41
|
+
BREAK
|
|
42
|
+
5000-8999 PROFIT (LOSS) FOR THE FINANCIAL YEAR 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 NET REVENUE REQUIRED BOLD
|
|
3
|
+
6000-6999 Other Operating Income
|
|
4
|
+
7000-7099 Purchases and Subcontracting
|
|
5
|
+
7100-7199 Personnel Expenses
|
|
6
|
+
7200-7299 Administrative Expenses
|
|
7
|
+
7300-7399 Marketing and Sales Expenses
|
|
8
|
+
7400-7499 Travel Expenses
|
|
9
|
+
7500-7599 Depreciation and Impairment Losses
|
|
10
|
+
7600-7699 Other Operating Expenses
|
|
11
|
+
5000-7999 PROFIT (LOSS) BEFORE TAXES REQUIRED BOLD
|
|
12
|
+
8000-8999 Income Taxes
|
|
13
|
+
5000-8999 PROFIT (LOSS) FOR THE FINANCIAL YEAR 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.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 = '2026-02-06'
|
|
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', 'en']
|
|
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
|