@fin.cx/jahresabschluss

HGB Jahresabschluss engine for the fin.cx accounting stack: the §266 Bilanz and §275 Abs. 2 (GKV) GuV built from exact-cent account balances and the account→position mappings in @fin.cx/chartdata, plus §267/§267a size classes (year-keyed thresholds incl. the post-2024 increases) and the statutory condensed statements for kleine and Kleinst-Kapitalgesellschaften.

Design guarantees:

  • Unmapped accounts with non-zero balances are reported as issues — a statement never silently drops balances
  • The Jahresergebnis is derived twice (balance-sheet difference and GuV) and lands on Passiva A.V; Aktiva must equal Passiva to the cent
  • Personal accounts (10000-69999 / 70000-99999) roll into Forderungen / Verbindlichkeiten aus Lieferungen und Leistungen automatically

Issue Reporting and Security

For reporting bugs, issues, or security vulnerabilities, please visit community.foss.global/. This is the central community hub for all issue reporting. Developers who sign and comply with our contribution agreement and go through identification can also get a code.foss.global/ account to submit Pull Requests directly.

Installation

pnpm add @fin.cx/jahresabschluss

Usage

import {
  buildBalanceSheet,
  buildIncomeStatement,
  classifySizeClass,
} from '@fin.cx/jahresabschluss';

// balances: signedCents = debitCents - creditCents, e.g. from
// (await skrApi.getTrialBalanceCents()).accounts
const sizeClass = classifySizeClass({ fiscalYear: 2026, current: criteria });

const guv = buildIncomeStatement({ chart: 'SKR03', fiscalYear: 2026, balances });
const bilanz = buildBalanceSheet({ chart: 'SKR03', fiscalYear: 2026, balances, sizeClass });

if (bilanz.issues.length || guv.issues.length) throw new Error('fix the books first');
bilanz.totalAktivaCents === bilanz.totalPassivaCents; // always, or issues[] says why

Anhang generation, E-Bilanz (XBRL) output, and KSt/GewSt live in their own milestones (@fin.cx/tax); the Anlagespiegel comes from @fin.cx/assets.

Development

pnpm build
pnpm test

This repository contains open-source code licensed under the MIT License. A copy of the license can be found in the license file.

Please note: The MIT License does not grant permission to use the trade names, trademarks, service marks, or product names of the project, except as required for reasonable and customary use in describing the origin of the work and reproducing the content of the NOTICE file.

Trademarks

This project is owned and maintained by Task Venture Capital GmbH. The names and logos associated with Task Venture Capital GmbH and any related products or services are trademarks of Task Venture Capital GmbH or third parties, and are not included within the scope of the MIT license granted herein.

Use of these trademarks must comply with Task Venture Capital GmbH's Trademark Guidelines or the guidelines of the respective third-party owners, and any usage must be approved in writing. Third-party trademarks used herein are the property of their respective owners and used only in a descriptive manner, e.g. for an implementation of an API or similar.

Company Information

Task Venture Capital GmbH Registered at District Court Bremen HRB 35230 HB, Germany

For any legal inquiries or further information, please contact us via email at hello@task.vc.

By using this repository, you acknowledge that you have read this section, agree to comply with its terms, and understand that the licensing of the code does not imply endorsement by Task Venture Capital GmbH of any derivative works.

S
Description
No description provided
Readme 116 KiB
Languages
TypeScript 100%