@fin.cx/skr 2.0.0 → 3.0.0

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fin.cx/skr",
3
- "version": "2.0.0",
3
+ "version": "3.0.0",
4
4
  "description": "SKR03 and SKR04 German accounting standards for double-entry bookkeeping",
5
5
  "main": "dist_ts/index.js",
6
6
  "typings": "dist_ts/index.d.ts",
@@ -19,9 +19,8 @@
19
19
  "author": "Fin.cx",
20
20
  "license": "MIT",
21
21
  "dependencies": {
22
- "@e-invoice-eu/core": "^3.1.1",
23
22
  "@fin.cx/calculation": "^1.1.1",
24
- "@fin.cx/einvoice": "6.0.0",
23
+ "@fin.cx/einvoice": "6.1.1",
25
24
  "@push.rocks/smartdata": "^7.2.1",
26
25
  "@push.rocks/smartfile": "^13.1.3",
27
26
  "@push.rocks/smartfs": "^1.5.1",
@@ -35,6 +34,7 @@
35
34
  "node-forge": "^1.4.0"
36
35
  },
37
36
  "devDependencies": {
37
+ "@fin.cx/chartdata": "^2.1.0",
38
38
  "@git.zone/tsbuild": "^4.4.2",
39
39
  "@git.zone/tsrun": "^2.0.5",
40
40
  "@git.zone/tstest": "^3.6.6",
package/readme.hints.md CHANGED
@@ -14,6 +14,16 @@
14
14
  `readme.plan.md`; M0 = skr v2 core hardening. @fin.cx/calculation ships the cents
15
15
  module (TCents) that skr v2 money handling builds on.
16
16
 
17
+ ## Chart rebase (2026-07-09, v3)
18
+
19
+ - The built-in SKR03/04 charts are now GENERATED from @fin.cx/chartdata >= 2.1.0
20
+ (`tsx tools/generate-chart-data.ts`) — the v1 hand-written charts were an
21
+ invented hybrid layout and are gone. Notable corrections: SKR03 revenue lives
22
+ in class 8 (8400/8300), expenses in class 4 (default 4900 — 4980 is
23
+ Mietleasing!), VSt/USt rate accounts fixed (1571/1771 = 7 %); SKR04 bank is
24
+ 1800, Kasse 1600, controls 1200/3300, default expense 6300.
25
+ - Account.isAutomaticAccount: SKR04 controls corrected to 1200/3300.
26
+
17
27
  ## M0 Phase 2 — stateless core (2026-07-09)
18
28
 
19
29
  - `ts/core/` is the pure booking core (exported as `core` from the package index):
package/readme.md CHANGED
@@ -78,7 +78,7 @@ await api.initialize('SKR03');
78
78
  await api.postTransaction({
79
79
  date: new Date(),
80
80
  debitAccount: '1200',
81
- creditAccount: '4000',
81
+ creditAccount: '8400',
82
82
  amount: 1000,
83
83
  description: 'Test sale',
84
84
  reference: 'INV-001',
@@ -96,16 +96,16 @@ await api.close();
96
96
 
97
97
  `initialize('SKR03')` loads the process-oriented chart.
98
98
 
99
- - Class 4: operating income
100
- - Class 5: material costs
101
- - Class 6: personnel costs
102
- - Class 7: other operating expenses
99
+ - Class 3: Wareneingang
100
+ - Class 4: betriebliche Aufwendungen
101
+ - Class 8: Erlöse
102
+ - Class 9: Vortrags- und Abschlusskonten
103
103
 
104
104
  `initialize('SKR04')` loads the financial-statement-oriented chart.
105
105
 
106
- - Class 2 and 3: expenses
107
- - Class 4 and 5: revenues
108
- - Class 8: reserved as `frei` for custom use
106
+ - Class 4: betriebliche Erträge
107
+ - Class 5 and 6: betriebliche Aufwendungen
108
+ - Class 2: Eigenkapital, Class 3: Fremdkapital
109
109
 
110
110
  The test suite exercises both variants and includes full Jahresabschluss scenarios for each.
111
111
 
package/readme.plan.md CHANGED
@@ -94,6 +94,22 @@ After **@fin.cx/calculation v1.1.0** (cents module — RELEASED 2026-07-09 ✓).
94
94
 
95
95
  ### M-A — `@fin.cx/chartdata` (new pkg; parallel to M0)
96
96
 
97
+ **Status 2026-07-09: A1 seed COMPLETE locally** (repo at
98
+ `/mnt/data/foss.global/fin.cx/chartdata`, committed, 12/12 tests): year-keyed
99
+ SKR03/04 2026 datasets (~125 accounts each incl. all fiscally-relevant VAT/
100
+ Skonto/igE/§13b/EUSt accounts missing from skr v1), Automatik functions +
101
+ allowed BU keys, account→UStVA-Kennzahl mappings, scenario Kennzahlen table
102
+ (89/93, 46/47, 84/85, 41, 43, 81, 86, 60, 66/61/67/62), coverage introspection,
103
+ provenance per record, reproducible seed pipeline in tools/.
104
+ **RELEASED as @fin.cx/chartdata v1.1.0** (2026-07-09, verdaccio + npmjs).
105
+ **A1 cross-diff done (2026-07-09):** Odoo l10n_de oracle proves the skr-v1 seed
106
+ charts are an invented hybrid (~50/125 SKR03 + ~66/130 SKR04 divergences);
107
+ ALL fiscal A1 additions verified clean. Rate-label fixes released (v1.1.1:
108
+ 1570/1571/1770/1771). NEXT: A1 seed-base rebase (clean-room base set, remove
109
+ invented blocks, align skr built-in charts + tests — coupled change), then A2
110
+ (HGB mappings; Odoo tags as verification oracle), then A3. Details:
111
+ chartdata/tools/a1-crossdiff-report.md.
112
+
97
113
  Year-versioned full SKR03/04: account master, Automatikkonto functions + allowed BU keys,
98
114
  UStVA-Kennzahl / HGB §266/§275 / E-Bilanz (de-gaap-ci) mappings. Pure data + lookup API;
99
115
  `getMappingCoverage()` fails loudly. Pipeline in unpublished tools/ (public sources,
@@ -104,6 +120,16 @@ oracle. Legal review before public MIT release.
104
120
 
105
121
  ### M-B — Subledgers + reconciliation
106
122
 
123
+ **B1 status 2026-07-09: package layer RELEASED** — @fin.cx/camt v1.1.0
124
+ (CAMT.052/053/054, exact cents, SEPA extraction, statement-internal balance
125
+ check) and @fin.cx/bankrec v1.1.0 (canonical signed-cent transactions, camt +
126
+ mt940 adapters, cross-statement continuity control, confidence-scored matching
127
+ engine: direction filter, Skonto window, tie-forces-review, no double
128
+ settlement). @fin.cx/mt940parser v1.1.1 published for the first time
129
+ (modernized: smartconfig v2, direct npm publish, pnpm pinned). Remaining B1:
130
+ regression run against real TVC bank statements (user to provide), then wire
131
+ auto/review/unmatched decisions to skr recipes in the consuming app.
132
+
107
133
  B1 `@fin.cx/camt` (CAMT.052/053/054; MT940 = legacy) + `@fin.cx/bankrec` (canonical
108
134
  decimal bank txn with SEPA refs, adapters, balance-chain continuity, confidence-scored
109
135
  matching, auto-post above threshold, review queue below). B2 OPOS inside skr (ts/opos/:
@@ -3,6 +3,6 @@
3
3
  */
4
4
  export const commitinfo = {
5
5
  name: '@fin.cx/skr',
6
- version: '2.0.0',
6
+ version: '3.0.0',
7
7
  description: 'SKR03 and SKR04 German accounting standards for double-entry bookkeeping'
8
8
  }
@@ -80,7 +80,7 @@ export const SKR03_DEFAULT_POLICY: IAccountPolicy = {
80
80
  export: '8120',
81
81
  reverseCharge: '8337',
82
82
  },
83
- expenseDefault: '4980',
83
+ expenseDefault: '4900',
84
84
  skonto: {
85
85
  receivedStandard: '3736',
86
86
  receivedReduced: '3731', // PROVISIONAL
@@ -119,7 +119,7 @@ export const SKR04_DEFAULT_POLICY: IAccountPolicy = {
119
119
  export: '4120',
120
120
  reverseCharge: '4337',
121
121
  },
122
- expenseDefault: '6980',
122
+ expenseDefault: '6300',
123
123
  skonto: {
124
124
  receivedStandard: '5736',
125
125
  receivedReduced: '5731', // PROVISIONAL
@@ -202,14 +202,13 @@ export class Account extends SmartDataDbDoc {
202
202
  * Automatic accounts like 1400/1600 cannot be posted to directly
203
203
  */
204
204
  public static isAutomaticAccount(accountNumber: string, skrType: TSKRType): boolean {
205
+ // Sammelkonten (control accounts) must be addressed via personal accounts
205
206
  // SKR03: 1400 (Forderungen), 1600 (Verbindlichkeiten)
206
- // SKR04: 1400 (Forderungen), 1600 (Verbindlichkeiten)
207
- // Note: In SKR04, 3300 is "Fahrzeugkosten" (vehicle costs), NOT an automatic account
207
+ // SKR04: 1200 (Forderungen), 3300 (Verbindlichkeiten)
208
208
  if (skrType === 'SKR03') {
209
209
  return accountNumber === '1400' || accountNumber === '1600';
210
- } else {
211
- return accountNumber === '1400' || accountNumber === '1600';
212
210
  }
211
+ return accountNumber === '1200' || accountNumber === '3300';
213
212
  }
214
213
 
215
214
  /**