Skip to content

App contract

What the web app (app/) uses of the instance: every Command, query and route, with payload and result. The app is a client of the REST API and nothing else. The OpenAPI document (openapi/openapi.json, served at /v1/openapi.json, rendered as the API reference) is the authority for the exact schemas; this page names what the app relies on. ADR 0023 records the choices behind it. Transport, routes and list queries: REST.

Scope “public” needs no credentials; “Account” needs the session; “Mandant” needs the session and Decuma-Mandant.

Name Payload Result
installation.flags (query) {} [{name, description, on}]; the open layer declares eric
installation.links (query) {} {agb, datenschutz, impressum}, each a URL or null (unset: hide it)

Registration, confirmation, sign-in (public)

Section titled “Registration, confirmation, sign-in (public)”
Name Payload Result and refusals
account.register {email, passwort, anzeigename?} {account_id}; sends the confirmation mail. validation: password rule (at least 12 characters and one character that is neither letter nor digit; detail names what is missing); conflict: address in use
account.request_email_confirmation {email} {ok: true} whether or not the address exists; throttled silently
account.confirm_email {token} {ok: true}. conflict with next_step “neuen Link anfordern”: used, expired or unknown link
account.forgot_password {email} {ok: true} whether or not the address exists; throttled silently
account.reset_password {token, neues_passwort} {ok: true}; ends every session of the Account, revokes its API-Schlüssel (with their OAuth connections) and its other open reset links, and confirms the address. conflict as above; validation: password rule
session.sign_in {email, passwort, code?} {account_id, sitzung_id, laeuft_ab_am} (plus token without the web header). not_authenticated “E-Mail oder Passwort stimmt nicht.”; validation when the second factor is on and code is missing (show #/anmelden/code); not_authenticated for a wrong code and for a 6-digit code that signed in before; not_allowed when throttled. code takes the 6-digit code or a recovery code

Links in the mails: <public url>/#/registrieren/bestaetigen?token=... and <public url>/#/anmelden/passwort/neu?token=....

Name Payload Result and refusals
account.get (query) {} {account_id, email, anzeigename, sprache, email_bestaetigt, zweiter_faktor_aktiv}; sprache is de, en or null (not chosen: the browser decides)
account.set_data {anzeigename?, sprache?} as account.get
account.update_password {passwort, neues_passwort} {ok}; ends every other session of the Account. not_allowed: wrong current password
account.second_factor.set_up {passwort} {geheimnis, otpauth_url}. conflict while the second factor is on: replacing it goes through account.second_factor.disable
account.second_factor.confirm {code} {ok}; ends every other session of the Account. validation: code does not match
account.generate_recovery_codes {passwort} {codes: [8 strings]}, shown once; new codes invalidate the old. conflict while the second factor is off
account.second_factor.disable {passwort} {ok}; removes the recovery codes. not_allowed: wrong password
session.list (query) Listenabfrage Liste of {sitzung_id, erstellt_am, laeuft_ab_am, adresse, diese}
session.end {sitzung_id} {sitzung_id}
session.sign_out {} {sitzung_id}; clears the cookie
session.end_all {} {beendet} (number of sessions); every session including this one; clears the cookie
account.delete {passwort} {tombstone, mandanten}: deletes the Mandanten the Account is Inhaber of (mandanten); a Zugriff to another’s Mandant ends as by access.revoke, logged in that Mandant; warning no_export when a Mandant has no export of today; clears the cookie. not_allowed: wrong password
mandant.create {anzeigename, mandantenart, personen?, betrieb?} {mandant_id, betrieb_id, personen}. not_allowed with next_step “E-Mail-Adresse bestätigen; Link erneut senden” while the address is unconfirmed
mandant.list (query) Listenabfrage Liste of {mandant_id, anzeigename, mandantenart, erstellt_am}

mandantenart: juristische_person, personengesellschaft, natuerliche_person (one or two personen: [{vorname, nachname}]).

Name Payload Result and refusals
mandant.get (query) {} {mandant_id, anzeigename, mandantenart, steuernummer, ust_idnr, finanzamt, registergericht, registernummer, personen, betriebe}
mandant.readiness (query) {} [{meldung: "umsatzsteuer_voranmeldung", bereit, fehlend: [{feld, text}], naechster_schritt}]; feld is steuernummer, finanzamt, besteuerungsart or voranmeldungszeitraum, in that order; naechster_schritt is one sentence (also when nothing is missing)
master_data.set {anzeigename?, steuernummer?, ust_idnr?, finanzamt?, registergericht?, registernummer?} the payload
master_data.set_from {gueltig_ab, besteuerungsart?, voranmeldungszeitraum?, kleinunternehmer?, wirtschaftsjahr_beginn_monat?} the payload; warning valid_from_in_past when a field that has a value already is changed from a date before today. conflict: a value from that date exists
master_data.valid (query) {datum} {datum, besteuerungsart, voranmeldungszeitraum, kleinunternehmer, wirtschaftsjahr_beginn_monat}
master_data.history (query) {} [{feld, gueltig_ab, wert, erfasst_am}], newest gueltig_ab first per field: the earlier values below a sheet
person.create {vorname, nachname} {id}
betrieb.create {bezeichnung, person_id} {id}
api_key.create {bezeichnung, freigabeklassen, gueltig_bis?} {id, token}; token shown once. Empty freigabeklassen: the key only reads (queries and the exports marked NUR_LESEND; every other Command not_allowed, ADR 0047)
api_key.list (query) Listenabfrage Liste of {id, bezeichnung, freigabeklassen, gueltig_bis, widerrufen_am, erstellt_am, status}
api_key.revoke {id} {id}
mandant.export {} {download_url, gueltig_bis, payroll_included} (without “Sieht Lohn” a ZIP without payroll, section “Who sees payroll rows”); download_url is a path (/v1/files/<ref>) valid for 10 minutes for this session. The ZIP: manifest.json (SHA-256 per file), tabellen/<table>.csv and .json for every Mandant table, verlauf/command_log.jsonl (the chain), belege/<sha256>
mandant.delete {passwort} {mandant_id, tombstone}; warning no_export without a complete export of today. not_allowed: wrong password

freigabeklassen: ledger_write, filing, money, external_communication, bulk_correction, submission, administration (ADR 0052: a key runs only the Commands of its classes). besteuerungsart: soll, ist. voranmeldungszeitraum: monat, quartal, befreit.

After mandant.delete of the last Mandant the Account stays (mandant.list is empty: onboarding). After account.delete every session of the Account is gone.

A revoked or expired API-Schlüssel is not_authenticated with next_step “neuen Schlüssel erstellen”.

Eingang, Belege, capture, Journal, Kontenplan, Steuerschlüssel and Kategorien (issue #113, ADR 0024). Every name below is Mandant-scoped unless marked “public”. Amounts are decimal strings ("119.00"; a decimal field also takes the typed German form "1.234,56", read once for every Command before validation, decuma-commands/src/betrag.rs), dates YYYY-MM-DD (days in the installation’s time zone), ids UUIDs. Every Command and query of the Journal, the capture and the Vorgang refuses a Mandant without a Betrieb (a “Privat” Mandant) with not_allowed; such a Mandant uses only file.store, beleg.deliver, beleg.get, beleg.list, beleg.export_zip and the file routes. betrieb_id is optional everywhere: without it the main Betrieb is meant (haupt, the first one created; listed first in mandant.get). A natürliche Person keeps one Journal, Kontenplan and Einnahmenüberschussrechnung per Betrieb (euer.* take betrieb_id; another Betrieb than the main one is the Meldung euer-<jahr>-<betrieb_id>); the Umsatzsteuer is the Person’s over all its Betriebe and takes none (R-F-09, kb legal/unternehmer-mehrere-betriebe.md). journal.list and beleg.list filter by filter.betrieb_id (a Beleg with neither Vorgang nor Buchung has none: match it with the value ""); without the filter they list every Betrieb. The app names its active Betrieb in every call that takes betrieb_id and filters those two lists to it.

Route or name Payload or body Result and refusals
POST /v1/files (route) the raw bytes of one file; Content-Type its media type; same credentials and headers as a Mandant Command {hash, groesse, medientyp, content_hash, quality}: the file stored unchanged in the Belegablage (the route runs file.store, so it is logged). A picture (JPEG, PNG, WebP) is also prepared (orientation, deskew, crop, contrast; ADR 0053): content_hash is the SHA-256 of the prepared copy (the file’s own hash for other files), quality {accepted, problem?, reason?, measured} the verdict of the quality gate (problem one of unreadable, low_resolution, cut_off, too_far, too_dark, glare, blurred; null for other files). validation for a type that is not accepted or does not match the content (detail names the accepted types) and for a file over the limit (detail names the limit); nothing is stored
file.store {medientyp, inhalt} (inhalt base64; for CLI, MCP and agents) as the route. inhalt is not written to the Command-Log; the hash in the result is
file.quality_limits (query) {} {min_text_height, min_sharpness, min_brightness, max_glare, min_fill}: the limits of the quality gate (DECUMA_CAPTURE_LIMITS)
GET /v1/files/{hash} (route) hash = SHA-256 hex of a stored file of the Mandant the original bytes with their media type; the hash is verified on the way out (internal on a mismatch, nothing served); not_found for a hash the Mandant does not have
beleg.export_zip {} {download_url, gueltig_bis, payroll_included} like mandant.export: a ZIP of the original files of every Beleg (<beleg nummer>/<seite>-<hash>), the “Originaldateien (ZIP)” of the export menu

Accepted: application/pdf, image/jpeg, image/png, image/webp, image/heic; 25 MB per file; 20 pages per Beleg. Configuration: DECUMA_BELEG_TYPES (comma-separated), DECUMA_BELEG_MAX_MB, DECUMA_BELEG_MAX_PAGES.

beleg.deliver turns stored files into one Beleg; the scanning view calls it once per Beleg after “Fertig” (“Als getrennte Belege”: one call per file).

Name Payload Result and refusals
beleg.deliver (idempotent) {seiten: [hash, ...], kanal?: "app" | "api", betrieb_id?, skip_quality_check?}; seiten in page order, 1 to 20 {einlieferung_id, beleg_id, vorgang_id, dublette_von, known, zustand, belegdaten}. A page below the quality limits (file.store quality) is validation before anything is recorded: “Bitte neu aufnehmen” with one sentence why (the page named when there are several), retry_payload {skip_quality_check: true}; with it the Beleg is stored unread and the reading port is not asked (warning retake). The reading port receives the prepared copies (ADR 0053). known: the same files in the same order were delivered before. With the duplicates setting ablehnen and the same pages in the same order already there, beleg_id and vorgang_id are the existing ones; with zulassen a new Beleg is created and dublette_von names the earlier one. Warning dublette (names the existing Beleg) in both cases. belegdaten is the reading of the OCR port (null without a provider, or with the warning not_read when the provider failed). zustand of the Vorgang: neu (unread), gelesen, vorgeschlagen, rueckfrage (content duplicate). vorgang_id and zustand are null for a Mandant without Betrieb. The same Idempotency-Key returns the first result without a new Einlieferung, with the warning dublette (added when the first result had none). validation: unknown hash, no pages, more than 20
inbox.settings (query) {} {dubletten: "ablehnen" | "zulassen"} (default ablehnen)
inbox.set_settings {dubletten} as the query
inbox.list (query) Listenabfrage Liste of Vorgangszeile; text zeile; date erstellt_am; categorical zustand; sortable erstellt_am, betrag, zustand; CSV yes. A row with an open Rückfrage carries question: {question_id, kind, answers, command}: its answer codes and the Command that answers it (question.answer, or the Command that takes the details, such as bank_transaction.clarify); case.get names the same command per question
inbox.count (query) {} {offen, rueckfragen}: Vorgänge neither gebucht nor erledigt_ohne_buchung, and of those the ones with an open Rückfrage (the count in the navigation, amber when rueckfragen > 0)
case.get (query) {vorgang_id} Vorgang
beleg.get (query) {beleg_id} Beleg
beleg.list (query) Listenabfrage Liste of Belegzeile; text aussteller, rechnungsnummer, nummer; date eingang_am; categorical status (gebucht, ohne_buchung, erledigt, abgelegt) and belegart; sortable eingang_am, belegdatum, brutto, nummer; CSV yes. The tab “Ohne Buchung” is filter: {status: ["ohne_buchung"]}
beleg_data.correct {beleg_id, belegdaten: BelegdatenEingabe, clear?: [field], korrektur_buchen?: bool}; Begründung in the envelope (begruendung) {belegdaten_id, storno_id, buchung_id}: a new Belegdaten record (the earlier stays readable). A field left out or null keeps its recorded value and state; clear names the fields to remove (a field both given and cleared is validation); rows replace the lines as a whole, a line without any amount keeps the recorded amounts (same number of lines); another leistungsdatum drops the recorded period; new rows without brutto keep the recorded total only if they make it. On a gebuchter Vorgang it is refused with conflict (the Korrektur must be confirmed) unless korrektur_buchen: true; then it also posts the Storno and the new Buchung from the corrected values with the Kategorien and “Wie bezahlt?” of the booked capture (storno_id, buchung_id set, else null)
case.resolve_without_buchung {vorgang_id, grund, notiz?}; grund: kein_geschaeftsvorfall, privat, doppelt, kein_beleg, sonstiges (notiz required with sonstiges) {vorgang_id, zustand: "erledigt_ohne_buchung"} (“Nicht relevant”, “Ohne Buchung erledigen”). validation without grund; conflict on a gebuchter Vorgang (korrigieren first)
beleg.assign {beleg_id, buchung_id} {beleg_id, buchung_id}: the Beleg becomes further evidence of the Buchung (“Zu einer Buchung hinzufügen”); its own Vorgang is closed erledigt_ohne_buchung with grund weiterer_beleg. No second Buchung
beleg.merge {beleg_ids: [a, b, ...]} (2 or more, in page order) {beleg_id, vorgang_id}: a new Beleg with the pages of all, naming those it replaces (ersetzt); both stay, their Vorgänge are closed with grund zusammengefuehrt. conflict when one is booked
question.answer {question_id, answer, inputs?}; answer one of the Rückfrage’s antworten[].code; inputs a list [{field, value}], one per input of the chosen answer’s choices[].inputs[].field (each field once; the earlier map {field: value} is still read) {rueckfrage_id, vorgang_id, zustand, buchung_id}. For “Ist das derselbe Beleg?”: derselbe closes the Vorgang erledigt_ohne_buchung (grund doppelt); nicht_derselbe returns it to vorgeschlagen and books at once when the Vorschlag is complete (buchung_id set; the toast “Rückgängig” is buchung.storno), else to gelesen or neu. conflict when the Rückfrage is not offen
question.groups (query) {} {groups: [{kind, question, issuer, answers: [{code, text}], count, total, without_total, items: [{question_id, case_id, seen, line, amount, currency}]}]}: two or more open questions one answer fits (same kind, issuer, facts and answers), the largest first; total in EUR, without_total the items not in it. A question that needs a look at its Beleg is in none
command.batch {command, items: [{payload, seen?, rationale?, idempotency_key?}]}, 1 to 100 items, at most 256 KiB (ADR 0056) {batch_id, done, not_done, results: [{position, status, batch_id?, replayed?, result?, code?, detail?, next_step?, next_command?}], shared_warnings: [{code, text, positions}]}, one result per item in order; status done, needs_human, refused, not_run; result the ids and state of the item’s result. Each item runs as a Command of its own (rights, Freigaberichtlinie, limit, log entry, transaction). A right the batch itself needs is refused as a whole. seen (of the row in inbox.list or question.groups) is required of a person for buchung.record and question.answer; conflict when it changed, also while another batch of the Mandant runs. command: question.answer (one group of question.groups, one answer), buchung.record (a proposal unchanged), bank_transaction.assign (the unambiguous match), confirmation.accept, confirmation.reject; any other, and a batch by a Regel, is not_allowed; a batch out of its limits is validation. dry_run: output holds the same answer, nothing ran. The items stand in history.list with batch_id (filter)
question.withdraw {rueckfrage_id} {rueckfrage_id, vorgang_id, zustand: "zurueckgezogen"}

Shapes:

  • Feld<T> = {wert: T, zustand: "gelesen" | "bitte_pruefen"}.
  • Belegdaten (one record) = {id, beleg_id, quelle: "person" | "port" | "struktur", erfasst_von (Actor), erfasst_am, begruendung, ersetzt (id of the record it corrects, or null), felder}, with felder = {belegart?: Feld<Belegart>, aussteller?: Feld<string>, belegdatum?: Feld<date>, leistungsdatum?: Feld<date>, rechnungsnummer?: Feld<string>, brutto?: Feld<decimal>, zeilen?: [{kategorie?: Feld<string>, netto?: Feld<decimal>, steuersatz?: Feld<decimal>, steuer?: Feld<decimal>, brutto?: Feld<decimal>}]}. A field absent from felder was not read.
  • BelegdatenEingabe (what a person or caller types) = {belegart?, aussteller?, belegdatum?, leistungsdatum?, rechnungsnummer?, rechnung_erhalten_am?, brutto?, zeilen?: [{kategorie?, netto?, steuersatz?, steuer?, brutto?}]} with plain values; stored with zustand: "gelesen". rechnung_erhalten_am (the day the invoice reached the Unternehmer) is kept with the capture, not in the record; a Vorsteuer key needs it when Belegdatum and Eingang in Decuma lie in different months.
  • Belegart: rechnung, kleinbetragsrechnung, fahrausweis, vertrag, sonstiges; an Eigenbeleg has eigenbeleg; a bank file kontoauszug; the Belege of a household (Privat 1) lohnsteuerbescheinigung, versicherungsbescheinigung, spendenquittung, handwerkerrechnung, mietunterlage, rentenbescheinigung, betriebsunterlage.
  • Beleg = {beleg_id, nummer, identitaet, eingang_am, seiten: [{hash, medientyp, groesse}], eigenbeleg: Eigenbeleg | null, dublette_von, ersetzt: [beleg_id], vorgang_id, belegdaten: Belegdaten | null (the current record), verlauf: [Belegdaten] (newest first), buchungen: [buchung_id]}; identitaet is the SHA-256 over the ordered page hashes.
  • Eigenbeleg = {nummer, datum, betrag, empfaenger, zweck, aussteller, begruendung}, written by the product; aussteller names the Actor.
  • Vorgang = {vorgang_id, zustand, erstellt_am, erstellt_von (Actor), belege: [Beleg] (its own and the further Belege of its Buchungen), vorschlag: Vorschlag | null ({satz, erfassung, grund?, herkunft?}; herkunftper line{quelle: gelesen | entscheidung (with gruende, reason codes) | gewaehlt | as_booked (the one Kategorie persons booked for the issuer before)}where the decision port proposed a Kategorie or the person chose one from a Rückfragekategorie_waehlen(one per uncertain line, whose answers are Kategorie keys with their sentence; an invoice without German tax alsoother_supply, none of them, and seat_change, the presumed seat is wrong; bezug.seat_question: the answer decides the issuer's seat, only a person answers or withdraws it, a program's answer is kept as proposed); a case in state rueckfragecan have avorschlagmade beside its question; a program'sbuchung.recordof a proposal as booked before or with a key whose tax the recipient owes isneeds_human; grund is written from it in the reader's language; ADR 0045), rueckfragen: [Rueckfrage], buchungen: [{buchung_id, nummer, storno_id}], gebucht_von (Actor or null), gebucht_am, erledigt: {grund, notiz} | null (grundalsoweiterer_belegandzusammengefuehrt), naechster_schritt: {code, text}, umsatz_id (the Bankumsatz of a Rückfrage bankumsatz_ohne_beleg, section Books 2, else null)}; naechster_schritt.code: erfassen (neu), pruefen (gelesen), buchen (vorgeschlagen), beantworten (rueckfrage), korrigieren (gebucht), keiner.
  • Vorschlag = {satz, erfassung: Erfassung}: satz is the sentence; “Passt, buchen” sends erfassung (with the person’s changes and “Wie bezahlt?”) to buchung.record. Konto and Steuerschlüssel of each line follow from its Kategorie (category.list) for the Profi-Ansicht.
  • Rueckfrage = {rueckfrage_id, art, frage, antworten: [{code, text}], zustand: "offen" | "beantwortet" | "zurueckgezogen", antwort, andere_beleg_id}; art dublette_inhalt (“Ist das derselbe Beleg?”; andere_beleg_id is the other document for the side-by-side view).
  • Vorgangszeile = {vorgang_id, zustand, zeile, betrag, naechster_schritt, erstellt_am, rueckfrage_offen, beleg_ids, erstellt_von}; zeile is one line (Aussteller and Belegdatum, or “Beleg vom ”).
  • Belegzeile = {beleg_id, nummer, eingang_am, belegart, aussteller, belegdatum, rechnungsnummer, brutto, status, warum_offen, naechste_schritte: [code], vorgang_id, buchung_ids} (“Buchen”: buchung.record; “Zu einer Buchung hinzufügen”: beleg.assign; “Nicht relevant”: case.resolve_without_buchung); warum_offen for ohne_buchung: noch_nicht_erfasst, rueckfrage_offen, vorschlag_wartet; naechste_schritte codes buchen, zuordnen, nicht_relevant.
Name Payload Result and refusals
buchung.record (idempotent) Erfassung {buchung_id, nummer, vorgang_id, beleg_id, belegdaten_id, rueckfrage_id}: the Vorgang (created if absent), the Belegdaten record and the Buchung. A duplicate by content is not booked: buchung_id and nummer are null and rueckfrage_id names the Rückfrage “Ist das derselbe Beleg?” (the capture waits as the Vorschlag). Warnings amount_differs_from_beleg, amounts_inconsistent, counter_konto_missing, period_already_filed, filing_period_open, without_invoice. Refusals below
invoice_receipt.pending (query) {} {belege: [{beleg_id, aussteller, rechnungsnummer, belegdatum, leistungsdatum, eingang, vorschlag, vorsteuer_tag, zeitraum, naechster_schritt}]}: the Belege not booked whose Belegdatum and Eingang in Decuma lie in different months, so the day of receipt decides the period of the Vorsteuer (#141). vorschlag is the Belegdatum; naechster_schritt names the berichtigte Voranmeldung or the Jahreserklärung when zeitraum is transmitted
invoice_receipt.confirm (ledger_write) {belege: [{beleg_id, rechnung_erhalten_am, belegdatum?, leistungsdatum?}]} {belege: [{beleg_id, rechnung_erhalten_am, vorschlag_bestaetigt, vorsteuer_tag, zeitraum, naechster_schritt}]}: the person’s confirmation of the day of receipt, one or many Belege at once; buchung.record of such a Beleg takes it when rechnung_erhalten_am is absent. validation for a day outside Belegdatum and Eingang. Without the day buchung.record refuses with the next step Vorschlag: <Belegdatum>, das Belegdatum; ...
incoming_invoice.receive_amendment (ledger_write) {beleg_id, zugang, berichtigung_beleg_id?, belegdaten?} (each field of belegdaten given replaces the captured one, the others stay) {storno_id, buchung_id, rueckwirkend, vorsteuer_tag, zeitraum, naechster_schritt}: a Beleg captured with auf_berichtigung_warten: true (booked without Vorsteuer, Beleg.wartet_auf_berichtigung names what is missing) got its corrected invoice: Storno and a new Buchung with the Vorsteuer, in the original’s period when the original showed issuer, recipient, description, Entgelt and the separate tax, else from zugang. conflict for a Beleg that does not wait
buchung.post (idempotent) ManuelleBuchung {buchung_id, nummer}: the manual Buchung of the Profi-Ansicht (the form is the Entwurf; it becomes a Buchung by this Command). A Beleg is booked into the case it belongs to: with case_id and belege (or beleg_id in a capture), a Beleg of another case (or of none) named under a case that holds a Beleg of its own is refused (validation, next step: the Beleg’s own case); a case without a Beleg (a Bankumsatz whose Beleg follows) takes the Beleg that arrives. Warning open_bank_transaction_same_amount (never for a payroll line): an open Bankumsatz on the Konto of a Bankkonto the Buchung moves, with its amount and at most 5 days apart (the candidate rule of a payment recorded before): the payment it shows; text names its day and bank_transaction.assign with zahlung_buchung_id, so it is not booked twice; at most three, the nearest days first
buchung.storno (idempotent) {buchung_id} (Begründung in the envelope) {storno_id, nummer, vorgang_id, vorgang_zustand}: the full reversal as a Buchung of its own; its Vorgang returns to the state before the Buchung (“Rückgängig”). conflict for a second Storno (detail names the Storno’s number) and for reversing a Storno
buchung.correct (idempotent) {buchung_id, neu: {buchung: ManuelleBuchung} | {erfassung: Erfassung}} {storno_id, buchung_id}: Storno and replacement in one transaction; when the replacement is refused nothing is written
buchung.get (query) {buchung_id} Buchung
journal.list (query) Listenabfrage Liste of Buchung (each row also carries konto, the list of its Konten, and suchtext) plus {soll, haben, saldo} over every filtered row (the footer; with filter.konto the sums of those Konten’s lines). Text over text, amounts, Beleg numbers and Rechnungsnummern; date datum; categorical konto (any line), betrieb_id, art (buchung, storno); sortable nummer, datum; CSV yes (one row per Buchungszeile)
chart_of_accounts.get (query) {betrieb_id?, bis?} {kontenrahmen: {kennung, gueltig_ab, quelle_url, abgerufen_am}, klassen: [{klasse, bezeichnung, saldo, konten: [Konto]}]}; balances up to bis (default today), Soll minus Haben
konto.ledger_sheet (query) {konto, betrieb_id?, von?, bis?} {konto: Konto, anfangssaldo, zeilen: [{buchung_id, nummer, datum, text, gegenkonten, soll, haben, saldo, beleg_ids}], endsaldo}: the account sheet with the running balance
konto.create {betrieb_id?, nummer, art, bezeichnung} Konto. conflict: the number is a Konto of the Kontenrahmen or exists; validation: not four digits, or outside the Kontenklasse of its art
steuerschluessel.valid (query, public) {datum} {version, eintraege: [Steuerschluessel]}: the keys valid on the day, with label and source
category.list (query, public) {datum, richtung?: "ausgabe" | "einnahme"} {version, eintraege: [Kategorie]}

Shapes:

  • Erfassung = {beleg_id?, eigenbeleg?: {begruendung, empfaenger, zweck}, vorgang_id?, betrieb_id?, belegdaten: BelegdatenEingabe, erstattung?: bool, bezahlt?: "noch_offen" | "bank" | "bar" | "privat_ausgelegt", text?}. Exactly one of beleg_id (a document) and eigenbeleg (manual entry without a document; the product writes the Eigenbeleg with number, date, amount, recipient, purpose, author and Begründung). belegdaten.belegdatum is required. Every zeilen[] needs kategorie, one of netto and brutto, and steuersatz where the Kategorie has more than one Steuerschlüssel; steuer is computed to the cent (kaufmännisch gerundet) per invoice and rate: lines of the Beleg with the same key share the tax of their sum (Abschnitt 14.5 Abs. 20 UStAE). A typed steuer must equal that amount on own turnover and on tax the recipient owes; for Vorsteuer a lower typed amount is taken as stated, a higher one refused. A line may carry steuerschluessel (Profi-Ansicht) to override the Kategorie’s key. erstattung: true books the opposite sign, for keys without a Meldezeitraum only (the period of a refund is the day of the repayment, which the capture does not record). Without bezahlt the Buchung goes against Verbindlichkeiten (ausgabe) or Forderungen (einnahme) with the warning counter_konto_missing.
  • ManuelleBuchung = {betrieb_id?, datum, text, zeilen: [{konto, seite: "soll" | "haben", betrag, steuerschluessel?, betrag_ist?: "netto" | "brutto", steuer?, vorsteuer_abziehbar?: bool}], belege?: [beleg_id], eigenbeleg?: {begruendung, empfaenger, zweck}, leistungsdatum?, rechnung_erhalten_am?, vorgang_id?}. A line with a steuerschluessel is a base line: the handler adds the tax lines (Umsatzsteuer, Vorsteuer, both for reverse charge and Erwerb unless vorsteuer_abziehbar: false); the caller never names a tax Konto. Soll must equal Haben after that.
  • Buchung = {buchung_id, betrieb_id, nummer, datum, text, art: "buchung" | "storno", storno_von, storniert_durch, korrektur_von, korrigiert_durch, zeilen: [Buchungszeile], belege: [{beleg_id, nummer, rechnungsnummer}], vorgang_id, erstellt_am, actor, begruendung, soll, haben}; actor and begruendung come from the Command-Log.
  • Buchungszeile = {pos, konto, konto_bezeichnung, seite, betrag, steuerschluessel, steuerschluessel_version, rolle: "basis" | "steuer" | "vorsteuer" | "nicht_abziehbar" | null, meldedatum}; meldedatum is the day that decides the Meldezeitraum, by the rule of the key from the Belegdaten (never the Buchung date).
  • Konto = {nummer, bezeichnung, klasse, art: "aktiv" | "passiv" | "eigenkapital" | "ertrag" | "aufwand" | "steuer", posten, norm, steuerschluessel, eigenes, quelle_url, abgerufen_am, saldo}.
  • Steuerschluessel = {schluessel, bezeichnung, richtung: "ausgang" | "eingang", satz, behandlung, steuer_schuldet: "leistender" | "empfaenger" | null, konto_steuer, konto_vorsteuer, vorsteuer: bool, erklaerung_auch_kleinunternehmer, hinweis, meldezeitraum: "leistung" | "leistung_und_rechnung" | "rechnung_spaetestens_folgemonat" | "keine" | "offen", anzahlung_bei_zahlung: bool, zusammenfassende_meldung: bool, eigenbeleg_zulaessig: bool, norm, quelle_url, abgerufen_am}.
  • Konto = {nummer, bezeichnung, klasse, art: "aktiv" | "passiv" | "eigenkapital" | "ertrag" | "aufwand" | "steuer", posten, norm, steuerschluessel, eigenes, nummer_geprueft, quelle_url, abgerufen_am, saldo}; nummer_geprueft false: only the range of the number is documented.
  • Steuerschluessel = {schluessel, bezeichnung, richtung: "ausgang" | "eingang", satz, behandlung, steuer_schuldet: "leistender" | "empfaenger" | null, konto_steuer, konto_vorsteuer, vorsteuer: bool, erklaerung_auch_kleinunternehmer, hinweis, meldezeitraum: "leistung" | "leistung_und_rechnung" | "rechnung_spaetestens_folgemonat" | "keine" | "offen", anzahlung_bei_zahlung: bool, anzahlung_offen: bool, zeitraum_auch_bei_ist: bool, zusammenfassende_meldung: bool, eigenbeleg_zulaessig: bool, norm, quelle_url, abgerufen_am}.
  • Kategorie = {schluessel, satz, richtung, konto, steuerschluessel: {"<satz>": schluessel}, kb, quelle_url, abgerufen_am}; satz is the sentence the user sees; konto and steuerschluessel only in the Profi-Ansicht.

Refusals (detail and next_step in German and English):

Case Code next_step
Soll unequal Haben (detail names the difference and the side that is short) validation the side to correct
A Buchung without belege or eigenbeleg validation “Beleg angeben oder Eigenbeleg mit Begründung erstellen”
A Steuerschlüssel the kind of Beleg does not allow (a Vorsteuer key on an Eigenbeleg) validation lists the allowed keys
An Eigenbeleg without begruendung validation
A second Storno of a Buchung conflict names the Storno
A Journal, capture or Vorgang Command for a Mandant without a Betrieb not_allowed
A Kategorie or Steuerschlüssel not valid on the day; a Kategorie with several rates and no steuersatz validation lists what is valid
A date that decides the Meldezeitraum is missing (also rechnung_erhalten_am, see BelegdatenEingabe); an Eigenbeleg is no invoice and never supplies the Leistungsdatum validation the field to enter
A typed tax that does not fit the rate (see Erfassung) validation leave it out or correct it
A tax amount on a line of a key whose tax the recipient owes (§ 13b, Erwerb): the invoice shows tax, so the base is not determined (ADR 0039); next_step: leave it out if the invoice shows none, else file by hand validation
A key the Umsatzsteuer status of the day excludes: a Kleinunternehmer uses only keys without Vorsteuer and the § 13b and Erwerb keys (booked without deduction); Istversteuerung refuses own turnover with tax validation
erstattung with a key that has a Meldezeitraum; paid (bank, bar, privat_ausgelegt) before a Leistungsdatum after today (Anzahlung) validation

Warnings (warnungen, never blocking; the app shows each beside its field): amount_differs_from_beleg (an amount differs from the Belegdaten read by the port; text names the field and both values), amounts_inconsistent (net, tax and gross do not fit each other or the rate), counter_konto_missing, period_already_filed (a line’s deciding day lies in a transmitted Voranmeldungszeitraum: text names the Meldung and its Transferticket, and the Meldung reads berichtigung_noetig; a Buchung that touches no Kennzahl, such as a bank fee without Vorsteuer, needs no Berichtigung and does not warn), filing_period_open (a key whose reporting period no source settles; the line carries no meldedatum), without_invoice (an Eigenbeleg on a key whose tax the recipient owes: no Rechnung, the amount from the contract or an estimate; also on buchung.post), dublette.

mandant.readiness gains abzugeben and grund: [{meldung, abzugeben, grund, bereit, fehlend, naechster_schritt}]. abzugeben: false, with grund (one sentence, also in naechster_schritt) and an empty fehlend, for a Mandant without a Betrieb (no Unternehmer, § 2 Abs. 1 UStG) and for a Kleinunternehmer (§ 19 Abs. 1 Satz 2 UStG), unless the Journal holds tax under § 13b Abs. 5 UStG or for an innergemeinschaftlicher Erwerb (§ 18 Abs. 4a UStG; then abzugeben: true and grund says so).

decuma dev --seed muster-gmbh prints the line api-key <token>: the API-Schlüssel of the seed (Muster GmbH, Freigabeklasse ledger_write) for scripts and the SDK examples (SDKs); the database is thrown away on exit.

Route Use
PUT /dev/hinweisquelle/{hash} DECUMA_NOTICE_SOURCE=fake decuma dev: the Hinweise the fake provider proposes for a Beleg whose first page has this hash, {hinweise: [{titel, norm, vorschlag: {art, bezug?, werte}}]}
PUT /dev/lesung/{hash} DECUMA_READING=fake decuma dev: the answer of the OCR fake for a Beleg whose first page has this hash, {felder, outcome?}: felder in the shape of Belegdaten.felder, outcome a ReadingOutcome of the port (Ports and hooks)
GET /dev/lesung the readings the fake gave, oldest first: [{hash, felder}]

The Umsatzsteuer-Voranmeldung (issue #114, ADR 0025): computed from the Journal by the Formulardefinition, Freigabe bound to the hash, Übermittlung by hand in Mein ELSTER with the input sheet and the Transferticket, Festschreibung, Berichtigung, “extern abgegeben”, the Rückfrage about the Organkreis, the Sondervorauszahlung. Every name is Mandant-scoped unless marked “public”. Amounts are decimal strings, dates YYYY-MM-DD (days in the installation’s time zone). The Fristen (due dates, Dauerfristverlängerung, holidays) are the section “Filing 1: Fristen” below (ADR 0026); where a shape here carries frist it is that Frist, or null when no Fristen rule data cover the period.

A Meldung is named by one string, the route segment of the app: ustva-<jahr>-<mm> for a month (ustva-2026-12) and ustva-<jahr>-Q<n> for a quarter (ustva-2026-Q4), that is ustva- and the kennung of the Fristen part. Which form is valid follows from the Voranmeldungszeitraum of the master data valid on the first and the last day of the period; a name of the other kind, a period under befreit and a period without a Formulardefinition (2027 until its form is published) are refused with validation (detail says why, next_step where to change it). One Meldung per Unternehmer: a juristische Person and a Personengesellschaft over their Betrieb, a natürliche Person over all Betriebe of that Person; a Mandant whose Betriebe belong to two Personen is refused with not_allowed (one Steuernummer per Mandant only; open point).

Routes the app uses (prototype): #/steuern/fristen, #/steuern/meldungen, #/steuern/einstellungen, #/steuern/<meldung>, #/steuern/<meldung>/freigabe, #/steuern/meldungen/extern.

Name Payload Result
filing.get {meldung} Meldung, computed on every read (an Entwurf is stored nowhere)
filing.list Listenabfrage Liste of Meldungszeile plus naechster_schritt: Schritt (the most important step over all rows, also for the Startseite). Text over bezeichnung; date bis (end of the period); categorical jahr, zustand; sortable bis, betrag; CSV yes. Rows: every period from the first one with a Voranmeldungszeitraum in the master data and a Formulardefinition up to the period that contains today, plus every period with a Freigabe or Übermittlung; newest first
filing.input_sheet {meldung} Eingabeblatt of the newest Freigabe of the Meldung. conflict (next_step “erst freigeben”) when the Meldung has no Freigabe
form_definition.get (public) {meldungsart: "umsatzsteuer_voranmeldung", datum} {kennung, gueltig_ab, gueltig_bis, quelle_url, abgerufen_am, rundung: [Rundungsparameter], kennzahlen: [{schluessel, kennzahl, zeile, art, label, bezeichnung, quelle: Fundstelle, hinweis}], nicht_unterstuetzt: [{kennzahl, zeilen, bezeichnung, grund}]}: the definition valid on the day with its rounding parameters and the generated list of form lines it does not cover
tax.settings {} {voranmeldungszeitraum, besteuerungsart, kleinunternehmer, finanzamt, steuernummer, weg: "von_hand", organkreis: "offen" | "ja" | "nein", organkreis_ab, organkreis_bis, sondervorauszahlungen: [{jahr, betrag, angemeldet_am, abzug_in, erfasst_am}], unter_altem_wert: [{meldung, version, feld, damals, heute}]}: the sentences of Steuern > Einstellungen. unter_altem_wert lists transmitted Meldungen whose Voranmeldungszeitraum or Besteuerungsart (as stored with their Freigabe) differs from the value now valid for that period; a transmitted Meldung is never recomputed. The Dauerfristverlängerung line comes from the Fristen part
Name Payload Result and refusals
filing.release (Freigabeklasse filing, human Inhaber only) {meldung, hash, werte: {schluessel: wert}, geprueft: true, ohne_vorgaenge?: [vorgang_id], ohne_bankumsaetze?: [{umsatz_id, grund}]}; hash and werte are stand_hash and stand.werte of the Meldung the person saw; ohne_vorgaenge names every open Vorgang the person releases without; ohne_bankumsaetze (#141) every Bankumsatz of offene_bankumsaetze, each with the person’s reason {freigabe_id, meldung, version, hash}. Warning bankumsaetze_offen with their count on the Meldung while unresolved Bankumsätze of the period remain. Warning frist_expired on or after the day of the Frist (the consequence in the text), not on a Berichtigung. Refusals in this order: needs_human for an API-Schlüssel, a Regel or the Agent under any policy (next_step names #/steuern/<meldung>/freigabe); conflict while the Rückfrage about the Organkreis is open or answered “ja”; not_allowed for Istversteuerung or a Kleinunternehmer on the period (until Books 2; detail names the reason); conflict without a Steuernummer (next_step “Steuernummer in Konto > Unternehmen eintragen”); conflict when a check of the Formulardefinition fails (detail names the Kennzahl); conflict when this version is already übermittelt (next_step “Berichtigung prüfen und freigeben”); conflict when hash is not the hash computed now (detail names the Kennzahlen whose value differs from werte, next_step “Meldung neu ansehen und erneut freigeben”); conflict while open Vorgänge of the period are not all in ohne_vorgaenge (detail names them, next_step “erst klären oder ohne diese Vorgänge bestätigen”); conflict while an unresolved Bankumsatz of the period is not in ohne_bankumsaetze with a non-empty grund (next_step “erst klären oder ohne sie bestätigen, jeweils mit Grund”); validation without geprueft: true
elster.status (query; flag eric) {} {mode: "test" | "live", release, notice_url, certificate: {certificate_id, fingerprint, stored_at, valid_until, last_used_at, uses} | null, duties: [{code, text, met}]}
elster.certificate_set (person, second factor; flag eric) {content (base64), pin, password, notice_acknowledged} CertificateInfo; write-only, replaces an earlier one; opened once with the official library: a wrong PIN (validation) or an expired one (conflict) is refused
elster.certificate_remove (person, second factor; flag eric) {password} {certificate_id}
filing.attempts (query; flag eric) {meldung} {attempts: [{attempt_id, release_id, mode, outcome: "accepted" | "rejected" | "unknown" | "arrived" | "not_arrived", transferticket, extra, reason, started_at, dataset_sha256}]}; extra: accepted beside the one recorded for its version
filing.resolve_attempt (person, second factor; flag eric) {meldung, attempt_id, arrived, transferticket?} {attempt_id, outcome}; only for an unknown one, ten minutes after it started
filing.transmit (filing) {meldung, weg: "von_hand" | "eric" (flag), not_filed_by_hand?} with eric zustand is angenommen, abgelehnt, unknown (a person resolves it; every way is refused until then) or test_accepted (nothing is filed); an earlier accepted transmission that was not recorded is recorded instead, also when the Meldung no longer exists (eingabeblatt null). Every way asks again what the Freigabe asked (Organkreis, Steuernummer, checks). By hand: {uebermittlung_id, zustand: "begonnen", eingabeblatt: Eingabeblatt}: the way renders the input sheet; the Übermittlung waits for the Transferticket. conflict without a gültige Freigabe (next_step “erneut freigeben, neues Eingabeblatt verwenden” when it verfiel, else “erst freigeben”); validation for a way that does not exist
filing.mark_as_transmitted (filing) {meldung, transferticket} {uebermittlung_id, zustand: "angenommen", transferticket, uebermittelt_am}: uses up the Freigabe and festschreibt the period. transferticket is stored trimmed; empty is validation (no format check: the kb does not document the format). conflict when a value changed since the Freigabe (next_step “erneut freigeben, neues Eingabeblatt verwenden”); conflict without a begonnene Übermittlung (next_step “Eingabeblatt öffnen”); conflict when this version is already übermittelt (next_step “Berichtigung prüfen und freigeben”)
filing.record_external (filing) {meldung, uebermittelt_am, transferticket, werte: {kennzahl: wert}, protokoll?: hash}; werte keyed by the Kennzahlen of the form year (form_definition.get, entries with a kennzahl), euro fields without cents, tax fields with cents, minus for negative; protokoll a file stored through POST /v1/files {meldung, version, uebermittlung_id, abweichungen: [Abweichung]}: the Meldung is übermittelt on the way extern and its period festgeschrieben. The values are a record only and never used as computed values. Warning external_differs naming the Kennzahlen that differ from the values computed from the Journal. conflict when the period is already festgeschrieben (next_step “Berichtigung prüfen und freigeben”); validation for an unknown Kennzahl, a value in the wrong format or an uebermittelt_am after today
organkreis.answer {antwort: "ja" | "nein", ab?: date, bis?: date} {antwort, ab, bis, beantwortet_am}. “Gehört das Unternehmen zu einem Organkreis?” The Organkreis is a Stammdatum with dates (#141): ja needs ab (the first day it belongs), bis is the last day when it left; nein takes no dates. Answers from before carry no date and hold from the beginning. Per Voranmeldungszeitraum the dates decide: the whole period inside is ja (no Freigabe, the Organträger files), no day inside is nein (the business files), a period that straddles ab or bis is wechsel (Rückfrage: filed by hand, freigabe_fehlt organkreis_wechsel, filing.release refused with conflict). No role is asked; the product never files as the Organkreis. “Antwort ändern” sends the answer again
sondervorauszahlung.record (filing) {jahr, betrag, angemeldet_am, letzter_zeitraum?}; betrag in full euros as entered in the portal (Kennzahl 38); letzter_zeitraum (ustva-<jahr>-<mm>) only when the Dauerfristverlängerung ended during the year or the business stopped (Abschnitt 18.4 Abs. 5 Satz 4 and 5 UStAE) {id, jahr, betrag, abzug_in}: the record of a Sondervorauszahlung anmeldet in the portal; abzug_in is the Meldung that deducts it in Kennzahl 39, exactly once (December, else letzter_zeitraum). A later record of the same year replaces the earlier for the deduction (the Finanzamt may fix another amount, § 48 Abs. 3 UStDV); both stay. validation for a quarterly filer (§ 47 Abs. 1 Satz 1 UStDV), for a betrag with cents, and when the master data record no Dauerfristverlängerung for the deducting period (next_step “Dauerfristverlängerung in Steuern > Einstellungen eintragen”)
  • Meldung = {meldung, meldungsart: "umsatzsteuer_voranmeldung", bezeichnung, zeitraum: {von, bis, art: "monat" | "quartal"}, besteuerungsart, voranmeldungszeitraum, kleinunternehmer, steuernummer, zustand, version, berichtigte_anmeldung: bool, ergebnis: Kennzahlwert (Kennzahl 83, the one large number; negative is a refund), kennzahlen: [Kennzahlwert] (form order), pruefungen: [Pruefung], stand: Meldungsstand, stand_hash, formular: {kennung, gueltig_ab, quelle_url, abgerufen_am, rundung: [Rundungsparameter]}, regeln: [{art, kennung, gueltig_ab, quelle_url, abgerufen_am}] (Formulardefinition, Steuerschlüssel and Kontenrahmen versions used), offene_vorgaenge: [OffenerVorgang] (a Vorgang of a Bankumsatz without Beleg is not one: it counts in offene_bankumsaetze by its Buchungstag), offene_bankumsaetze: [{umsatz_id, buchungstag, betrag, zeile}] (#141: every Bankumsatz of the period with an open Rückfrage "ohne Beleg", and under Istversteuerung every incoming one not linked in full; effect on the Meldung unknown, each needs a reason at the Freigabe), freigabe: Freigabe | null, versionen: [Version], abweichungen: [Abweichung], organkreis: "offen" | "ja" | "nein" | "wechsel" (for this period, by the dates), freigabe_fehlt: Schritt | null, wege: [{weg: "von_hand" | "eric" (flag), bezeichnung, mode: "test" | "live" | null, refusal: text | null}], frist: Frist | null, naechster_schritt: Schritt, ohne_buchungen: bool, hinweise: [{code, text}]}. Every text of the Meldung, the list and the input sheet (bezeichnung, naechster_schritt, freigabe_fehlt, aktion, check texts, hinweise) is in the caller’s language; bezeichnung of a Kennzahl is the official German wording of the form.
    • zustand: entwurf (no gültige Freigabe of the current Meldungsstand), freigegeben (a gültige Freigabe; “freigegeben, noch nicht übermittelt”), uebermittelt (the newest version is übermittelt and the Journal gives the same values), berichtigung_noetig (übermittelt, and the Journal now gives other values: abweichungen has both), entfaellt (Organkreis “ja”: the figures stay visible, no Freigabe). An earlier version replaced by a transmitted Berichtigung reads berichtigt in versionen.
    • version: 1 for the first Meldung of the period; each accepted Übermittlung makes the next computation the next version, a Berichtigung with berichtigte_anmeldung: true (Kennzahl 10 = 1, set by the engine).
    • freigabe_fehlt: the one thing that keeps the button disabled, else null; codes organkreis_beantworten, organkreis_ja, books2, steuernummer_fehlt (href #/konto/unternehmen), pruefung_fehlgeschlagen, bereits_uebermittelt, vorgaenge_bestaetigen (only when offene_vorgaenge is not empty; the checkbox “ohne diese Vorgänge” settles it), bankumsaetze_bestaetigen (unresolved Bankumsätze of offene_bankumsaetze; each needs a reason), geprueft (the checkbox “Ich habe die Werte geprüft”; always last, the app clears it when ticked).
    • ohne_buchungen: the period has no Buchungszeile; the Meldung with zeros is offered like any other, and hinweise (code ohne_buchungen) says that it is due. Further codes: rundung_13b_vorsteuer and rundung_erwerb_vorsteuer (Kennzahl 67 or 61 differs from the declared tax, Kennzahl 47, 74, 85, or the tax of lines 25 and 26. Decided per declared field: with full Vorsteuerabzug proven from its lines, Kennzahl 67 and 61 take its declared tax, exakt keeps the booked Vorsteuer and buchungen its lines, and no Hinweis appears; the Hinweis comes only when the lines of a field’s keys booked as not deductible do not cancel out (a Storno in the same period cancels its original) or its booked Vorsteuer differs from its booked tax, and then the booked Vorsteuer of that field’s keys is taken. The text names both values and the difference; the Freigabe screen shows these next to the rules). No text carries a verification state (ADR 0039).
  • Kennzahlwert = {schluessel, kennzahl: string | null (null: a field of the form without a Kennzahl, such as the tax of line 13), zeile, art: "bemessungsgrundlage" | "steuer" | "vorsteuer" | "summe" | "angabe", label (key for the app's plain label), bezeichnung (the official wording), quelle: Fundstelle, einheit: "euro" | "cent", exakt, gemeldet, differenz (gemeldet minus exakt), buchungen: [Beitrag], betriebe: [{betrieb_id, bezeichnung, exakt}] (the contribution of each Betrieb; one entry for a GmbH), hinweis: string | null}. exakt is the cent-exact sum of the Buchungszeilen (for a computed tax the tax as booked), gemeldet the value after the rounding of the definition; for a sum both are sums of reported values.
  • Beitrag = {buchung_id, nummer, datum, text, pos, konto, steuerschluessel, rolle, betrag (signed, as it enters the Kennzahl), meldedatum, betrieb_id, beleg_ids}: the drill-down; “a Buchung opens over the Meldung” is buchung.get.
  • Fundstelle = {text, url, abgerufen_am} (e.g. “Vordruck USt 1 A 2026, Zeile 13”).
  • Rundungsparameter = {name, wert, quelle: Fundstelle}: bemessungsgrundlage (kaufmaennisch or abschneiden), steuer_basis (exakte_summe, the shipped value, or gerundete_bmg: rate times the full-euro Bemessungsgrundlage). Their verification state is internal (reservation list, ADR 0039).
  • Pruefung = {code, kennzahl, ok, text}; a failed one blocks the Freigabe. Codes: summe (a sum line), vorzeichen (a field that cannot be negative), zeitraum_offen (lines of a key whose Meldezeitraum no source settles, posted in this period; no key of the 2026 rule data has one since Kennzahl 45 and 60 follow the Leistungsausführung), kz70_datum (the turnover that crossed the Kleinunternehmer limit was performed on another day than it was received: which day is the date of Kennzahl 70 is not settled, ADR 0039), ueberzahlung (an open Rückfrage ueberzahlung of a Bankumsatz in the period whose Rechnung has a line without own tax and with a Kennzahl, e.g. Kz 41: the period of that excess is not settled; the person decides first, ADR 0039; the excess of taxable revenue is computed and blocks nothing). A later Meldung of the year of a change from the Kleinunternehmer status is computed as any other; whether it repeats Kennzahl 70 is the setting kz70_folgemeldungen of the Formulardefinition (2026: nicht_wiederholen), never a block.
  • Meldungsstand = what would be transmitted, hashed as the Meldungsstand format says: {v: 1, meldungsart, formular: {kennung, gueltig_ab}, steuernummer, zeitraum, version, werte: {schluessel: wert}}.
  • OffenerVorgang = {vorgang_id, zustand, zeile, belegdatum, wirkung: {zahllast} | null}: a Vorgang neither gebucht nor erledigt_ohne_buchung whose Belegdatum (else the day it arrived) lies in the period; wirkung is its estimated effect on Kennzahl 83 where Belegdaten with Kategorien exist (an estimate, not a value of the Meldung). The screen links “Erst klären” to #/eingang/<vorgang_id>.
  • Freigabe = {freigabe_id, version, hash, zustand: "gueltig" | "verbraucht" | "verfallen", von (Actor), am, ohne_vorgaenge, uebermittlung: Uebermittlung | null}. verfallen: the Meldungsstand computed now has another hash (the Meldung is an Entwurf again; the input sheet is outdated). verbraucht: an Übermittlung was accepted.
  • Uebermittlung = {uebermittlung_id, weg: "von_hand" | "extern", zustand: "begonnen" | "angenommen" | "abgelehnt", begonnen_am, transferticket, uebermittelt_am, grund}.
  • Version = {version, weg, transferticket, uebermittelt_am, zustand: "uebermittelt" | "berichtigt", werte: {schluessel: wert}, protokoll: hash | null}: every transmitted version stays readable.
  • Abweichung = {schluessel, kennzahl, uebermittelt, berechnet}.
  • Eingabeblatt = {meldung, version, hash, freigabe_id, steuernummer, zeitraum: {von, bis, bezeichnung}, berichtigte_anmeldung: bool, veraltet: bool, zeilen: [{zeile, kennzahl, label, bezeichnung, wert, wert_roh, art, eingeben}]} in the line order of the official form; wert as the form expects it (full euros without cents for a Bemessungsgrundlage, two decimals with a comma otherwise, minus for negative), wert_roh the decimal string. Only fields with a value (a field without one stays empty, never 0), and Kennzahl 83 always; in a Berichtigung a Kennzahl the corrected version carried that is now zero is listed with 0 (the only Nullwert); Kennzahl 10 is the row “Berichtigte Anmeldung: 1” of a Berichtigung. eingeben: false for a field without a Kennzahl (the tax of lines 13, 14, 25, 26 and lines 37, 45, 48): the record does not carry it, the sheet shows it as “Kontrollwert, nicht eintragen” without a copy button. veraltet: true when the Freigabe verfiel: the screen says the sheet is outdated. The print view is HTML in the app; no PDF.
  • Meldungszeile = {meldung, bezeichnung, jahr, von, bis, zustand, version, betrag (Kennzahl 83: transmitted value when übermittelt, else computed), frist: Frist | null, transferticket, uebermittelt_am, aktion: Schritt}.
  • Schritt = {code, text, href}. Codes of naechster_schritt of a Meldung, in this order: organkreis_beantworten, vorgaenge_klaeren (with their effect in text), bankumsaetze_klaeren (unresolved Bankumsätze of the period, effect unknown; the state is never plain freigeben with them; href #/ausgaben/zahlungen), pruefung_fehlgeschlagen, books2, steuernummer_fehlt, freigeben (“bereit zur Freigabe”), uebermitteln (“freigegeben, noch nicht übermittelt”: to the input sheet), berichtigen (“Berichtigung nötig”; when the tax owed rises, the text says the correction is due without delay, § 153 Abs. 1 AO), zahlen (übermittelt: amount and date to pay) or erstattung (übermittelt with a negative Kennzahl 83), keiner (entfällt).
  • Frist: the shape of section “Filing 1: Fristen”.
  • period_already_filed on buchung.record, buchung.post, buchung.storno, buchung.correct, beleg_data.correct: a line’s deciding day lies in a festgeschriebener period; text names the period and the Transferticket.
  • frist_expired on filing.release when frist.lage is heute or abgelaufen and no version of the period is transmitted yet (a Berichtigung is due without delay, § 153 Abs. 1 AO, not late); text is frist.folge; nothing is blocked.
  • external_differs on filing.record_external.

No fake of the official library ships. The second implementation of the port (Uebermittlungsweg) lives in the test harness only; it is never offered by meldung.lesen.wege.

The Fristen of the Umsatzsteuer-Voranmeldung (issue #114, ADR 0026). Computed on every read from the rule data (regelwerk/frist-*.toml), the master data valid on the date and the instance clock; nothing is stored, no Event is emitted. Mandant-scoped. Dates YYYY-MM-DD.

master_data.set_from gains two fields with a valid-from date (gueltig_ab), and master_data.valid and master_data.history return them:

  • dauerfristverlaengerung: true or false. Steuern > Einstellungen shows it as one yes or no with a year and sends gueltig_ab = 1 January of that year; any other first day of a Voranmeldungszeitraum is accepted (a Verzicht during the year). A period uses the value valid on its first day.
  • finanzamt_land: the Land of the Finanzamt, one of BW, BY, BE, BB, HB, HH, HE, MV, NI, NW, RP, SL, SN, ST, SH, TH. Its public holidays move the Frist (§ 108 Abs. 3 AO). Shown beside the Finanzamt on Steuern > Einstellungen and on the company card. Without it every Frist is marked ohne_feiertagspruefung.
  • bundesfinanzamtsnummer: four digits of a Finanzamt in tax_office.list (query, {} -> {tax_offices: [{bufa_number, name, test}]}: the Finanzämter supported by ELSTER in the exact wording, test Finanzämter marked; rule data verwaltung finanzaemter); another number is refused. Steuern > Einstellungen offers the list (test Finanzämter left out) and shows the name. A 13-digit Steuernummer whose first four digits are not in the list is refused too.

The Voranmeldungszeitraum of a period is the value valid on its first day; a change with a valid-from date changes only the periods from that date.

Name Payload Result
frist.list (query) {jahr?} (default: the year of today) {jahr, fristen: [Frist]}: one Frist per Voranmeldungszeitraum that begins in jahr, in date order, and for a household with an Einkommensteuererklärung of the Veranlagungsjahr jahr its Frist (meldungsart einkommensteuer, zeitraum.kennung the year, zahlung_bis null: the payment follows the Bescheid; Privat 1). The yearly returns of the year by Rechtsform (kb fristen/jahreserklaerungen-nach-rechtsform.md): umsatzsteuererklaerung (not for a Kleinunternehmer), koerperschaftsteuererklaerung and gewerbesteuererklaerung (Kapitalgesellschaft), feststellungserklaerung (Personengesellschaft), einkommensteuer (natürliche Person with a Betrieb and no Einkommensteuererklärung of the year), gewerbesteuererklaerung of a gewerbliche Personengesellschaft or Einzelunternehmer when the gewerbeertrag of the year (master_data.set_from, valid from 1 January) exceeds the limit of § 25 Abs. 1 GewStDV or fehlbetrag_festgestellt; conditional: true while either is unknown; a return the Finanzamt asked for (requested_returns of the year, master_data.set_from valid from 1 January; § 149 Abs. 1 Satz 2 AO, § 25 Abs. 1 Nr. 7 GewStDV) is listed and due whatever the limits say; anlagen names Anlage G, S and EÜR, which have no Frist of their own. An Ende der Tätigkeit in the year (betrieb.set_activity) makes the Umsatzsteuererklärung due one month after it (§ 149 Abs. 5 AO). A fact not recorded (taetigkeitsart; for a Verein steuerbeguenstigt, wirtschaftlicher_geschaeftsbetrieb_receipts, unternehmer) is a warning annual_return_question in warnings (with next_command the Command that states it), never an omission; it replaces the former field questions. Months without a Voranmeldungszeitraum or with befreit yield none (mandant.readiness names the missing value). not_found when a period of the year has no Fristen rule data (rule data exist from 2026)

Frist = {meldungsart: "umsatzsteuer_voranmeldung", zeitraum: {von, bis, kennung}, dauerfristverlaengerung, abgabe_bis, zahlung_bis, schonfrist_bis, verschoben: [{datum, grund: "sonnabend" | "sonntag" | "feiertag", feiertag}], feiertagspruefung: "landesfeiertage" | "ohne_feiertagspruefung" | "bundesfeiertage", hinweis, lage: "offen" | "heute" | "abgelaufen", tage, folge, norm, quelle_url}:

  • zeitraum.kennung: 2026-12 for a month, 2026-Q4 for a quarter.
  • abgabe_bis (filing) and zahlung_bis (payment): the last day, after the shift. verschoben lists every day the end moved past (empty when it did not move); feiertag is the holiday’s name or null.
  • feiertagspruefung: landesfeiertage when the statewide holidays of finanzamt_land were applied; ohne_feiertagspruefung when the Land is not set or the date lies outside the holiday rule data (2026 and 2027). hinweis is the tooltip text for the mark, in the caller’s language, always set: what was and was not checked (holidays of single municipalities, one-off holidays by ordinance, the payment counted at the seat of the Finanzamt).
  • lage against today: heute on the day of the Frist, abgelaufen after it. tage: days from today to abgabe_bis (negative when passed). With a Dauerfristverlängerung whose start has two candidate days (ADR 0026, amended 2026-11-24), abgabe_bis and zahlung_bis are the earlier end, while lage, folge, frist_expired and tage after the earlier end judge by the later one. folge: with heute or abgelaufen the one sentence with the consequence (from the rule data, caller’s language); null when offen, and null in filing.get and filing.list for a period with a transmitted version (a Berichtigung is due without delay, not late; § 153 Abs. 1 AO). The Fristen screen shows it as the line under the Frist unless the period has a Transferticket; nothing is blocked.
  • The Meldung engine takes the same Frist from decuma_mandant::fristen::frist_der_meldung(ctx, meldungsart, Zeitraum {von, bis}).
  • lage says nothing about the state of the Meldung; Steuern > Fristen combines it with the state from the Meldung queries.
  • voranmeldungszeitraum.proposal (query) {jahr?, taetigkeit_beginn?, steuer} -> {jahr, voranmeldungszeitraum: "monat" | "quartal", grund}; voranmeldungszeitraum.check {} -> {rueckfrage_id | null}, one Rückfrage of art voranmeldungszeitraum with the answers finanzamt_vierteljaehrlich and wird_geaendert (both keep the stated period). master_data.set_from takes steuer_vorjahr (Euro, from 1 January of the year it decides). Onboarding: “Weiß ich noch nicht” asks the Tätigkeitsbeginn and the tax and takes the proposal.

Issue #127, ADR 0034. Mandant-scoped; the shapes are in the OpenAPI document. Meldung names zm-2026-Q4 (a quarter) and zm-2026-05 (a month, or the months reported together after the crossing of the limit); the name is read without regard to case.

Name Payload Result
zusammenfassende_meldung.get (query) {meldung} Zusammenfassende: zeilen (one per USt-IdNr. and kind L, S, D with exakt, betrag in full euros, bestaetigt, posten with the Buchungen), summe, ohne_ustid, meldezeilen (what this version transmits), abgleich, stand and stand_hash, frist, erkannt_am and berichtigung_bis of a Berichtigung, freigabe, freigabe_fehlt, uebermittelt, wege (as of a Meldung), begun_by_hand, naechster_schritt. Warnings ust_idnr_not_confirmed, threshold_exceeded; with the flag eric accepted_twice, transmission_unknown, transmission_not_recorded (notices of a Meldung too). not_allowed for a Kleinunternehmer; validation for a period without a reportable turnover
zusammenfassende_meldung.release {meldung, hash, geprueft} {freigabe_id, meldung, version, hash}; human of the Mandant, second factor. conflict while a turnover has no USt-IdNr. (“USt-IdNr. beim Kunden eintragen”), while the lines differ from a transmitted Voranmeldung of the quarter (names Voranmeldung, Kennzahl and Buchungen; “Buchungen korrigieren oder die Voranmeldung dieses Zeitraums berichtigen”), without the Mandant’s USt-IdNr., for a version already transmitted. Warning frist_expired
zusammenfassende_meldung.input_sheet (query) {meldung} {meldung, version, hash, freigabe_id, veraltet, ust_idnr, zeitraum, berichtigung, zeilen: [{ust_idnr, art, betrag}]}
zusammenfassende_meldung.transmit {meldung, weg?: "von_hand" | "eric" (flag), not_filed_by_hand?} {uebermittlung_id, state, transferticket, reason, eingabeblatt}: by hand begonnen, waits for the Transferticket; with eric as filing.transmit
zusammenfassende_meldung.mark_as_transmitted {meldung, transferticket} {uebermittlung_id, version, transferticket, uebermittelt_am}
zusammenfassende_meldung.record_external {meldung, uebermittelt_am, transferticket, zeilen: [{ust_idnr, art, betrag}]} {meldung, version, uebermittlung_id, abweichungen}; warning external_differs
zusammenfassende_meldung.file, filing.file (queries) {meldung} {dateien: [{name, inhalt}]}; conflict “erst freigeben” for a Meldung that is not released, conflict “von Hand übertragen” for a form year without a confirmed format (every year for now)

filing.list lists the Zusammenfassende Meldungen beside the Voranmeldungen (betrag the sum of the lines, no payment). frist.list adds their Fristen (meldungsart zusammenfassende_meldung, zahlung_bis null, feiertagspruefung bundesfeiertage); every Frist has schonfrist_bis (the Voranmeldung: the last day of the Schonfrist of a payment by transfer, § 240 Abs. 3 AO; null otherwise). Screens: #/steuern/zm-2026-q4 (lines grouped by kind, each opening its Buchungen) and #/steuern/zm-2026-q4/freigabe (lines and hash, the way by hand, the input sheet with “Kopieren”, the Transferticket).

Bankkonten, mapping profiles, the import of bank statement files and the delivery of Bankumsätze through the API (issue #115, first block; ADR 0027). Mandant-scoped; every name refuses a Mandant without a Betrieb with not_allowed. Amounts are decimal strings with sign where they are Bankumsätze ("-200.00" is a debit), dates YYYY-MM-DD.

Name Payload Result and refusals
bank_account.create {betrieb_id?, name, iban, konto?, anfangssaldo, eroeffnet_am}; konto a Konto of the Kontenplan of kind aktiv (default 1800); eroeffnet_am the first day whose Bankumsätze Decuma holds (no line before it can be imported), not the day the bank opened the account: when the books start mid-year, the day of the first statement line kept here; anfangssaldo the statement balance at the start of that day (the closing balance of the day before) Bankkonto. The opening balance is a figure of the Bankkonto and is not booked: no rule books the opening value of one Konto mid-year (opening values of the books come as a whole, from the previous books, with the migration). Warnings: opening_balance_not_posted with the difference between the Konto’s Buchungen before eroeffnet_am and anfangssaldo (none when they agree); for a Bilanz and an eroeffnet_am other than 1 January also a Rückfrage anfangssaldo in the Eingang with the answers konto_neu (refused while the difference is not 0.00), jahr_ab_beginn, salden_uebernehmen (ja-wechsel-015 to -017); konto_shared when another open Bankkonto of the Betrieb posts to the same Konto (its balance can no longer be compared with one statement; offer: an own Konto per Bankkonto, konto.create, then bank_account.update). A Buchung whose lines other than a Saldenvortrag (9000 ff.) are only Bankkonto Konten is refused (validation): the balances at a cut-off date are taken over in one Buchung of all Konten. conflict: an open Bankkonto with this IBAN exists; validation: IBAN not of the form two letters, two characters, 11 to 30 letters or digits; Konto unknown or not aktiv
bank_account.update {bankkonto_id, name?, iban?, konto?, profil_id?, anfangssaldo?, eroeffnet_am?} Bankkonto. conflict for anfangssaldo or eroeffnet_am once a Bankumsatz exists, and for a closed Bankkonto
bank_account.close {bankkonto_id, geschlossen_am} Bankkonto. Lines booked after geschlossen_am are refused from then on (conflict). conflict when closed already
bank_account.list (query) {} {bankkonten: [Bankkonto], wege: [{code, text}]}; wege are the ways bank data arrives in this build: datei_import and api. Konto > Unternehmen > Bank shows exactly these
bank_profile.list (query) {} [Bankprofil]: the example profile shipped with the build (beispiel: true, fixed id) first, then the Mandant’s own
bank_profile.create {name, profil: Profil} Bankprofil. “Kopieren” is bank_profile.create with the profil of another one. validation: a column number below 1, an unknown format
bank_profile.update {profil_id, name?, profil?} Bankprofil. conflict for the example profile (copy it first)

Shapes:

  • Bankkonto = {bankkonto_id, betrieb_id, name, iban, konto, anfangssaldo, eroeffnet_am, profil_id, geschlossen_am, saldo: Saldo, saldo_nicht_geprueft: [{einlieferung_id, von, bis}]}; saldo_nicht_geprueft lists imports without a balance check until their closing balance is entered; saldo is the balance after the last Bankumsatz held (datum its booking day; eroeffnet_am and anfangssaldo while there is none); profil_id the profile remembered for CSV files.
  • Saldo = {betrag, datum}.
  • Bankprofil = {profil_id, name, beispiel, profil: Profil}.
  • Profil = {trennzeichen, kodierung: "utf-8" | "iso-8859-1" | "windows-1252", kopfzeilen, ueberschriften | ohne_ueberschriften: true, fusszeilen, datumsformat: one of DATUMSFORMATEincrates/decuma-buchhaltung/src/bankformat.rs: "TT.MM.JJJJ", "JJJJ-MM-TT", "TT.MM.JJ", "TT-MM-JJJJ", "TT-MM-JJ", "TT/MM/JJJJ", "TT/MM/JJ", "JJJJ/MM/TT", "JJJJ.MM.TT", "MM/TT/JJJJ" (TT day, MM month, JJ/JJJJ year); an unknown one is validation naming them, dezimaltrenner: "," | ".", tausendertrenner?, spalten: {buchungstag, valuta?, betrag, saldo, name?, iban?, verwendungszweck?}, vorzeichen: {art: "im_betrag"} | {art: "kennzeichen", spalte, soll, haben}}. Columns count from 1. kopfzeilen and fusszeilen are lines skipped at the start and the end. ueberschriften, when given, are the headings of the last skipped line word for word; a file with other headings is refused. A date is read exactly in the format named (JJ is 2000 to 2099); a thousands separator stands only before groups of three digits. saldo is the column with the balance after each line: a CSV file names no opening and closing balance otherwise, and the continuity check needs them. Rows may run oldest or newest first.
Name Payload Result and refusals
bank_file.import (idempotent) {bankkonto_id, inhalt, profil_id?, kodierung?, ueberschriften_uebernehmen?, endsaldo?}; inhalt the file, base64 (not written to the Command-Log); profil_id for a CSV file, remembered on the Bankkonto when the import succeeds; kodierung the encoding of an MT940 file (default UTF-8 if valid, else ISO 8859-1; as given, a byte invalid in it refuses the file) Import. The file is stored unchanged, recorded as an Einlieferung over the Kanal datei_import and kept as a Beleg of the kind kontoauszug (status abgelegt; the same file again reuses its Beleg). Formats: camt.053.001.08 (by its namespace), MT940 (by :20: and :60F:/:60M:), else CSV by the profile given or remembered
bank_transaction.deliver (idempotent) `{bankkonto_id, anfangssaldo?: Saldo, endsaldo?: Saldo, umsaetze: [{buchungstag, valuta?, betrag, name?, iban?, verwendungszweck?, bankreferenz?}], source?: “api” “fetch”, bookkeeping_start?}(both balances or neither; without them the lines are read without a balance check, warningsaldo_nicht_geprueft, and a fetched line equal to a held one is that line); the Idempotency-Key` header makes a repeated call return the first result
bank_transaction.fetch (idempotent) {bank_account_id, first_day, last_day} (booking days, inclusive) Import with format: "api": the statement of the bank connection (ADR 0051) for the Bankkonto’s IBAN, checked and kept exactly as bank_transaction.deliver. validation for a statement in another currency than EUR; conflict when the connection does not answer; not_allowed without a bank connection (next step: the file import)
bank_connection.accounts (query) {} [{iban, name, currency}]: the accounts the bank connection offers; refusals as for bank_transaction.fetch
bank_connection.start (Verwaltung) {aspsp_name, aspsp_country, psu_type: "business" | "personal", renews?} {bank_connection_id, url, state_expires_at}: a Bankzugang (ADR 0058) in state pending; the account holder opens url and confirms at the bank within 30 minutes. url is not written to the Command-Log. renews: a Bankzugang of the Mandant in any state, superseded when this one completes. not_allowed without a consent provider (next step: the file import); conflict without the instance key for secrets; validation for a country that is not two letters. The Agent may run it without asking (default policy)
bank_connection.complete {state, code} or {state, error} as the bank sent them back to {installation}/bank/callback; neither is written to the Command-Log {bank_connection_id, state, end_reason, valid_until, code_sha256, sync: SyncResult?}. Run by the person the bank sends back (a program gets needs_human), who manages the Mandant the state names (the state is <mandant_id>.<bank_connection_id>.<secret>, only its SHA-256 is stored). The state is single use: a second call is conflict and changes nothing. After 30 minutes, or with error, or when the provider refuses the code, the Bankzugang is failed (end_reason timeout, cancelled_at_bank: <code>, authorization_failed: <code>) and the result says so with the warning bank_connection_failed. Else it is active, the Bankzugang it renews superseded (its session ended), and the first sync runs. When every account is read through another active Bankzugang already, it ends failed with already_connected
bank_connection.sync (Verwaltung) {id} SyncResult. Binds the accounts the session offers and reads each bound Bankkonto: the first time all history the bank gives, later from 7 days before its last delivered day to today; every statement goes through bank_transaction.deliver (known lines skipped). Lines before the bookkeeping start (the first day of the Mandant’s first period here: the start of the year it was created, or its first master data or Buchung when earlier) are stored and open no Vorgang; lines before a known Bankkonto’s eroeffnet_am are covered by its opening balance and left out. Fetched lines notify nobody (their Rückfragen wait in the Eingang; question.opened carries fetched: true) and ask for no approval. A failed read asks the provider for the session status: ended or closed makes the Bankzugang expired, withdrawn at the bank revoked (revoked_at_bank), anything else changes only failure_count and last_error (warning bank_read_failed). One sync, complete or revoke of a Bankzugang at a time; conflict when it is not active (next step: connect again with renews). The Agent may run it without asking
bank_connection.revoke (Verwaltung, stop action) {id} {bank_connection_id, state: "revoked"}: first the state (nothing is read any more), then the session is ended at the provider; a provider that fails gives the warning bank_session_not_revoked. Bankkonten and their lines stay. conflict when it has ended already. The Agent asks (default policy)
bank_connection.list (query) {} [BankConnection], newest first
bank_connection.banks (query) {country, psu_type?} [{name, country, logo}] by name: the banks of the country (two letters) the provider offers, for business or personal account holders when given; name is the aspsp_name of bank_connection.start, logo an https address or null. The provider may cache the list for a day. not_allowed without a consent provider, validation for a country that is not two letters. The Agent may read it
bank_transaction.list (query) Listenabfrage Liste of Bankumsatz; text name, verwendungszweck, iban; date buchungstag; categorical bankkonto_id; sortable buchungstag, betrag, position; CSV yes
  • Import = {einlieferung_id, beleg_id, bankkonto_id, format: "camt.053.001.08" | "mt940" | "csv" | "api", zeilen_neu, zeilen_bekannt, zeilen_vorgelegt, rows_paired, anfangssaldo: Saldo?, endsaldo: Saldo?, saldo: Saldo, umsatz_ids, rueckfrage_ids}: anfangssaldo and endsaldo as the file states them (null for a CSV file without a balance column), saldo the Bankkonto after the import. Warning zeilen_bekannt (text names the count) when lines were there already; they are skipped, so a second import of the same file and an overlapping file add nothing twice. A line is there already by the bank’s reference with booking day and amount, else by its identity (booking day, amount, reference text normalised: case folded, whitespace runs and the wrap separator ; collapsed, trimmed; and its rank; ADR 0060) (the items of one batch entry share the entry’s reference). A CSV file without a balance column (spalten.saldo absent) is read with the warning saldo_nicht_geprueft, kept on the Bankkonto until bank_import.check_balance {bankkonto_id, einlieferung_id, endsaldo} completes the check (a closing balance that does not fit is conflict); endsaldo given with bank_file.import completes it at once, and a file that does not lead to it is refused like any other. An MT940 line without booking day takes the date of the closing balance when the statement covers one booking day; over several days it is held in a Rückfrage buchungstag_fehlt (warning of that code) with the value date as a hint: it counts in the balance of the Bankkonto and in the continuity check at once (a following statement is accepted), only its Bankumsatz and Buchung wait until bank_transaction.set_posting_date {rueckfrage_id, zeilen: [{nr, buchungstag}]} gives a day of the statement. An MT940 opening balance without date (000000) holds every line the same way in one Rückfrage anfangsdatum_fehlt (warning of that code); bank_import.set_start_date {rueckfrage_id, datum} dates the lines with month and day and holds the others per the rule before. Neither Rückfrage can be withdrawn. Each Bankumsatz carries ende_zu_ende_referenz (camt EndToEndId, MT940 EREF+, or given with bank_transaction.deliver), which the Abgleich matches against the Rechnungsnummer before the reference text (Grund ende_zu_ende), and an item of a batch entry carries eintrag: {bankreferenz, betrag}, the entry it belongs to; the list shows the items under one heading row of the entry. Its lines equal to lines held already, without a bank reference to tell them apart, are held back in one Rückfrage bankumsaetze_vorgelegt (warning zeilen_vorgelegt), neither booked nor counted until bank_transaction.decide_held_back {rueckfrage_id, zeilen: [{nr, uebernehmen}]} answers every line; two equal lines in one file are two Bankumsätze. decuma migrate recomputes the identity of stored lines with the current rule (ADR 0060); two lines of one day and amount from different deliveries whose reference texts differ only in case, spacing or wrapping get one Rückfrage bankumsatz_doppelt (once; not for a line kept with bank_transaction.decide_held_back) (answers dieselbe_zahlung, zwei_zahlungen; question.answer): if it is one payment read twice, the person reverses the Buchung of the second line. question.answer refuses bankumsaetze_vorgelegt and buchungstag_fehlt with the Command to use. A profile names its headings (ueberschriften) or states ohne_ueberschriften: true; one saying neither is validation. A profile saved without either refuses the import naming the file’s headings; ueberschriften_uebernehmen: true on bank_file.import confirms them, saves them in the profile (warning headings_adopted) and reads the file.
  • SyncResult = {bank_connection_id, state, accounts: [{iban, name, bank_account_id, outcome, rows_new, rows_known, rows_paired, rows_before_start, rows_refused, without_balance, message}], unbound: [bank_account_id]}. Binding: an account is bound only in EUR with an IBAN, never a card or a loan (not_eligible); by the provider’s identification_hash with the IBAN as a check, else by IBAN to a Bankkonto without a hash, else a new Bankkonto is opened with the first statement (its opening balance and day from the bank). A known hash with another IBAN, or a known IBAN under another hash, is refused (iban_mismatch, warning bank_account_iban_mismatch), never rebound. One active Bankzugang per Bankkonto (bound_elsewhere; also a database constraint). An account the session no longer offers is unbound (unbound), its history stays. A refused delivery (refused, message says why) leaves the other accounts read. rows_before_start counts the new lines before the bookkeeping start (part of rows_new, stored without a Vorgang), so neu, bekannt and vor Buchhaltungsbeginn are rows_new - rows_before_start, rows_known and rows_before_start. rows_refused counts the lines the provider could not read (no booking day, another currency, incomplete); they are not delivered. A bank that states no balance gives without_balance: true: the lines are delivered without balances, as a file without balances (warning saldo_nicht_geprueft); a re-read line equal to a held one is that line. A new Bankkonto needs a balance: without one the account is refused with the next step (create the Bankkonto, then sync).
  • The app’s bank picker (#/konto/unternehmen/bank/verbinden, ?renews=<id>) has the extension place bank_connection.start before the step to the bank (Erweiterung.einschub, daten {aspsp_name, aspsp_country, psu_type, renews}): an operator’s build may show a notice there and hold the step back with frei(false). The open build adds nothing.
  • BankConnection = {bank_connection_id, provider, aspsp_name, aspsp_country, psu_type, state, status, valid_until, renews, created_at, completed_at, ended_at, end_reason, last_attempt_at, last_success_at, failure_count, next_attempt_at, last_error, bank_accounts: [{bank_account_id, name, iban, last_delivered_day}]}. state pending, active, expired, revoked, superseded or failed; status the state as shown: expiring from 14 days before valid_until, expired once it has passed. A renewal is a new Bankzugang, so every consent stays. Events: bank_connection.activated, bank_connection.ended ({bank_connection_id, state, end_reason}). Deleting the Mandant revokes every Bankzugang and ends its sessions first.
  • Bankumsatz = {umsatz_id, bankkonto_id, einlieferung_id, beleg_id, position, buchungstag, valuta, betrag, name, iban, verwendungszweck, bankreferenz}: one line, insert-only; position the line’s place in its file (1, 2, …); name and iban of the other side. It shows that money moved, never why.

A line is known when the Bankkonto holds a line with the same booking day, amount and verwendungszweck at the same rank among the identical lines of that day (the first, the second, …): the “position” of the issue, counted per day so that overlapping files match.

Refusals (detail and next_step in German and English); a refused import stores nothing, not even in part:

Case Code next_step
The opening balance does not continue the balance of the lines held (for the first import: the opening balance of the Bankkonto). detail names both balances with their dates and says that this is a rule of the product conflict “Fehlenden Kontoauszug zuerst importieren …” (names the days)
The lines held for the days of the file lead to another closing balance than the file’s conflict names the days to check
The lines of a file do not lead from its opening to its closing balance (also between the statements of one file, and the running balance of a CSV row) validation load the file from the bank again, unchanged
A file in an unknown format, a camt version other than camt.053.001.08 validation names the formats accepted
A CSV file without a profile, or one the profile does not fit (detail names the row and column) validation names the profile to create or adjust (template: the example profile)
A file of another account (IBAN), in another currency than EUR, an entry of a camt.053 not BOOK, an MT940 reversal mark RC or RD validation
A line booked before eroeffnet_am validation set the opening balance earlier
A line booked after geschlossen_am of a closed Bankkonto conflict
An XML file with a DOCTYPE or an entity other than the five of XML: refused, never resolved or fetched validation

Bank files are read as data only: nothing in them is executed, resolved or fetched; a text that a spreadsheet would run as a formula keeps its text and gets the apostrophe of the CSV export.

Books 2: payments, Abgleich, Ist, Kleinunternehmer

Section titled “Books 2: payments, Abgleich, Ist, Kleinunternehmer”

Offene Posten, payments by hand, the Abgleich of Bankumsätze by hand and by rules, Ist-Versteuerung in the Voranmeldung and the Kleinunternehmer status (issue #115, second block; ADR 0028). Mandant-scoped; every name refuses a Mandant without a Betrieb with not_allowed. Amounts are decimal strings, dates YYYY-MM-DD (days in the installation’s time zone). Routes the app uses (prototype): #/auswertungen/offene-posten, #/ausgaben/zahlungen (a tab “Zahlungen” of the Eingang), #/ausgaben/zahlungen/<umsatz_id>.

An Offener Posten is derived from the Journal, never created by hand: a Buchung (not a Storno, not reversed) with a line on Forderungen (1200, Soll: forderung) or Verbindlichkeiten (3300, Haben: verbindlichkeit), as the capture books “noch offen”. Its id posten_id is the buchung_id of that Buchung. Its remainder is its amount minus the payments linked to it whose payment Buchung is not reversed.

Name Payload Result
open_item.list (query) Listenabfrage; bis is also the Stichtag (default today): payments dated after it do not count Liste of OffenerPosten plus {summe_forderungen, summe_verbindlichkeiten, altersklassen: [{klasse, anzahl, summe}]} over every filtered row with rest not zero. Text text, rechnungsnummer; date datum; categorical art (forderung, verbindlichkeit), zustand (offen, ausgeglichen, guthaben), altersklasse (bis_30, 31_60, 61_90, ueber_90: days from datum to the Stichtag, a classification of the product); sortable datum, rest, alter_tage; CSV yes. The screen sends filter: {zustand: ["offen", "guthaben"]}
open_item.get (query) {posten_id} OffenerPosten with buchung: Buchung (section Books 1)
  • OffenerPosten = {posten_id, art, buchung_id, nummer, datum, text, rechnungsnummer, leistungsdatum, beleg_ids, betrag, gezahlt, rest, zustand, alter_tage, altersklasse, zahlungen: [Zahlung], buchung?}. zustand: offen (rest above zero), ausgeglichen (zero), guthaben (below zero: an overpayment, a credit of the other side). No controls for Anzahlung or Forderungsausfall.
  • Zahlung = {zahlung_id, buchung_id, nummer, datum, betrag, weg: "bank" | "bar" | "privat_ausgelegt", bankkonto_id, umsatz_ids, storniert}: one part of a payment Buchung that settles this Posten; betrag is negative for a returned payment; storniert: true when its Buchung was reversed (it no longer counts).
Name Payload Result and refusals
payment.record (idempotent) {posten: [{posten_id, betrag?}], datum, weg: "bank" | "bar" | "privat_ausgelegt", bankkonto_id?, text?}; betrag defaults to the remainder; datum is the day the money moved (for a receipt: the day of the credit) {buchung_id, nummer, posten: [{posten_id, betrag, rest}]}: one payment Buchung (Bank, Kasse 1600 or the Konto of “privat ausgelegt” against Forderungen or Verbindlichkeiten, one line per Posten) that cites the Belege of what it pays. bank uses the Konto of bankkonto_id; without it the only open Bankkonto, else 1800 when there is none; with several validation. This is the whole manual way: no bank file is needed

Refusals: a Posten already settled (rest zero or below) is conflict (next_step “Offene Posten ansehen”); a betrag above the remainder, Forderungen and Verbindlichkeiten in one payment, privat_ausgelegt for a Forderung, an unknown Posten are validation. Warnings: payment_before_supply, period_already_filed, kleinunternehmer_limit_near, open_bank_transaction_same_amount (as on buchung.post).

The link between a Bankumsatz and what it pays (Zuordnung), insert-only; “lösen” ends a link and never deletes it. A Bankumsatz is zugeordnet when its live links reach its amount, rueckfrage while its Rückfrage is open, else offen.

Name Payload Result and refusals
bank_transaction.list (query) Listenabfrage (as in “Books 2: bank import”) Liste of Bankumsatz now with {zustand, zugeordnet, passt, vorgang_id, question} per row (question as in inbox.list, while the Rückfrage is open) plus {summe_eingang, summe_ausgang, summe_offen} over the filtered rows; categorical also zustand
bank_transaction.get (query) {umsatz_id} Abgleich
bank_transaction.assign (idempotent) {umsatz_id} and exactly one of posten: [posten_id], zahlung_buchung_id, umbuchung_umsatz_id, erfassung: Erfassung (section Books 1); with posten also differenz?: "rest_offen" | "bankgebuehr" {umsatz_id, buchung_id, posten: [{posten_id, betrag, rest}]}. See below
bank_transaction.assign_matching {bankkonto_id?} {anzahl, zugeordnet: [{umsatz_id, buchung_id}]}: every open Bankumsatz marked passt, linked to its one candidate in one step
bank_transaction.unassign (idempotent) {umsatz_id}; Begründung in the envelope {umsatz_id, storno_ids, posten: [posten_id]}: “Zuordnung lösen” is a Korrektur: every live link ends; a payment Buchung the link posted is reversed by a Storno and its Posten reopen; a link to a payment recorded by hand ends without a Storno (the payment stays; reverse it with buchung.storno). Warning period_already_filed when a reversed line lies in a festgeschriebener period: that Meldung then reads berichtigung_noetig. conflict when nothing is linked
bank_transaction.clarify {umsatz_id, antwort: "beleg_folgt" | "kein_beleg" | "privat", kategorie?, steuersatz?, eigenbeleg?: {begruendung, empfaenger, zweck}, prepayment_for?} {umsatz_id, rueckfrage_id, buchung_id, beleg_id}: the typed answer to the Rückfrage of a Bankumsatz without candidate (below)

bank_transaction.assign:

  • posten: posts the payment Buchung on the booking day of the Bankumsatz (Konto of the Bankkonto against Forderungen or Verbindlichkeiten), citing the bank statement and the Belege of the Posten. The amount fills the Posten in the given order up to each remainder. Less than the remainders: the last Posten keeps the rest (rest_offen, the default), or with bankgebuehr (only for a credit) the difference is booked in the same Buchung to the Kategorie bankgebuehren and the Posten is settled; warning amount_differs names the difference and the two answers. More than the remainders: the last Posten carries the excess as a credit (guthaben), warning amount_differs, and the Rückfrage ueberzahlung (“Wird der Mehrbetrag erstattet oder verrechnet?”, answers wird_erstattet, wird_verrechnet, recorded only). A Bankumsatz with the opposite sign of the Posten (a returned debit, a refund) is linked to the payment it returns: it posts the reverse payment Buchung and the Posten reopens.
  • zahlung_buchung_id: a Buchung recorded before on the Konto of this Bankkonto (a payment by hand with weg: "bank", a capture with “Wie bezahlt?” bank, a manual Buchung) that this Bankumsatz is: linked, no Buchung posted; warning payment_already_recorded. The amounts must be equal (validation).
  • umbuchung_umsatz_id: a transfer between two Bankkonten of the Mandant: both Bankumsätze (opposite amounts) are linked to one Buchung between the two Konten, citing both statements; booked once.
  • erfassung: a Beleg not booked yet is captured with “Bankkonto” as the way (the Konto of this Bankkonto) and linked; its gross must equal the amount (validation).

Refusals: a Bankumsatz already fully linked is conflict (next_step “Zuordnung lösen”); a Posten already settled is conflict; a credit for a Verbindlichkeit or a debit for a Forderung without a payment to return, bankgebuehr on a debit or without a difference, amounts that differ are validation; a payment of a Forderung before the performance of a line whose key has anzahlung_offen (UST_13B_AUSGANG, Kz 60) is validation (next_step: file those periods by hand; the Bankumsatz stays open). An overpayment of a Forderung is Entgelt in the period of receipt and a returned payment reduces the base in the period of the return (see Istversteuerung); under Sollversteuerung only what is paid beyond the gross counts (the excess, and its repayment), in lines dated the payment day.

Candidates by rules (no model; deterministic): for a credit the Forderungen, for a debit the Verbindlichkeiten with a remainder, each with its reasons: betrag (the amount equals the remainder), rechnungsnummer (the invoice number of its Beleg occurs in the reference text, ignoring case and spaces), name (the name of the other side occurs in the Buchung text or the issuer of its Beleg, ignoring case), iban (an earlier Bankumsatz from this IBAN was linked to a Posten with the same text); a Posten is a candidate with at least one reason. Also: Buchungen recorded before that move money on the Konto of this Bankkonto (a payment by hand, a capture paid by bank, a manual Buchung) and that no Bankumsatz has, with the same amount and a date at most 5 days apart (zahlung, reasons betrag, datum); on another open Bankkonto of the Mandant an open Bankumsatz with the opposite amount, at most 5 days apart, whose IBAN of the other side is one of the two Bankkonten (umbuchung); for a Bankumsatz opposite to a Posten, a linked payment of that Posten with the same amount (rueckbuchung). passt: exactly one candidate, and its remainder (or amount) equals the amount of the Bankumsatz. Matching only proposes: nothing is linked without bank_transaction.assign, bank_transaction.assign_matching or an API caller sending them.

A Bankumsatz without any candidate when it is imported becomes a Vorgang in the Eingang (zustand: "rueckfrage", zeile names the other side, amount and day) with the Rückfrage bankumsatz_ohne_beleg (“Zu diesem Zahlungseingang fehlt ein Beleg. Was ist es?”). Answers, sent with bank_transaction.clarify (question.answer refuses this art with next_step bank_transaction.clarify):

  • beleg_folgt (“Beleg hochladen”): recorded; the Vorgang waits; the Beleg is linked later with bank_transaction.assign and erfassung.
  • beleg_folgt with prepayment_for (debit only; “Anzahlung, Rechnung folgt”): an own Anzahlung paid before the supplier’s Anzahlungsrechnung, booked gross on the Anzahlung Konto of that kind and linked; no Vorsteuer. buchung.record of the Anzahlungsrechnung into the same Vorgang books it as a Verbindlichkeit paid by that Anzahlung: the tax share moves to the Vorsteuer in the period of the invoice (kb anzahlung-und-schlussrechnung-sonderfaelle.md, Abschnitt 5, Regel 1).
  • kein_beleg: the product writes the Eigenbeleg with the Begründung (eigenbeleg, all three fields required) and books it with kategorie (and steuersatz where the Kategorie has several) against the Konto of the Bankkonto. No Vorsteuer: a key with Vorsteuer is validation with next_step listing the allowed keys.
  • privat: offered only where the kb documents the booking: for a natürliche Person a credit is a Privateinlage (the Konto of role privateinlage, SKR04 2181, SKR03 1891, Eigenbeleg with begruendung). For a juristische Person private money in the company account is a Forderung against the Gesellschafter or a verdeckte Gewinnausschüttung (StB-Frage, kb buchfuehrung/kassenbuch-und-bargeld.md): not offered; a debit of a natürliche Person (Privatentnahme) has no Konto in the rule data yet: not offered. Sent anyway it is validation with the reason.
  • A transfer between own Bankkonten is recognised as a candidate (umbuchung) once both statements are imported; until then the Rückfrage stays.

With a decision port (ADR 0045) a debit’s Rückfrage is asked about once, after the Regeln (bank_transaction.propose_category, the installation only): a confident Kategorie that can be booked on an Eigenbeleg (no Vorsteuer) shows as vorschlag: {antwort: "kein_beleg", kategorie, kategorie_text, grund} on the Rückfrage, grund in the reader’s language; it takes effect only when the person answers bank_transaction.clarify with it and the Eigenbeleg. A confident Kategorie that needs a Beleg shows as antwort: "beleg_folgt" with a grund saying it needs the Rechnung; no confident answer leaves the Rückfrage without vorschlag. A Rückfrage kategorie_waehlen carries the same vorschlag (the most probable Kategorie below the threshold) when there is one. The app preselects the proposed answer and shows its grund; the person confirms. A credit is never asked about.

Linking a Bankumsatz that has a Vorgang closes it: gebucht when a Buchung was posted, else erledigt_ohne_buchung with grund: "zugeordnet"; its open Rückfrage is withdrawn.

Shapes:

  • Abgleich = {umsatz: Bankumsatz, bankkonto: {bankkonto_id, name, konto}, zustand, zugeordnet, offen, passt, kandidaten: [Kandidat], zuordnungen: [Zuordnung], rueckfrage: Rueckfrage | null, vorgang_id}; offen = amount minus zugeordnet.
  • Kandidat = {art: "posten" | "zahlung" | "umbuchung" | "rueckbuchung", posten_id, buchung_id, umsatz_id, datum, text, betrag, gruende: [{code, text}], passt}; for posten and rueckbuchung posten_id and betrag (the remainder, or the payment returned); for zahlung buchung_id; for umbuchung umsatz_id of the other side. “Zuordnen” sends posten: [posten_id], zahlung_buchung_id: buchung_id or umbuchung_umsatz_id: umsatz_id.
  • Zuordnung = {zuordnung_id, buchung_id, nummer, betrag, eigene_buchung, angelegt_am, geloest_am, storno_id, posten: [posten_id]}; eigene_buchung: true when the link posted the Buchung (lösen reverses it).

The Besteuerungsart valid on the day that decides the Meldezeitraum of a revenue line under Soll (its Leistungsdatum) decides how its output tax counts. Under Soll nothing changes against Books 1 and Filing 1.

  • Under Ist a revenue Buchung on Forderungen (captured “noch offen”, an Ausgangsrechnung, or booked by hand): its tax lines with output tax owed by the Unternehmer (keys richtung: ausgang, steuer_schuldet: leistender) are not yet due and never count in a Meldung. They are booked on “Umsatzsteuer nicht fällig” of their rate (SKR04 3816 for 3806, 3811 for 3801; SKR03 1766, 1761) with meldedatum: null and the Soll deciding day as leistung_meldedatum (kb jahresabschluss/abschlussbuchungen.md, Abschnitt 8, Istversteuerung).
  • Every payment of such a Posten (by hand or by Abgleich) adds to its payment Buchung, per position of the Rechnung (a Bemessungsgrundlage line and its tax line), the share of Bemessungsgrundlage and tax that becomes due, in proportion to the amount received: tax share = tax of the position x paid so far / gross, to the cent (half away from zero), Bemessungsgrundlage = (Bemessungsgrundlage + tax of the position) x paid so far / gross, to the cent, minus the tax share; each payment takes the difference to the payments before it; the payment that settles the Posten takes the rest, so that the parts add up to the Rechnung (kb banking/zahlungsabgleich-und-offene-posten.md; no official rounding rule, marked unverified). These lines carry bei_zahlung: true, the payment day as meldedatum and the Rechnung’s own deciding day as leistung_meldedatum; each is booked as a pair (the key on one side): the Bemessungsgrundlage on the same Konto, the tax from “Umsatzsteuer nicht fällig” (without key) to the Umsatzsteuer Konto of its rate (with key).
  • umsatzsteuer.reclassify_not_due ({}, Freigabeklasse ledger_write, idempotent) → {buchungen: [{posten_id, buchung_id, nummer, konto, betrag}]}: for a Rechnung posted before these Konten (its tax on the Umsatzsteuer Konto) the open tax of every open Forderung moves to “nicht fällig”, one Buchung without key dated the Rechnung or its last payment; a later payment moves its share back. A Forderung already moved or booked on “nicht fällig” is left alone.
  • Year-end check umsatzsteuer_nicht_faellig (tolerance zero): per Konto the balance of “nicht fällig” against the tax of the Forderungen open on the Stichtag less the shares moved by then; each open Forderung is listed (and named when its tax still stands on the Umsatzsteuer Konto, with umsatzsteuer.reclassify_not_due as next step). The checks “Angemeldet gegen Steuerkonten” and “Gezahlt gegen Vorauszahlungskonten” and the closing entry of the Umsatzsteuer leave these Konten out; the Bilanz shows them under Passiva B.2 (Aktiva B.II.4 on a Soll balance), carried forward.
  • A revenue Buchung captured as paid at once (bank, bar) under Ist is due with its date: its tax lines carry bei_zahlung: true and the Buchung date as meldedatum.
  • The Meldung engine counts a line of such a key only when bei_zahlung equals “Ist on its Soll deciding day”; every other key as before. Nothing is computed outside the Journal: the drill-down Beitrag of a Kennzahl names the payment Buchung, whose belege lead to the bank statement and the Rechnung.
  • A change of the Besteuerungsart with a valid-from date: a Rechnung performed under Soll is counted at its performance and its later payment adds nothing; a Rechnung performed under Ist counts only through its payments. A Storno of a payment Buchung (also through bank_transaction.unassign) reverses its due lines in the payment’s period.
  • Vorsteuer is not touched by the Besteuerungsart (2026 and 2027; the rule from 2028 is not built).
  • An overpayment of a Forderung (a double payment) is Entgelt too (Abschnitt 10.1 Abs. 3 Satz 6 UStAE): the payment past the gross adds the excess pro rata to the due lines in the period of receipt. A returned payment (betrag negative) reduces them pro rata in the period of the return (§ 17 Abs. 1 Satz 8 UStG, Abschnitt 17.1 Abs. 2 Satz 3 UStAE): the same pair of lines with the sides swapped. Only lines that count under Ist (taxable own revenue) change.
  • Refused under Ist (validation, next_step), because the kb documents no period: tax-free and non-taxable own turnover (keys richtung: ausgang without steuer_schuldet: leistender), except a key without an entry in the Voranmeldung (meldezeitraum: keine) and a key whose period rule holds under Ist too (zeitraum_auch_bei_ist: FREI_IGL, Kz 41, § 18b Satz 2 UStG; NSTB_EU_B2B, Kz 21, § 18b Satz 3 UStG).
  • A transmitted period keeps the Besteuerungsart it was transmitted with for the days inside it.
  • Warning payment_before_supply on a payment of a Forderung dated before its Leistungsdatum: “Vor der Leistung vereinnahmt: die Steuer entsteht schon mit der Vereinnahmung (§ 13 Abs. 1 Nr. 1 Buchst. a Satz 4 UStG); Anzahlungen sind noch nicht gebaut.” Nothing else. The same warning on a capture of revenue paid at once (bank, bar) whose Leistungsdatum lies after its Belegdatum.
  • Buchungszeile (section Books 1) gains bei_zahlung: bool and leistung_meldedatum: date | null.
  • The Freigabe refusal for Istversteuerung and the freigabe_fehlt code books2 are gone.

Master data: master_data.set_from gains two fields (with gueltig_ab), and master_data.valid returns them:

  • kleinunternehmer_verzicht: true: the Verzicht (§ 19 Abs. 3 UStG); gueltig_ab must be 1 January of its first year, or the day the activity began (taetigkeit_beginn with the same gueltig_ab, in this call or before; Abschnitt 19.3 Abs. 1 Satz 5 Nr. 1 UStAE), else validation; from the start of the activity there is no change, so no wechsel and no Kennzahl 70 (the kb names none for this case, unverified); it also sets kleinunternehmer: false from that day. It binds five calendar years: kleinunternehmer: true from a day before 1 January of the first year + 5 is conflict.
  • taetigkeit_beginn: true: the business began on gueltig_ab; its year is the year of foundation, in which the lower limit applies to the running year. The Beginn is the Stammdatum of the Betrieb: this sets it for the only Betrieb (with none or several: validation, set it per Betrieb). betrieb.set_activity {betrieb_id, beginn: date | null, ende: date | null} -> {betrieb_id, beginn, ende, hinweis: string | null} sets Beginn and the optional Ende; the Ende moves the Frist of the Umsatzsteuererklärung of its year (hinweis, one neutral line); taetigkeitsart for a natürliche Person or a Personengesellschaft. mandant.get shows both per Betrieb. betrieb.set_buchfuehrungspflicht_notice {betrieb_id, mitteilung_am: date | null} -> {betrieb_id, mitteilung_am, buecher_ab} records the day the Finanzamt announced its notice under § 141 Abs. 2 AO (mandant.get shows it per Betrieb as buchfuehrungspflicht_mitteilung_am); euer.get of a later year is not_allowed. euer.get warns buchfuehrungsgrenze_ueberschritten when the Gesamtumsatz of the Betrieb or the profit of the EÜR exceeds the limits of § 141 AO (never for freiberuflich; the Gesamtumsatz of the Betrieb counts the payments excluded from the Kleinunternehmer limit too); it blocks nothing. One field, the earliest Beginn of the Betriebe, decides the Kleinunternehmer year of foundation and the founders’ rule of voranmeldungszeitraum.check (§ 18 Abs. 2 Satz 4 UStG). Without any Beginn the founders’ rule counts from the year of the first Buchung (it only asks); the Kleinunternehmer year of foundation is never derived (it decides whether a turnover is taxable).
  • The first kleinunternehmer: true of a Mandant (no earlier value) sent with gueltig_ab = today (onboarding, questionnaire) is stored from the taetigkeit_beginn (in this call or before) when that lies in the current year or later, else from 1 January of the current year; without a taetigkeit_beginn, from 1 January. Send the taetigkeit_beginn first. Any other date is stored as given.
Name Payload Result
kleinunternehmer.status (query) {jahr?} (default the year of today) KleinunternehmerStatus

KleinunternehmerStatus = {jahr, kleinunternehmer (on today, or the last day of a past jahr), wechsel: {datum, grund: "grenze" \| "verzicht" \| "vorjahr"} \| null, verzicht: {ab_jahr, widerruf_ab_jahr} \| null, gruendungsjahr: bool, taetigkeit_beginn: date \| null, gesamtumsatz: {betrag, grenze, grenze_art: "laufendes_jahr" \| "gruendungsjahr", warnung_ab}, vorjahr: {jahr, betrag, grenze}, grenzen: {gueltig_ab, quelle_url, abgerufen_am}, rueckfrage: Rueckfrage \| null, folgen: [{text, norm}]}. gesamtumsatz.betrag: the payments received in the year for revenue Buchungen (§ 19 Abs. 2 UStG: vereinnahmte Entgelte), each with the share of its Posten that is Bemessungsgrundlage of a revenue key (Entgelt is net of the tax, § 10 Abs. 1 Satz 2 UStG), less those answered “zählt nicht”; warnung_ab = grenze x the configured margin. folgen: the consequences of the kb document (no Vorsteuer, no Voranmeldung except § 18 Abs. 4a UStG, no Zusammenfassende Meldung, invoice without tax), for the company card and the questionnaire. Without taetigkeit_beginn the year counts as not the year of foundation, and folgen says that the date is missing. Where it would matter (no Beginn, no revenue Buchung of an earlier year (an expense alone does not settle it), and a Gesamtumsatz above the limit of the year of foundation and at most the running-year limit) the threshold watch raises the Rückfrage kleinunternehmer_beginn (answer beginn_eingetragen, refused until a Beginn is entered) with the warning kleinunternehmer_start_missing, and revenue with KLEINUNTERNEHMER waits like for the other Rückfragen of the watch.

Rule data: the Steuerschlüssel KLEINUNTERNEHMER (revenue, tax-free under § 19 Abs. 1 UStG, Kennzahl 48 where a Voranmeldung is filed at all); the limits as a rule set of the new art grenze (regelwerk/grenze-kleinunternehmer-2025-01-01.toml: vorjahr 25,000, laufendes_jahr 100,000, gruendungsjahr 25,000, each with its source). The margin of the warning is configuration: DECUMA_KLEINUNTERNEHMER_WARNUNG (percent of the limit, default 90).

While the status holds (on the day that decides the line), a Buchung accepts for revenue only KLEINUNTERNEHMER, for expenses only keys without Vorsteuer, and the reverse-charge and Erwerb keys without the Vorsteuer side (the gross amount of an expense is the cost). KLEINUNTERNEHMER is refused for a Mandant that is not one.

Threshold watch on every payment received (by hand, by Abgleich, a capture paid at once): warning kleinunternehmer_limit_near (text names the total and the limit) from warnung_ab; the payment that brings the total above the limit never switches the status: it raises the Rückfrage kleinunternehmer_grenze on a Vorgang of its own (“Gesamtumsatz über der Grenze von …”). Answers by question.answer: regelbesteuerung (“Grenze überschritten: ab diesem Umsatz gilt die Regelbesteuerung”: records kleinunternehmer: false from the day of that payment, wechsel.grund: "grenze") or zaehlt_nicht (“Dieser Zahlungseingang zählt nicht zum Gesamtumsatz”, the reason in the envelope’s begruendung, required). At the first revenue Buchung or payment of a year whose previous year’s total exceeds the vorjahr limit, the Rückfrage kleinunternehmer_vorjahr asks whether regular taxation applies from 1 January (answers regelbesteuerung, records the change from 1 January with grund: "vorjahr", or nicht_ueberschritten with a reason). The Buchung that raises kleinunternehmer_vorjahr is still booked (warning kleinunternehmer_vorjahr); while either Rückfrage is open, further revenue with KLEINUNTERNEHMER is conflict (next_step names the Rückfrage). An answered Rückfrage closes its Vorgang (erledigt_ohne_buchung, grund: "rueckfrage_beantwortet"); regelbesteuerung warns regelbesteuerung_from that the revenue booked with KLEINUNTERNEHMER from that day needs a Korrektur by the person.

Voranmeldung and Fristen: a period in which the status holds on its first day has no Meldung (absent from filing.list; filing.get is validation with the reason) and no Frist (absent from frist.list), except a period with lines of a key that a Kleinunternehmer declares too (§ 18 Abs. 4a UStG: tax as recipient under § 13b, Erwerb): its Meldung is offered with those Kennzahlen (tax owed, no Vorsteuer) and the own tax-free revenue in Kennzahl 48. After a change to regular taxation by the limit or the Verzicht, the Meldung of the period that contains the day of the change carries it in Kennzahl 70 (Zeile 12, “Datum des Wechsels”): Kennzahlwert.datum holds the day, gemeldet is 1; the Eingabeblatt shows TT.MM.JJJJ. No Zusammenfassende Meldung is ever prepared for a Kleinunternehmer (§ 18a Abs. 4 UStG; for the ticket that builds it).

Refusals (detail and next_step in German and English):

Case Code next_step
A taxed revenue key or a key with Vorsteuer for a Kleinunternehmer validation lists the allowed keys
KLEINUNTERNEHMER for a Mandant that is not one validation lists the revenue keys
Revenue with KLEINUNTERNEHMER while kleinunternehmer_grenze or kleinunternehmer_vorjahr is open conflict names the Rückfrage (#/eingang/<vorgang_id>)
kleinunternehmer_verzicht neither on 1 January nor on the start of the activity; kleinunternehmer: true inside the five years of a Verzicht validation; conflict the first possible day
zaehlt_nicht or nicht_ueberschritten without begruendung validation

Warnings: kleinunternehmer_limit_near, and on the payment above the limit kleinunternehmer_limit_exceeded (names the Rückfrage). After a change by the limit, a payment of a Posten booked with KLEINUNTERNEHMER warns kleinunternehmer_nachversteuerung: an Entgelt received after the change is taxable, also for a turnover performed before (Abschnitt 19.7 Abs. 1 UStAE); the Buchung needs a Korrektur by the person.

The export of the Mandant contains the new tables (zahlung, zuordnung, zuordnung_loesung, bankumsatz_vorgang, umsatz_ausnahme) with Bankkonten, Bankumsätze and mapping profiles; the isolation suite covers them.

Auswertungen, Kostenstellen, exports, Verlauf and search (issue #129, ADR 0032). Every figure is computed from the Journal on every read; nothing is stored or typed. Mandant-scoped; every name is reachable with an API-Schlüssel like with a session; every report refuses a Mandant without a Betrieb with not_allowed. Amounts are decimal strings, dates YYYY-MM-DD. Routes the app uses (prototype): #/auswertungen/uebersicht, /susa, /guv, /guv/:konto, …/bu-:nr, …/beleg, /bilanz, /bwa, /kostenstellen, /liquiditaet, /offene-posten, #/verlauf, #/suche/:text. The period is part of the URL (?von=…&bis=…, &vvon=…&vbis=… for the comparison) and kept while moving between reports; the app maps its presets (Voranmeldungszeitraum, running Wirtschaftsjahr, previous year, a month, an own range) to von and bis.

Rule data first. The rule data of this ticket (Gliederung, the completed SKR04, the BWA scheme) is commit 10c2948 on branch f12-reports1, before the code, so Books 3 and Books 4 can rebase their Kategorien onto it; they keep their Kategorien in files of their own.

  • Rule set gliederung hgb (regelwerk/gliederung-hgb-2026-01-01.toml): the positions of § 266 Abs. 2 and 3 HGB and § 275 Abs. 2 HGB as a tree with the statutory wording, norm, level (ebene 1 letter or GuV number, 2 Roman numeral or GuV letter, 3 Arabic numeral), the position of § 275 Abs. 5 HGB each GuV position falls into (kleinst, kleinst_gegenseite for a negative contribution), the Rohergebnis of § 276 HGB (klein) and per Kontenrahmen the number ranges (bereiche). Keys: aktiva.A.II.3, passiva.C.8, guv.5.a, guv.rohergebnis, guv.k.1 to guv.k.8, and vortrag (Klasse 9 Saldenvorträge, no position of any report).
  • Every Konto of kontenrahmen skr04 names its position and, where the publisher’s list names a second one, position_gegenseite for a balance on the other side (bank in credit: Passiva C. 2.; tax and clearing Konten: Aktiva B. II. 4. or Passiva C. 8.; Forderungen in credit: C. 8.; Verbindlichkeiten in debit: B. II. 4.). Placed per Konto, never by the first digit. decuma check-rule-data fails for a Konto without a position, with an unknown one, or outside the ranges of its position. Own Konten (konto.create) take the position of the range of their number; a number in no range is validation.
  • The SKR04 is completed with the Konten of the worked example of the kb and the common groups of a small company (fixed assets, Rückstellungen, payroll, Abschreibungen, interest, income taxes, Saldenvorträge 9000), each number checked against the publisher’s list 2026 (Art.-Nr. 11175). The list is not reproduced as a whole; every other number of the standard chart has its position through the ranges.
  • Side changes (kb jahresabschluss/gliederung-bilanz-und-guv.md, “Konten mit wechselnder Bilanzseite”; § 246 Abs. 2 Satz 1, § 252 Abs. 1 Nr. 3 HGB): a Konto with position_gegenseite carries seitenwechsel. je_posten (Forderungen, Verbindlichkeiten): every Offener Posten decides its own side, so a credit claim on the Sammelkonto stands under C. 8. and an open one under B. II. 1. at the same time; a payment belongs to the Posten it settles, a Storno to what it reverses. je_bankkonto (bank Konten): every Bankkonto that posts to the Konto decides its own side (by its payments and Abgleich). je_gesellschafter: per Gesellschafter; no Gesellschafter is recorded on a line yet, so one Konto per Gesellschafter. When a line of such a Konto up to the Stichtag belongs to no claim (a Buchung by hand), the balance of the Konto decides, as without the flag. saldiert_finanzamt (Umsatzsteuer, Vorsteuer, Vorauszahlungen): one amount per Besteuerungszeitraum, placed by its sign under B. II. 4. or C. 8.; a line belongs to the year of the Meldung it is declared in (its Meldezeitraum) or that it settles, different years stay separate, and a line assigned to no Meldung is never placed in a year by its date: it stands by its own balance and the Bilanz carries the note steuerzahlung_ohne_meldung (§ 16 Abs. 1 und 2, § 18 Abs. 3 and 4 UStG). Own lines of the lists count to the statutory position that covers them in both charts (in Entwicklung SKR04 0148 / SKR03 0048: A. I. 1.; Bauaufträge 1090-1094 / 7090 and Aufträge in Arbeit 1095-1099 / 7095: B. I. 2.); received advance payments openly deducted from stocks (1190 / 1722) reduce B. I., otherwise they stand in C. 3. (3250 / 1710); Saldenvorträge 9000-9009 and 9090 have no position; SKR04 3640-3641 (SKR03 1665-1666) change side per Gesellschafter, 3642-3643 stay liabilities; the accounts of a Personengesellschaft have no position. Personenkonten: konto.create takes five digits, Debitoren 10000-69999 (aktiv, B. II. 1., in credit C. 8.) and Kreditoren 70000-99999 (passiv, C. 4., in debit B. II. 4.), each deciding its side by its own balance; the Sammelkonten 1200 / 3300 (SKR03 1400 / 1600) remain. A Gesellschafter Konto of a Personengesellschaft lies in no position yet and is refused by konto.create like any number in no range; one Konto per Gesellschafter and function (blocks of ten) and the Gesellschafter as a field of the Buchung come with the partnership Bilanz. Umsatzsteuer nicht fällig (SKR04 3810-3816, SKR03 1760-1766) stands under Steuerrückstellungen (B. 2.), in debit under B. II. 4.; Geldtransit (1460 / 1360) and the Ist clearing Konto (1490 / 1390) change side by their balance. Nothing else is netted. Konto gains seitenwechsel.
  • An Eröffnungsbuchung is a Buchung with a line on a Konto of position vortrag (9000 in SKR04).
  • kontenrahmen skr03 (regelwerk/kontenrahmen-skr03-2026-01-01.toml): the Konten of the kb’s check of the worked example in SKR03 numbers (publisher’s list 2026, Art.-Nr. 11174), each with the position both lists give it and skr04, the SKR04 Konto of the same content; the Gliederung and the BWA scheme carry the SKR03 ranges. The ranges of one Kontenrahmen never overlap (decuma check-rule-data), so every number lies in at most one position.
  • Roles: a Konto may carry rolle (forderungen, verbindlichkeiten, bank, kasse, gesellschafter, privateinlage), at most one Konto per role. Code asks the Kontenplan for the Konto of a role (capture “Wie bezahlt?”, payment.record, Offene Posten, the default Konto of bank_account.create, Privateinlage in the Abgleich, the Kleinunternehmer Gesamtumsatz); no Konto number is fixed in code. Steuerschlüssel (konto_steuer, konto_vorsteuer) and Kategorien (konto) name their Konten in SKR04; a Betrieb on another Kontenrahmen posts to the Konto whose skr04 names it.
  • SKR03 has the counterpart of every Konto a Steuerschlüssel, a Kategorie or a role names (kb accounting/konten-je-funktion-skr03-skr04.md: Kasse 1000, Privateinlagen 1890, the 7 percent tax Konten; intra-Community acquisition and § 13b at 7 percent post to the Konto without a rate, the rate stays in the Steuerschlüssel), guarded by a test. A role or SKR04 Konto that an own Kontenplan lacks is validation with next_step “Buche das von Hand auf das Konto, das du dafür nutzt (buchung.post).”
  • The choice in the API:
    • mandant.create and betrieb.create take kontenrahmen? (skr04 (default) or skr03; any other kennung is validation with the list). It is recorded with the Betrieb at once and never changes.
    • kontenrahmen.select {betrieb_id?, kontenrahmen} → {betrieb_id, kontenrahmen}: the recorded one again is a no-op; validation for a kennung not loaded; any change is conflict (next_step “Kontenrahmen wechseln heißt Daten migrieren: Export, neuer Betrieb, Import (Migration 1).”).
    • Konto (chart_of_accounts.get, konto.ledger_sheet) gains position, position_gegenseite, position_bezeichnung, rolle, skr04.

master_data.set_from gains gewinnermittlung: bilanz or einnahmenueberschuss (with gueltig_ab), and master_data.valid returns it. A juristische_person is always bilanz; einnahmenueberschuss is validation for it. For a natuerliche_person and a personengesellschaft it is unset until given. mandant.get gains bilanz: bool (today, with a Betrieb): the app shows the tabs Bilanz and GuV only then.

Every bericht.* query takes {betrieb_id?, von?, bis?, vergleich_von?, vergleich_bis?, ohne_vergleich?, form?, kostenstelle_id?, format?, ohne_abschlussbuchungen?}:

  • von, bis: the period. Default: the Voranmeldungszeitraum that contains today (by the master data; befreit or unset: the running Wirtschaftsjahr up to today; only von: up to today). bis is the Stichtag of balance-sheet figures. von after bis is validation.
  • vergleich_von, vergleich_bis (both or neither, else validation): the comparison. Default: the same range one year earlier; for the Bilanz the comparison Stichtag is the day before the Wirtschaftsjahr of bis begins. ohne_vergleich: true: vergleich null, every comparison value 0.
  • ohne_abschlussbuchungen: true: the Abschlussbuchungen of the year-end (abschlussbuchung.adopt, their Anpassungen and Stornos) are left out, in the period and the comparison: the books as they stood before the closing entries.
  • form (Bilanz and GuV): gross (default; every level), klein (Bilanz: letters and Roman numerals; GuV: Nr. 1 to 5 as guv.rohergebnis, the rest with its letters), kleinst (Bilanz: letters; GuV: guv.k.1 to guv.k.8). Konten hang below the deepest level shown.
  • kostenstelle_id: only lines with this Kostenstelle (SuSa, GuV, BWA); not_found for an unknown one.
  • format: json (default), csv, xlsx, pdf (section “Exports”).

Every report result carries {betrieb_id, zeitraum: {von, bis}, vergleich: {von, bis} | null, kontenrahmen: {kennung, gueltig_ab}, hinweise: [Hinweis], letzte_buchung: date | null, csv: string | null, datei?: Datei}. Hinweis = {code, text, anzahl?, betrag?, datum?}; the app shows hinweise as one line above the report. Codes: offene_vorgaenge (Vorgänge neither gebucht nor erledigt whose Belegdatum, else arrival day, lies in the period; anzahl, betrag their gross by the Belegdaten where read), letzte_bankdaten (Liquidität: datum is the day of the last Bankumsatz or bank payment by hand), vor_abschlussbuchungen (GuV, Bilanz, BWA: the state of the books on datum; closing and accrual entries are missing or may change it; not a Jahresabschluss), fehlbetrag (Bilanz: equity negative, betrag; § 268 Abs. 3 HGB), ohne_position (booked Konten without a position, anzahl; never left out silently), steuerzahlung_ohne_meldung (Bilanz: lines on the Umsatzsteuer Konten assigned to no Meldung, anzahl).

Refusals: validation for a period that starts after it ends; not_found for a Kostenstelle or (in konto.ledger_sheet) a Konto that does not exist; not_allowed for report.balance_sheet and report.profit_and_loss unless the Gewinnermittlung is bilanz (next_step names the setting when it is unset, else the reports that remain); not_allowed for report.balance_sheet of a Personengesellschaft (OHG, KG, GbR, GmbH & Co. KG: the equity per Gesellschafter does not follow from the mapping yet), its GuV remains. An Einzelunternehmen (natürliche Person keeping a balance sheet) shows Passiva A. as one item with the computed lines anfangskapital, einlagen, entnahmen, ergebnis (§ 247 Abs. 1 HGB; Konten carry eigenkapital: kapital, einlage, entnahme).

Name Result besides the common fields
report.trial_balance {zeilen: [{konto, bezeichnung, position, anfangswert, soll, haben, saldo}], summe: {anfangswert, soll, haben, saldo}, vortrag}. anfangswert (Soll minus Haben): Bestandskonten the balance before von plus the lines of Eröffnungsbuchungen inside the period; Erfolgskonten the lines since the start of the Wirtschaftsjahr of von. soll, haben: the other lines of the period. saldo = anfangswert + soll - haben. vortrag: Soll minus Haben of the Erfolgskonten of earlier Wirtschaftsjahre (no row); summe.anfangswert + vortrag is zero. Only Konten with a value. Each Konto opens konto.ledger_sheet {konto, von, bis}
report.profit_and_loss {form, knoten: [Knoten], ergebnis, ergebnis_vergleich, nicht_zugeordnet: [KontoWert]}; values signed as they enter the result (Erträge positive, Aufwendungen negative); guv.15 and guv.17 (and guv.k.8) are sums of the lines above them
report.balance_sheet {form, stichtag, vergleich_stichtag, aktiva: [Knoten], passiva: [Knoten], summe_aktiva, summe_passiva, summe_aktiva_vergleich, summe_passiva_vergleich, geprueft, differenz, ergebnis: {wert, vergleich, guv: {von, bis}}}; values positive on their side. Passiva A. V. holds the result of the Wirtschaftsjahr up to the Stichtag as a line {konto: null, virtuell: "ergebnis"}, ergebnis.guv is the range of the GuV behind it; the result of earlier Wirtschaftsjahre that no Buchung carried forward sits in A. IV. as {konto: null, virtuell: "vortrag"}. geprueft: Aktiva equal Passiva to the cent (“Aktiva = Passiva: geprüft”), else differenz
report.bwa {schema: {kennung, gueltig_ab}, zeilen: [{zeile, bezeichnung, art: "konten" | "summe" | "ueberschrift" | "nicht_zugeordnet", wert, kumuliert, vergleich, anteil, konten: [KontoWert]}], ergebnis, ergebnis_guv}: the rows and interim sums in the order customary in the industry, the product’s own labels, from the rule set bwa standard (regelwerk/bwa-standard-2026-01-01.toml; another row list is a swap of the file). Values signed as they enter the result. kumuliert from the start of the Wirtschaftsjahr to bis; anteil percent of the first interim sum (S1), null when it is zero. A booked Erfolgskonto in no row stands in the row 22 (nicht_zugeordnet), present only when not zero. The last row (S9, “Ergebnis laut Buchführung”) equals ergebnis_guv, the GuV result of the period, to the cent. hinweise always has vor_abschlussbuchungen. No form or vendor name appears
report.cost_centers {kostenstellen: [{kostenstelle_id (null: ohne Kostenstelle), nummer, bezeichnung, archiviert, ertrag, aufwand, ergebnis, ergebnis_vergleich, konten: [KontoWert]}]}: the Erfolgskonten per Kostenstelle, signed (Erträge positive, Aufwendungen negative); every Kostenstelle, the row without one last when it has values
report.liquidity {heute, letzte_bankdaten, bestand: {betrag, konten: [{konto, bezeichnung, bankkonto_id, saldo}]}, wochen: [{von, bis, eingaenge, ausgaenge, steuern, bestand}], posten: [{art: "forderung" | "verbindlichkeit" | "meldung", datum, betrag, text, posten_id, meldung}]}: the Konten of position Aktiva B. IV. (Bankkonten, Kasse; a credit balance reduces it) today, and eight weeks Monday to Sunday from the week of today. posten: open Offene Posten with their remainder, at their Buchung date or in the first week when older (a Posten without a due day is due at once, § 271 Abs. 1 BGB); the unpaid tax of Meldungen with Kennzahl 83 above zero whose frist.zahlung_bis lies from today to the end of the eighth week, read through one function (decuma_meldung::befehle::steuerzahlungen(ctx, von, bis) → [{meldung, bezeichnung, faellig_am, betrag, bezahlt}]); a payment of the tax is not recorded yet (bezahlt is always false, so a Meldung due earlier is not counted); issue #134 records the payments and fills bezahlt there, without a change to Liquidität. Recurring Rechnungen (Books 3) and Fixkosten (Books 4) join when they exist. The period of the query is not used. hinweise has letzte_bankdaten
report.overview {kennzahlen: {umsatz, ergebnis, liquiditaet, offene_forderungen} each {wert, vergleich, veraenderung} (umsatz: position guv.1; liquiditaet on bis; offene_forderungen as open_item.list on bis), monate: [{monat: "YYYY-MM", ertrag, aufwand, ergebnis, liquiditaet}] (each month of the period, at least the twelve up to bis; liquiditaet at month end), groesste_ertraege, groesste_aufwendungen: [{konto, bezeichnung, kategorie, wert}] (top 5 Konten of the period; kategorie the sentence of a Kategorie booking to it, or null), offene_posten: {summe_forderungen, summe_verbindlichkeiten, altersklassen}, umsatzsteuer: [{meldung, von, bis, zahllast, zustand, stand_heute}] (the Voranmeldungszeiträume overlapping the period, from the engine of Filing 1; stand_heute for the running one)}. The overviews Einnahmen and Ausgaben (first tab of each section) read kennzahlen.umsatz, groesste_ertraegeorgroesste_aufwendungenandumsatzsteuer`. No estimate of income taxes

Shapes: Knoten = {position, bezeichnung, norm, ebene, wert, vergleich, summe, kinder: [Knoten], konten: [KontoWert]} (a node’s value is the sum of its children and Konten; positions without a value in both columns are left out, § 265 Abs. 8 HGB, except sum lines). KontoWert = {konto, bezeichnung, wert, vergleich, virtuell: null | "vortrag" | "ergebnis"}. Datei = {dateiname, medientyp, inhalt} (inhalt base64).

Report position → konto.ledger_sheet {konto, von, bis} (opening balance, every line with the running balance, closing balance; buchung_id, nummer, beleg_ids) → buchung.get (lines with kostenstelle_id, Actor and Begründung, Storno and Korrektur, belege) → beleg.get (with buchungen) → the Vorgang. A Kennzahl of a Meldung opens its buchungen (Beitrag with konto), grouped by Konto in the app. Offene Posten (open_item.list, open_item.get) join the same chain. Geschäftspartner come with Books 3.

Name Payload Result and refusals
cost_center.create {nummer, bezeichnung} Kostenstelle. conflict: the number exists; validation: empty number or label
cost_center.archive {kostenstelle_id} Kostenstelle with archiviert_am; new lines naming it are validation; it stays in reports
cost_center.delete {kostenstelle_id} {kostenstelle_id}. conflict when a Buchungszeile names it (next_step “archivieren (cost_center.archive)”)
cost_center.list (query) Listenabfrage Liste of {kostenstelle_id, nummer, bezeichnung, angelegt_am, archiviert_am, zustand}; text nummer, bezeichnung; date angelegt_am; categorical zustand (aktiv, archiviert); sortable nummer, bezeichnung, angelegt_am; CSV yes

A Buchungszeile gains kostenstelle_id (optional): ManuelleBuchung.zeilen[] and Erfassung.belegdaten.zeilen[] take kostenstelle_id?. On a keyed line it goes on the base line and on a non-deductible tax line (a cost), never on tax lines. A Storno keeps it. An unknown or archived one is validation.

Listenabfrage.format and Berichtsabfrage.format take csv, xlsx and pdf: the same query, the file produced by the server, so CLI and MCP get the same bytes. The result carries datei = {dateiname, medientyp, inhalt} for all three (a list keeps csv as text too). Content: exactly the filtered rows in the sorted order (lists: every page) with the columns of the CSV. Header in Excel and PDF: Mandant, report name, period (“alle” without one), time of export. Excel: one sheet, the header lines, an empty line, the column row, the rows; amounts with two places as numbers, YYYY-MM-DD as dates. PDF: A4 landscape, the same header on every page with the page number, black text only, amounts right-aligned in the caller’s notation. Trees export expanded, the level as indentation of bezeichnung (columns seite, position, bezeichnung, konto, wert, vergleich). More rows than DECUMA_EXPORT_MAX_ROWS (default 20000) is conflict (next_step “Zeitraum verkleinern oder den vollständigen Export verwenden”). The CLI writes datei to --out <path> (every query).

Name Payload Result
history.list (query) Listenabfrage Liste of Verlaufseintrag, newest first; text satz, begruendung; date zeit; categorical actor_art (human, api_schluessel, regel, agent, system), actor_id, objekt_art, objekt_id, origin_kind, origin_id (any object the entry names: “Verlauf dieses Belegs” is filter: {objekt_id: [beleg_id]}); sortable zeit, seq; CSV yes
history.get (query) {seq} Verlaufseintrag with payload, result, aenderung: [{feld, alt, neu}] | null (beleg_data.correct: the fields of the record it replaced and of the new one that differ; master_data.set and master_data.set_from: each field set with its value of the previous entry of that Command). not_found for an unknown seq
history.check (query, exists) {} {entries, fault}: “Kette prüfen”; fault: null is an intact chain

Verlaufseintrag = {seq, zeit, actor: {art, id, name}, actor_art, actor_id, command, satz, objekt: {art, id} | null, objekt_art, objekt_id: [id], begruendung, warnungen: [Warnung], origin: {kind, id, display_name} | null, origin_kind, origin_id}. origin is what the caller set on the call (below). actor.name is always the real Actor: “du” for the caller, “eine Person” for another person, “API-Schlüssel ”, “Regel ”, “ein Agent”, “System” (never a bare id; the id is actor.id). actor.subtitle, only with an origin: its display_name and the Actor it came through (“Shop-Sync · über API-Schlüssel Skript”). satz: what was done in one sentence in the caller’s language (the Command name for a Command without a sentence). objekt.art: buchung, beleg, vorgang, posten, bankumsatz, bankkonto, meldung, kostenstelle, api_schluessel, stammdaten.

Origin: every Command call may carry origin {kind, id, display_name} next to payload and rationale (REST body, MCP tool argument, Call::origin in process): who or what the call comes from beyond its Actor, for example {kind: "automation", id: "<the caller's id>", display_name: "Nightly import"}. kind is 1 to 40 of a-z, 0-9, _; id 1 to 200 and display_name 1 to 120 characters without control or invisible format characters (bidi controls, zero-width); display_name is not a reserved name (“du”, “Inhaber”, “System”, …) and does not contain the name of a person or Gesellschafter of the Mandant; otherwise validation. It is stored and hashed with the log entry and with the entries of the Commands it runs inside (Command-Log format); the Actor stays what the credential is, so an origin never widens or names a right. A query ignores it.

Name Payload Result
search (query) {text, kind?, je_art?} {text, groups: [{kind, count, hits: [Treffer]}], searched: [{kind, felder}]}; kind: page, beleg, invoice, contact, buchung, bank_transaction (payer or payee, remittance text, IBAN, references; the amount without its sign; a hit waiting for its Rückfrage has next_command bank_transaction.clarify), knowledge (groups without hits are left out)
  • The one search (#238) of the top line (overlay on Ctrl/Cmd+K), #/suche/<text> and the Startseite field, live while typing (one query per pause); the same query for programs over REST, MCP and the CLI. text 2 to 200 characters (validation); je_art hits per kind, default 5, at most 100; count all hits of the kind (“Alle n anzeigen” sends kind and a larger je_art). PostgreSQL only; no search server, no model.
  • Matched: a page or function by its name and synonyms in German and English (register crates/decuma-auswertung/src/seiten.toml, typing errors by trigram similarity); a Beleg by number, Aussteller, Rechnungsnummer, kind, Belegdatum, gross (without a gross in its data: the amount of its first Buchung); an invoice by number, customer, text, items, date and gross; a Kontakt by number, name, place and USt-IdNr.; a Buchung by text, number, date and sum; Wissen by the words of a section of the published knowledge base (all words in one document is the filter; the sections rank by how many of the words they hold themselves, all of them first, then the full-text rank). An amount in German notation: with a comma to the cent (1.428,00, 1428,5), without one every amount of that many whole euros. A date TT.MM.JJJJ.
  • Ranking, fixed: (0) an exact ref (Rechnungsnummer, invoice number, Kontakt number or name), number, amount or date, or a whole page name; (1) a prefix of the name or ref; (2) every word found (full-text, German configuration, or inside a word); (3) a page with typing errors. Within a tier the full-text rank, then newest first. Groups follow the tier of their first hit, then the order page, beleg, invoice, contact, buchung, knowledge.
  • Treffer = {kind, id, zeile, date, amount, href, command?}; id is null for a page and for Wissen; href the app route (#/belege/<id>, #/einnahmen/rechnungen/<id>, #/einnahmen/kunden/<id>, #/journal/<id>, a page route) or, for Wissen, the document’s published address with the section’s anchor; command the Command a function starts (invoice.create_draft).
  • A page or function is a hit only when the caller may run the Command it starts and the query its screen reads (the policy’s list of tools); payroll pages need “Sieht Lohn”, Bilanz, GuV and Anlagen a Mandant that keeps a Bilanz. Without “Sieht Lohn” no payroll Buchung is a hit (the Buchungen of a payroll run, payroll payments and their Stornos), nor the Lohnjournal of a run (its Eigenbeleg). Objects only of the caller’s Mandant (row-level security). A search runs at most 2 s; past that it is refused (validation) with a next step.
  • Wissen: DECUMA_KNOWLEDGE_DIR names a directory of Markdown documents (the published knowledge base), split at its headings of level 2 and 3 when the server starts; DECUMA_KNOWLEDGE_URL the address they are published under. A document with status: draft and sections headed “Offene Punkte”, “Offen” or “StB-Frage” (any level) stay out; symbolic links are not followed; without the directory Wissen is empty.

Konto numbers and Steuerschlüssel are in every result; the app shows them beside the plain labels only while the Profi-Ansicht is on. Auswertungen tabs: Übersicht, SuSa, BWA, GuV, Bilanz, Offene Posten, Liquidität, Kostenstellen (Bilanz and GuV only with mandant.lesen.bilanz).

The Einkommensteuererklärung of a household (issue #130, ADR 0037): the facts the household states are typed records of the Privatsphäre (“Angaben” per year, master records across years), changed only by Commands; a pure engine (crate decuma-einkommensteuer) computes from them and the rule data of the year (regelwerk/einkommensteuer-veranlagung-2025-01-01.toml) the whole scheme of R 2 EStR, for the Zusammenveranlagung and for each Person alone. Every Command and query is Mandant-scoped and only for a Mandant of the kind natürliche Person (else not_allowed). Veranlagungsjahr 2025 only: another year is validation (“Für dieses Jahr gibt es die Erklärung noch nicht”). Every computed tax reads as an estimate (“Schätzung nach der Formel des Gesetzes”); the Finanzamt computes. No text names the state of our sources (ADR 0039). Belege of a Privatperson, the reading port and the provider of Hinweise are in the last sections.

Kind Where Fields (werte)
person (master, bezug = Person id) private.set_master_record {geburtsdatum?, land? ("BY", "NW", ...), kirchensteuerpflichtig, haushaltsgemeinschaft}
ehe (master, one per Mandant) private.set_master_record {verheiratet_am, dauernd_getrennt_seit?}
kind (master) private.set_master_record {name, geburtsdatum?, identifikationsnummer?, monate (Kindergeldanspruch in the year, default 12), zu_beiden, im_haushalt, uebertragung}
mietobjekt (master) private.set_master_record {bezeichnung, lage?, fertigstellung (year), kaufvertrag_am?, uebergang, vermietung_ende?, gebaeudeanteil, gebaeudeanteil_herkunft: "kaufvertrag" | "arbeitshilfe", anteil_a_prozent, wohnflaeche?}
rente (master, bezug = Person) private.set_master_record {art: "basis" | "privat", traeger?, beginn, steuerfreier_teil?, jahresbetrag_folgejahr?, folgerente, anders_geaendert}; the steuerfreier Teil fixed in the year after the start is stored here and read by every later year
betrieb (master, bezug = Betrieb id) private.set_master_record {einkunftsart: "gewerbebetrieb" | "selbstaendige_arbeit"}: asked once per Betrieb, never decided by the software
lohnsteuerbescheinigung (bezug = Person) input.set numbers of the certificate: {bruttoarbeitslohn (3), lohnsteuer (4), solidaritaetszuschlag (5), kirchensteuer (6), arbeitgeber_fahrten (17 + 18), rv_arbeitgeber (22a), rv_arbeitnehmer (23a), kv (25), pv (26), av (27), von?, bis?, steuerklasse?, faktor, freibetrag, vorsorgepauschale?}
arbeit (bezug = Person) input.set {entfernung_km, arbeitstage, kraftwagen (default true), ticketkosten, tage_zu_hause, arbeitsmittel, fortbildung, kontofuehrung, weitere_werbungskosten}
vorsorge (bezug = Person) input.set {basisrente, kv, krankengeldanspruch, pv, zuschuss?, ohne_eigene_beitraege, kirchensteuer_gezahlt, kirchensteuer_erstattet}
aufwand (household) input.set {art: "kinderbetreuung" | "spende" | "krankheitskosten" | "handwerker" | "haushaltsnahe_dienstleistung" | "minijob" | "sonstige_vorsorge", betrag, getragen: "a" | "b" | "gemeinsam", ueberweisung, kind?}
mietobjekt_jahr (bezug = Mietobjekt) input.set {miete, umlagen, nachzahlung (minus: refund), zinsen, erhaltung: [{leistung, netto, bezahlt, verteilung_jahre?, nicht_mitzuzaehlen}], umgelegte_kosten, nicht_umgelegte_kosten, sonstige_kosten, fahrten?: {anzahl, einfache_km, regelmaessig?}, vergleichsmiete?: {miete, umlagen, ortsuebliche_kaltmiete, umlagefaehige_kosten}}
rente_jahr (bezug = Rente) input.set {jahresbetrag, anpassungsbetrag?}
gewinn (bezug = Betrieb) input.set {gewinn, hebesatz?, messbetrag_bescheid?, gewerbesteuer_bescheid?}: only for a Betrieb whose Gewinnermittlung is not in the product

Every record has herkunft (getippt, beleg, hinweis, api, betrieb) and beleg_ids. A Betrieb with Buchungen gets its profit from its Gewinnermittlung (year-end ticket); until that query exists Anlage S and G work with the recorded profit only.

Name Payload Result and refusals
tax_return.create (idempotent) {jahr} {jahr}. validation for a year without rule data and forms
tax_return.configure {jahr, veranlagungsart?, haelftig?, ausserhalb?: [key]} {jahr, veranlagungsart}. validation when the Zusammenveranlagung is chosen and § 26 Abs. 1 EStG is not met (detail names the condition: two Personen, the marriage, not dauernd getrennt the whole year). ausserhalb: the answers “ja” of the first section, keys of erklaerung.lesen.ausserhalb_fragen
tax_return.set_section {jahr, abschnitt, erledigt} {abschnitt, erledigt}; sections personen, arbeit, wege, arbeitsmittel, vorsorge, kinder, spenden, haushalt, agb, vermietung, renten, betriebe, pruefung
private.set_master_record (idempotent) {id?, art, bezug?, werte} {id}: creates or replaces a master record
private.remove_master_record {id} {id}
input.set (idempotent) {jahr, id?, art, bezug?, werte, herkunft?, beleg_ids?} {id, warnungen}: creates or replaces an Angabe; old and new value in the Command-Log
input.remove {id} {id}
notice.record {jahr, titel, norm, vorschlag: {art, bezug?, werte}} {id, wirkung}: a Hinweis of the user’s own agent (API); wirkung computed by the engine (result with the proposal minus without)
notice.create_from_beleg {jahr, beleg_id} {hinweise: [{id, wirkung}]}: the installation’s Hinweis provider (port HinweisQuelle) reads the Beleg and proposes Hinweise; each is stored with quelle: "port" and the beleg_id, its wirkung computed by the engine. not_allowed without a provider (the open build has only the fake of DECUMA_NOTICE_SOURCE=fake decuma dev; erklaerung.lesen.hinweis_lesung says whether one is configured); conflict with the provider’s reason when it could not read
notice.adopt {id} {angabe_id}: writes the proposed Angabe with herkunft: "hinweis"
notice.dismiss {id? , code?, zurueck?: bool} {zustand}: “Nicht relevant”, can be taken back; code for a rule Hinweis

Refusals of the record Commands: an Angabe for a Person, master record or Betrieb that is not part of the Mandant, or for a year without an Erklärung, is validation; a value the rule cannot hold is validation naming the field (more Arbeitstage plus Homeoffice days than the year has, a Rente without beginn, anteil_a_prozent outside 0 to 100, a share of the building above the acquisition cost, a verteilung_jahre outside 2 to 5, a Mietobjekt without bezeichnung or with vermietung_ende before uebergang, a negative amount where the form has no minus (only nachzahlung of a Mietobjekt and gewinn may be negative), an erhaltung paid after the year, an anpassungsbetrag above the jahresbetrag, a rente_jahr for a Rente that begins after the year, a hebesatz below the Mindesthebesatz); a gewinn for a Betrieb with Buchungen is conflict (next_step “Gewinn in der Gewinnermittlung des Betriebs ändern”); mandant.get marks such a Betrieb has_bookings: true, and the app offers no profit form for it, only the way to its Gewinnermittlung.

Warnings in warnungen (code and one plain line): no_effect (the entry lies below a Pauschbetrag or above a Höchstbetrag; the text names the amount from which it counts), payment_method_not_eligible (cash for Kinderbetreuung or § 35a costs), pflichtveranlagung (the entry makes the Erklärung a Pflicht, with the Frist), fachlich_zu_beurteilen (the entry touches a topic that depends on the facts of the case), steuerfreier_teil_ersatzweise, gewerbesteuer_from_hebesatz (Gewerbesteuer computed from profit and Hebesatz until the Bescheide are recorded), limit_almost_reached (15-Prozent-Regel while its period runs), tax_return_already_filed (a change after the Übermittlung; the Meldung shows transmitted and new value).

Name Payload Result
tax_return.get {jahr} Erklaerung
tax_return.effect {jahr, abschnitt} {abschnitt, mit, ohne, wirkung}: the outcome (Erstattung positive) with and without the Angaben of the section, two full computations
est.get_filing {meldung} EstMeldung
est.input_sheet {meldung} EstEingabeblatt of the newest Freigabe; conflict “erst freigeben” without one
form_definition.est (public) {jahr} {kennung, gueltig_ab, nicht_unterstuetzt: [{anlage, zeilen, grund}]}
  • Erklaerung = {jahr, veranlagungsart, gewaehlt, zusammen_moeglich, haelftig, personen: [{id, name, stamm}], kinder, mietobjekte, renten, betriebe, angaben: [Angabe], abschnitte: [{abschnitt, erledigt, offen: [text]}], ergebnis: Ergebnis (the engine result as JSON: zusammen, einzeln, anlagen_v, renten, betriebe, pflicht, unterschied), einfach: Einfach, hinweise: [Hinweis], offene_punkte: [OffenerPunkt], unvollstaendig: bool, ausserhalb_fragen: [{key, frage}], meldungen: [{meldung, personen}], belege: [{art, belegart, angabe_id, da, beleg_ids}] (the Belege expected from the Angaben; belegartis the kind in the Belegablage:lohnsteuerbescheinigung, versicherungsbescheinigung, spendenquittung, handwerkerrechnung, mietunterlage, rentenbescheinigung, betriebsunterlage, sonstiges; a Beleg is linked by beleg_idsofinput.set), frist: {datum, art: "pflicht" | "antrag", fall, lage: "offen" | "heute" | "abgelaufen", text}}.
  • Einfach = {satz, betrag, richtung: "erstattung" | "nachzahlung" | "null", zeilen: [{label, betrag, teile: [{label, betrag}]}] (four lines: Einkünfte, Abzüge, Steuer, schon gezahlt), naechster_schritt: {code, text, href}, vergleich: string | null}.
  • Hinweis = {id | code, quelle: "regel" | "port" | "api", titel, text, norm, wirkung (euro, also 0.00), vorschlag?, zustand}. Rule Hinweise: vergleich_veranlagungsart (wording of kb zusammenveranlagung.md, never a recommendation), no_effect (with the amount from which it counts), grenze_15_prozent, miete_unter_quote, weitere_einkuenfte (what the further Einkünfte cost), pflicht_frist, gewerbesteuer_belastung.
  • BelegErwartet = {art, belegart, angabe_id, da, beleg_ids, gelesen: [{feld, nummer, wert, zustand: "gelesen" | "bitte_pruefen", uebernommen}]}: gelesen is what the reading port read from the newest linked Beleg, as fields of the Angabe (a Lohnsteuerbescheinigung by its numbers in Belegdaten.felder.lohnsteuerbescheinigung, e.g. {"3": {wert, zustand}}, Nr. 17 and 18 summed; a cost or a Rente by felder.brutto). It writes nothing: “Übernehmen” is input.set with the values and herkunft: "beleg". Without a reading it is empty and no screen mentions one.
  • OffenerPunkt = {code, text, sperrt, abschnitt}: what is still to do (open sections, missing Belege, open Hinweise), then every point of the engine that the Angaben touch. sperrt: true blocks the Freigabe.
  • EstMeldung = {meldung, bezeichnung, jahr, personen, zustand: "entwurf" | "freigegeben" | "uebermittelt", werte: [Formularwert], stand, stand_hash, schaetzung: {festzusetzende_einkommensteuer, solidaritaetszuschlag, kirchensteuer, erstattung, hinweis: "Schätzung nach der Formel des Gesetzes"}, offene_punkte, freigabe_fehlt: Schritt | null, freigabe: Freigabe | null, haftung: string | null (Zusammenveranlagung: "Beide schulden die gesamte Steuer (§ 44 Abs. 1 AO)."), anlage_euer: [{betrieb, text}], abweichungen: [{schluessel, uebermittelt, berechnet}]}; Formularwert = {schluessel, anlage, person, objekt, zeile, bezeichnung, wert, quelle}.
  • Meldung names: est-2025 for one Person or a Zusammenveranlagung; with Einzelveranlagung of spouses est-2025-a and est-2025-b, each with its own hash, Freigabe and input sheet.
Name Payload Result and refusals
est.release (filing, human Inhaber only, second factor) {meldung, hash, offene_punkte_gelesen: true, fuer_beide?: true} {freigabe_id, meldung, hash}. Refusals in this order: needs_human for an API-Schlüssel, a Regel or the Agent (next_step #/steuern/<meldung>/freigabe); conflict for a case outside the scope (next_step “In Mein ELSTER fertigstellen oder fachlich klären lassen; die Werte bis hierher stehen im Eingabeblatt”); conflict for an open point with sperrt (detail names it, next_step the section); conflict without an Identifikationsnummer of the Personen or without a Steuernummer when the household has Gewinneinkünfte; conflict when hash is not the hash computed now; conflict when this version is already übermittelt; validation without offene_punkte_gelesen (“Ich habe die offenen Punkte gelesen und gebe trotzdem frei”) or, for a Zusammenveranlagung, without fuer_beide (the confirmation for both Personen; both names are stored with the Freigabe).
est.transmit (filing) {meldung} {uebermittlung_id, eingabeblatt}: way “Von Hand in Mein ELSTER” only
est.mark_as_transmitted (filing) {meldung, transferticket} {uebermittlung_id, transferticket, uebermittelt_am, wie_es_weitergeht}, the same object est.get_filing returns as uebermittelt afterwards; conflict when a value changed since the Freigabe

The Meldungsstand is {v: 1, meldungsart: "einkommensteuer", formular: {kennung: "est", gueltig_ab: "2025-01-01"}, steuernummer, zeitraum: "2025", personen: ["a"] | ["a", "b"], version: 1, werte: {schluessel: wert}}, hashed as the Meldungsstand format. The computed tax is not part of it. A changed Angabe that changes a form value makes the Freigabe verfallen and the input sheet outdated; one that leaves every value equal does not. Frist from the rule data: Pflicht 31.07.2026, Antrag 31.12.2029; on or after it one line says so, nothing is blocked. The Eingabeblatt lists the values in the order of the forms; for a Mandant with a Betrieb it states that the Anlage EÜR is an own filing.

Payroll of a Betrieb month by month (issue #133, ADR 0040), backend first; screens follow. Every name is Mandant-scoped and a payroll capability (decuma_lohn::befehle::NAMEN): with Work 1 a team member needs the right “Sieht Lohn”; until then the Inhaber and his API-Schlüssel only. Amounts are decimal strings in euro, dates YYYY-MM-DD, months YYYY-MM. Rule data: regelwerk/lohn-*.toml (art lohn, status per value); a month whose year has no final value it needs is refused with conflict, next_step “Regelwerk aktualisieren”.

Without “Sieht Lohn” a team member (and an API-Schlüssel, Regel, webhook or Agent acting for one; an Agent acting for no Account) reads no payroll row anywhere; the aggregates stay complete. Payroll rows are the Buchungen of a payroll run, the payroll payments, their Stornos and Korrekturen (transitively), the Eigenbelege of the runs, the Belege that belong to payroll Buchungen only (a payslip filed with a payment, the Eigenbeleg of a correction; no bank document), the cases that hold nothing else, the bank lines linked to one of these Buchungen or debits to an account stored for an employee, now or earlier (compared without spaces and case; also before they are linked), and the case of such a bank line with its Rückfragen.

  • Journal, buchung.get, beleg.list, beleg.get, inbox.list, inbox.count, case.get, open_item.list, open_item.get, incoming_invoice.list, business_partner.get, the open purchases of asset.list, search, history.list, history.get, event.poll: payroll rows are left out (not_found for one asked by id; history.get of a payroll Command’s own entry is not_allowed). A history entry is left out as a whole when any id in its payload or result is a payroll row (a bank import with one salary line included), or any text in it holds an account stored for an employee.
  • konto.ledger_sheet and report.liquidity: one neutral line Lohn <YYYY-MM> per payroll month and kind with the sum, no person, text, Gegenkonto or Beleg; the account sheet dates it on the payment day of the month’s run, the liquidity forecast on the earliest due day of the kind. Balances and the forecast stay those of the books.
  • bank_transaction.list and bank_transaction.get: a payroll bank line keeps amount, days and bank reference; its other side and purpose read Lohnzahlung, its IBAN, end-to-end reference, case and links to payroll Buchungen are absent. A collective transfer that pays payroll and something else is neutralised as a whole. Lines not paying payroll stay as imported; a scanned bank statement stays a bank document.
  • cash_book.get: an entry of payroll keeps amount and day, its text reads Lohnzahlung and its Beleg is absent.
  • A case that holds payroll beside something else (an invoice and a payslip of one mail, an ordinary Buchung and a payroll correction) is shown and worked with what is not payroll: case.get, inbox.list and filing.get leave out its payroll Belege, Buchungen, proposal, texts and amounts. The note of the open cases in a report counts every case; its sum is of the amounts the caller may see.
  • Candidates of a bank line (bank_transaction.get, matches of both) are never payroll rows. The rules of the Abgleich read all rows whoever runs them, so an import, bank_transaction.assign_matching and the rates of recurring expenses store the same for everyone; a line whose candidate is hidden stays open without a question, and bank_transaction.assign with erfassung or a rate, bank_transaction.clarify and recurring_expense.clarify_deviation refuse it (conflict: it may be booked already, the Inhaber or a person with the right links it).
  • Files (file.get, GET /v1/files/{hash}): payroll documents and the pages of payroll Belege are not_found; a document that may hold payroll beside other things (every bank delivery and statement once the Mandant has employees, as in the export) is not_allowed. What was read from a bank statement (a Beleg ever read as one, also when the kind was changed later) is absent with it: beleg.get (pages, belegdaten, history, reading_outcome; the hint payroll_withheld says so), the issuer and amounts in beleg.list, inbox.list, search, incoming_invoice.list, the questions of its reading and its proposal in case.get, its entries in history.*, the outcome of its reading in event.poll and webhooks, its values for a Regel acting without the right; invoice_check.get is not_found. A Command that names such a file by its hash is refused as the file is. Bank statements stay with “Sieht Lohn” also for the one who uploaded them; a Mandant without employees hides nothing.
  • Totals stay whole: where a Konto, a Kostenstelle or a month holds the payroll of one person only, a total (BWA, Summen und Salden, a neutral line of the ledger sheet, the amount of a bank line) is that person’s figure. The right hides rows, not totals.
  • Payroll booked by hand or taken over from an earlier program is not recognised as payroll rows.
  • Reports (Salden, BWA, GuV, Bilanz, UStVA, Kontensummen) count every row.
  • mandant.export and beleg.export_zip come without payroll and are never taken for the complete file: payroll_included: false and the warning export_without_payroll in the result, -ohne-lohn in the file name, OHNE-LOHN.txt on top, complete: false, payroll_included: false and without_payroll (the tables left out, the tables with rows left out, the numbers of the Belege left out) in manifest.json; scripts/verify_export.py ends with code 3. Left out: the payroll tables (tables.toml, [payroll]), every row that names a payroll row, a payroll Command or a Lohnsteuer-Anmeldung, also in the Command-Log (each entry is still checked by itself, the chain has gaps) and in Events, notifications, questions, rules and transmissions, the files of payroll Belege and documents, Belege filed with a payroll Buchung, the files of every bank delivery (statements, once the Mandant has payroll), rows that hold an account stored for an employee, the refused attempts, e-mails that brought one of these, and files no exported row refers to. Bank lines paying payroll are left out (no neutral line); a collective transfer that also pays something else is left out as a whole, its other Buchungen stay. A reference made with the right downloads nothing once the right is gone; an export without payroll does not count as the export mandant.delete asks for. The selection reads one snapshot and fails closed: a table not classified is left out (decuma-server/src/ohne_lohn.rs).
  • datev.export and check.export are refused (not_allowed) for a period that holds payroll Buchungen, never made in part: the receiver adds the rows up (the balances of the audit data, the Buchungsstapel in the books of the receiver) and the format has no place that says rows are missing. A period without payroll exports the same complete file as for everyone. A repeated idempotency key answers with the stored file only with the right (not_allowed otherwise: run it again with a new key).
  • A Command that names a payroll row by id (buchung.storno, buchung.correct, bank_transaction.assign, …) answers not_found; so does switching on or changing a Regel whose action names one.
  • rule.*, confirmation.list, history.get and a repeated idempotency key show no payload of a payroll Regel (nor one that names a payroll row); rule.test, rule.history and rule.rollbacks leave payroll rows out; rule.rollback_preview and rule.roll_back of a selection with payroll are not_allowed; rule.apply_again of a payroll Regel is not_allowed, of any other Regel it leaves the payroll cases alone; automation.resume leaves payroll Regeln paused (warning payroll_rules_stay_paused); bank_transaction.assign_matching links no payroll row.
  • filing.get and filing.list: an unresolved bank line of payroll is neutral (Lohnzahlung, no id) and an open payroll case is not listed; it still keeps the Freigabe back (release_missing bankumsaetze_lohn, filing.release not_allowed): a person with “Sieht Lohn” settles it or gives the Freigabe.
  • beleg.list: the booked amount and the payment state come from the first Buchung that is no payroll.
  • The lines an import held back (case.get, questions[].rows): a debit to an account stored for an employee is neutral as in bank_transaction.list.
  • A Regel and a webhook act with the lesser rights of the person who created it and the one who changed it last; one without a known creator runs with a team member’s standard rights (Verwalten; no “Sieht Lohn”, no Freigabe). An Agent of the agent runtime holds the rights of the Account it acts for (Ports and hooks), the same standard rights when it acts for none, and is not_found on a Mandant that Account has no access to. Only a change of a Regel’s action or condition, or of a webhook’s URL or event types, makes the editor a co-owner; a new name or description does not.
  • krankenkasse.create { krankenkasse_id?, gueltig_ab, name, betriebsnummer, sitz_land, zusatzbeitragssatz, umlagesatz_u1, umlagesatz_u2, iban?, lastschriftmandat?, knappschaft? } → { krankenkasse_id }. A later state of the same id replaces it from its day. sitz_land is the Land of the Hauptverwaltung (two letters); it decides the Bankarbeitstage of the due day. iban: the account the Kasse publishes for contributions (checked, never estimated); lastschriftmandat: no transfer, the debit is expected on the due day; knappschaft: paid to the account of the Minijob-Zentrale (rule data regelwerk/lohn-einzugsstellen-*.toml).
  • payroll.set_settings { betrieb_id?, gueltig_ab, einstellungen: { land, u1_pflichtig, anmeldungszeitraum?, lohnsteuer_finanzamt?, lohnsteuer_steuernummer?, finanzamt_iban?, betriebsnummer?, minijob_lastschriftmandat? } } → { ok }. betriebsnummer (eight digits) names the Betrieb in the purpose of the contributions and in the SV reports. payroll.confirm_kirchensteuer_rate { betrieb_id?, jahr, satz } confirms (or replaces) the Kirchensteuer rate of a year for the Land of the Betriebsstätte while the rule data only propose it (2027: the rate of 2026 until the Kirchensteuerbeschlüsse are published, regelwerk/lohn-kirchensteuer-2027-01-01.toml); until then a month with Kirchensteuer is refused (validation) naming the proposed rate; table lohn_kirchensteuersatz. anmeldungszeitraum (monat, vierteljahr, jahr) is confirmed by the person; until it is set lohnsteuer_anmeldung.get is refused. lohnsteuer_anmeldung.period_proposal { jahr, grundlage } → { massgebende_lohnsteuer, vorschlag }: grundlage is { vorjahr: { lohnsteuer, monate } } (fewer than 12 months converted to a year) or { neu: { lohnsteuer_erster_voller_monat } } (times twelve); limits of § 41a Abs. 2 EStG from rule data; a new Betriebsstätte before its first full month is a Rückfrage (validation). land: Land of the Betriebsstätte (Finanzamt, Kirchensteuer rate, Fristen). u1_pflichtig: asked yearly, not determined.
  • employee.create { betrieb_id?, name, gueltig_ab, stand } → { arbeitnehmer_id, personalnummer }; employee.update { arbeitnehmer_id, gueltig_ab, stand }. stand: art (angestellte, geschaeftsfuehrer, minijob), beginn, ende?, arbeitslohn (fixed monthly), lohnsteuer (steuerklasse, faktor?, kinderfreibetraege, konfession? ev/rk, freibetrag_monat, hinzurechnungsbetrag_monat, private_basisbeitraege_monat), elstam_abgerufen_am, sv (krankenversicherung pflicht/freiwillig_firmenzahler/freiwillig_selbstzahler/privat/keine, rentenversicherung, arbeitslosenversicherung, kinderlos_ueber_23, kinder_unter_25, sachsen, berufsstaendisch with beitrag_versorgungseinrichtung (member of a berufsständische Versorgungseinrichtung: no RV contribution, the employer’s Zuschuss of § 172a SGB VI and its tax-free part in beitraege.zuschuss_versorgung, KRV = 0 in the Vorsorgepauschale), beschaeftigter for a Geschäftsführer: Beschäftigter im Sinne des § 7 Abs. 1 SGB IV, asked when missing), von_rv_befreit (Minijob), krankenkasse_id (required when pflicht), geburtsdatum?, status_herkunft (eigene_angabe/bescheid, required for a Geschäftsführer, nothing preselected), wohnsitz_land?. A state whose gueltig_ab lies in a settled month: conflict, next_step “Lauf korrigieren”. Warning status_own_input.
  • lohnsteuer.calculate { monat, arbeitslohn, lohnsteuer, sv, geburtsdatum?, land? } → { lohnsteuer, solidaritaetszuschlag, bemessungsgrundlage_kirchensteuer, kirchensteuer?, eingaben, rechenweg }: “Eingaben und Rechenweg” (the PAP inputs in cent under their official names; ZRE4J, VSP, ZTABFB, ZVE, LSTJAHR, JBMG in euro). For a privately insured person PKPVAGZ is the tax-free Zuschuss (§ 257 Abs. 2 SGB V, § 61 Abs. 2 SGB XI) from sv.beitrag_private_kv and sv.beitrag_private_pv.
  • payroll_run.preview { betrieb_id?, monat } → { monat, personen, ergebnis, konten }: ergebnis.abrechnungen[] per person (brutto, lohnsteuer, solidaritaetszuschlag, kirchensteuer, beitraege.zeilen[] per branch with satz, bemessungsgrundlage, gekappt, both shares, beitragsgruppe; arbeitnehmeranteil, arbeitgeberanteil, umlagen, nettolohn, gesamtkosten), beitragsnachweise per Einzugsstelle (field, amount, Gesamtsumme), lohnsteuer_anmeldung (Kennzahl, value), buchungen (lines by funktion); konten the Konto per Funktion. Everything in the way is a refusal naming it.
  • payroll_run.get { betrieb_id?, monat } → the runs of the month as stored, ersetzt for a corrected one.
  • lohnsteuer_anmeldung.get { betrieb_id?, zeitraum } (monat accepted as the old name) → see “Lohnsteuer-Anmeldung as a Meldung” below.
  • employee.list { betrieb_id? } → { arbeitnehmer[{ arbeitnehmer_id, personalnummer, name, staende[{ gueltig_ab, stand }] }] }, states oldest first. An Austritt is a new state with ende (the last day of a month), valid from the day after.
  • krankenkasse.list {} → { krankenkassen[{ krankenkasse_id, gueltig_ab, name, betriebsnummer, sitz_land, zusatzbeitragssatz, umlagesatz_u1, umlagesatz_u2 }] }, each in its newest state.
  • payroll.settings { betrieb_id? } → { betrieb_id, staende[{ gueltig_ab, einstellungen }], mandant_finanzamt?, mandant_steuernummer? }: the settings hold exactly one lohnsteuerliche Betriebsstätte; the Mandant’s Finanzamt and Steuernummer are its preset.
  • lohnkonto.get { arbeitnehmer_id, jahr } → { arbeitnehmer_id, personalnummer, name, jahr, zeilen[{ monat, lohnzahlung, brutto, lohnsteuer, solidaritaetszuschlag, kirchensteuer, krankenversicherung, rentenversicherung, arbeitslosenversicherung, pflegeversicherung, nettolohn }], summe }: the settled Abrechnungen of runs not replaced, contributions as the Arbeitnehmer’s shares (Krankenversicherung with Zusatzbeitrag, Pflegeversicherung with the Zuschlag for Kinderlose).
  • payroll.payments { betrieb_id?, monat } → { monat, abgerechnet, lohnzahlung, posten[{ schluessel, gruppe, empfaenger, betrag, faellig, regel, iban, verwendungszweck, lastschrift, hinweis, kandidat, bezahlt }] }: what the active run of a month owes (gruppe nettolohn per person, lohnsteuer = Kennzahl 83 to the Finanzamt, beitraege per Einzugsstelle = Gesamtsumme of its Beitragsnachweis), each due day with its rule in words: the day of the Lohnzahlung; the Frist of the Lohnsteuer-Anmeldung of the period the month belongs to; the third-last Bankarbeitstag at the seat of the Einzugsstelle (fristen::sv_termine; faellig null when the holidays of that Land are not on record). Purpose proposals: “Lohn/Gehalt ”, “StNr Lohnsteuer <MM/JJJJ>”, “ ” (Minijob-Zentrale with FKMJ/FKAG when Minijob and Knappschaft contributions are both paid there). kandidat is the one open outgoing Bankumsatz of the item’s amount (by purpose when several). payroll.record_payment { betrieb_id?, monat, posten, datum?, bankkonto_id?, bankumsatz_id? } (ledger_write) posts liability against the Bankkonto on datum (never assumed) or on the booking day of the Bankumsatz (same amount, also the debit of a mandate), which it links like an Offener Posten, with the Lohnjournal as Beleg, table lohn_zahlung; conflict when the item is recorded already; warning payment_after_due_date after the due day (for the Lohnsteuer with the Säumniszuschlag of the form’s note 7). payroll.roll_back_payment { lohn_zahlung_id } reverses it by Storno. payroll.payment_file { betrieb_id?, monat, gruppe, ausfuehrung, bankkonto_id?, verwendungszwecke? } → { dateiname, inhalt, anzahl, summe, nicht_erzeugt }: the SEPA credit transfer file (pain.001.001.09 in the DK profile GBIC_5, one writer decuma_lohn::sepa::pain001, cases bank-pain001-* with golden file, DK schema oracle scripts/orakel/sepa-pruefen.py) of the open items of nettolohn (IBAN of the person’s state), lohnsteuer (IBAN of the Finanzamt in the settings) or beitraege (account of the Kasse or of the Minijob-Zentrale; items with a mandate are left out; an Einzugsstelle without account is listed in nicht_erzeugt with amount, due day and purpose); verwendungszwecke maps an item’s schluessel to another purpose. The writer refuses, naming the field, a character outside the SEPA set, blank text, a name over 70 or a purpose over 140 characters, a wrong IBAN check digit or identifier; it never cuts or replaces. report.liquidity lists every unpaid payroll item until it is recorded or matched.
  • lohnsteuerbescheinigung.get { arbeitnehmer_id, jahr } → { von, bis, merkmale, finanzamt, steuernummer, frist, zeilen[{ nr, bezeichnung, betrag, bestandteile }], rueckfrage }: the numbers 3, 4, 5, 6, 22a, 23a, 25, 26, 27 of the Muster 2026 from the settled runs; 25 (with the Zusatzbeitrag) and 26 (with the Beitragszuschlag für Kinderlose) are filled for the compulsorily insured, 24 stays empty, 6 only with a Kirchensteuermerkmal; for a voluntarily or privately insured person 25 and 26 carry their parts with betrag null and a neutral rueckfrage; Frist the last day of February of the next year moved by § 108 Abs. 3 AO. Flat-rate taxed pay (Minijob) is refused (§ 41b Abs. 6 EStG). Nothing is transmitted (flag eric off).
  • sv_meldung.list { betrieb_id?, jahr } → { meldungen[{ schluessel, art, titel, formular, empfaenger, frist, felder[{ feld, wert, vorschlag }], rueckfrage, vermerk }] }: prepared reports for the SV-Meldeportal: Beitragsnachweis per settled month and Einzugsstelle (Frist the day before the fifth-last Bankarbeitstag), Anmeldung (Abgabegrund 10, six weeks after the start), Abmeldung (30, six weeks after the end), Jahresmeldung (50, 15 February of the next year, once December is settled); wert null is entered in the portal. The Entgelt is the pension base of the period in full euro (§ 5 Abs. 4 DEÜV); for a person without pension insurance it is null with the bases per branch and a rueckfrage; Personengruppe 101 is a vorschlag unless the person’s state names one (personengruppe). A Geschäftsführer without Sozialversicherungspflicht yields none. sv_meldung.record { betrieb_id?, jahr, schluessel, am } (filing: an API-Schlüssel or the Agent gets needs_human) records that a person sent it, warning beitragsnachweis_frist_past; sv_meldung.roll_back { vermerk_id }. No Command, route or file writes into the portal.
  • Occasions beyond start, end and turn of the year (#133 block 8): the states of a person split the employment into segments; a change of the Krankenkasse gives ab-<id>-<last day> (Abgabegrund 31) and an-<id>-<first day> (11), of the Beitragsgruppe 32/12, of the Personengruppe alone 33/13, across the Geringfügigkeitsgrenze an Ab- and Anmeldung whose Abgabegrund is chosen in the portal (null); every change has the Frist of § 6 DEÜV (§ 8 Abs. 3, § 12 Abs. 4): the Lohnzahlung of the first run on or after the change, at the latest six weeks after it, and appears in the Fristen. A Minijob exemption from the pension insurance received after the start splits the employment at the first of the month of receipt (Beitragsgruppe 6-1-0-0 to 6-5-0-0, 32/12, Frist from the day of receipt) and the run charges the pension contribution until then; received in the month of the start it is the report rv_exemption. A Beitragsnachweis under a Beitragsschätzung adds “Voraussichtliche Beiträge”, “Restbeitrag Vormonat” and “Summe”. Each report carries norm. Further art: sofortmeldung (so-<id>, Abgabegrund 20, Frist the first day, when the setting sofortmeldung_branch is true), rv_exemption (rvb-<id>, a Minijob with von_rv_befreit and rv_exemption_received_on, six weeks after receipt), uv_jahresmeldung (uv-<jahr>-<id>, 92, 16 February) and lohnnachweis (ln-<jahr>, 16 February), the last two once December is settled (or the employment ended), with uv_unternehmensnummer of the settings. A Beitragsnachweis equal to the previous month proposes a Dauer-Beitragsnachweis in rueckfrage; one that differs says so. Midijob months add “Kennzeichen Midijob” and “Entgelt Rentenberechnung” to Abmeldung and Jahresmeldung.
  • Lohn (#133, kb 7258d7f): sv.versorgungswerk_firmenzahler (with sv.versorgungswerk, the name): the employer pays the whole beitrag_versorgungseinrichtung (Abrechnung versorgungswerk {name, betrag, zuschuss}), the Zuschuss is posted gesetzliche soziale Aufwendungen to Verbindlichkeiten im Rahmen der sozialen Sicherheit, the person’s share is withheld (Verbindlichkeiten aus Lohn und Gehalt to the same), auszahlung is the net pay less the share, and payroll.payments lists one item versorgungswerk-<name> per Versorgungswerk (group beitraege, due day from its Satzung). Across the Geringfügigkeitsgrenze the reports carry 31/11; out of the Übergangsbereich no report, the Entgeltmeldung carries Kennzeichen Midijob 2. UV-Jahresmeldung: a Geschäftsführer without SV duty gets it only with uv_insured: true, without an answer a Rückfrage (no Frist), with false none; settings uv_hoechstjahresarbeitsverdienst caps its Arbeitsentgelt.
  • Lohn run (#133): auszahlung on each Abrechnung is the Auszahlungsbetrag (§ 1 Abs. 2 Nr. 7 EBV): nettolohn plus the Zuschuss to a berufsständische Versorgungseinrichtung (§ 172a SGB VI), which is in gesamtkosten and in Buchung 2 (gesetzliche soziale Aufwendungen to Verbindlichkeiten aus Lohn und Gehalt); the payment item of the person is auszahlung. A Zuschuss above half the monthly beitrag_versorgungseinrichtung is refused (validation). Entgeltbescheinigung: Steuertage and Sozialversicherungstage 30 for a full month, else the calendar days of the employment; Kennziffer zur Pflegeversicherung 0 or the children under 25 (at most 5), in words without a number for a proven Elterneigenschaft without a child under 25 and for the childless under 23 (empty when neither applies and the day of birth is missing); Lohnsteuer Merkmale freibetrag_jahr, hinzurechnungsbetrag_jahr beside the monthly amounts.
  • payroll.calendar { betrieb_id?, year } → { year, fristen[Frist] }: the payroll tasks of the year by day: elstam per month (done when every employed person has a retrieval in or after the month), beitragsnachweis per month and Einzugsstelle (abgabe_bis the Beitragsnachweis, zahlung_bis the due day; none without the holidays of the seat), lohnsteuer_anmeldung per Anmeldungszeitraum (done when transmitted) and sv_meldung (the reports with a Frist; done when recorded). frist.list contains the same entries for a person with “Sieht Lohn”.
  • elstam.record { employee_id, retrieved_on, source, lohnsteuer, valid_from? } → { retrieval_id, changed }: the Lohnsteuerabzugsmerkmale as read by hand in the official portal; every retrieval is kept (table elstam_abruf), changed Merkmale become a new state from valid_from (default the retrieval day; refused inside a settled month). elstam.list { employee_id } → { retrievals[{ retrieval_id, retrieved_on, source, valid_from, lohnsteuer, changed }] }. payroll_run.preview and payroll_run.finalize warn elstam_older_than_one_month per person whose last retrieval is older than one month (§ 39e Abs. 5 EStG).
  • payroll.checklist { betrieb_id? } → { steps[{ step, title, who, where, prepared, note, done, value, setting }] }: Unfallversicherung, Betriebsnummer, SV-Meldeportal, Statusfeststellung (with a Geschäftsführer), Lastschriftmandat. payroll.record_checklist_step { betrieb_id?, step, done, value? } → { ok } (table lohn_checkliste); a value lands in the payroll settings from today (uv_unternehmensnummer, betriebsnummer with eight digits, minijob_lastschriftmandat for minijob_zentrale).
  • payroll.unsupported_cases {} → { cases[{ kind, key, text }] }: the cases payroll does not settle (case) and the Kennzahlen of the Lohnsteuer-Anmeldung left empty (kennzahl); the Lohn section of Coverage is generated from the same list.
  • Run (#133 block 9): a pay above the Geringfügigkeitsgrenze up to the upper limit of the Übergangsbereich is a Midijob for an Angestellte insured in every branch outside Sachsen without Beitragsabschläge: contributions from BE and BE_AN, Umlagen from BE, uebergangsbereich { einnahme_gesamtbeitrag, einnahme_arbeitnehmeranteil } on the Abrechnung; a pay up to the limit names the kind Minijob. employee.create refuses a Minijob whose monthly pay lies above the limit (names Midijob or Angestellte); employee.update warns minijob_limit_exceeded when the Minijob pay lies above the limit in more than two months of the Zeitjahr (the twelve months ending with the month) or above twice the limit, and the run of such a month is refused (conflict); a single month above the limit is not settled yet (validation). gesellschafter_geschaeftsfuehrer_salary is returned when the pay of a Geschäftsführer (unless gesellschafter: false) is set or changed: a judgment topic, never assessed. New state fields: gesellschafter, rv_exemption_received_on; settings: sofortmeldung_branch, uv_unternehmensnummer.
  • The state of an Arbeitnehmer carries iban? and the payroll settings finanzamt_iban? for the transfer files.
  • payroll_run.finalize { betrieb_id?, month, lohnzahlung } (Freigabeklasse ledger_write) → { lohnlauf_id, beleg_id, buchungen, ergebnis }: stores every Abrechnung with its inputs, posts Buchung 1 (gross against Lohnsteuer, soziale Sicherheit, Lohn und Gehalt) and 2 (employer’s shares and Umlagen) on lohnzahlung with the Lohnjournal as Eigenbeleg. One run per Betrieb and month (conflict, “Lauf korrigieren”); lohnzahlung outside the month: validation.
  • payroll_run.correct { betrieb_id?, month } → { lohnlauf_id, storno }: Storno of the run’s Buchungen; the run stays, marked replaced. Another calendar year than the current one: conflict.

validation: the checks of the PAP’s calling program (Faktor only in class IV and not with a Freibetrag, no Hinzurechnungsbetrag in class VI, no Kinderfreibeträge in V and VI), another denomination than ev or rk, entry or exit inside the month, a Midijob in Sachsen or with Beitragsabschlägen, a voluntarily or privately insured Angestellte in a run, a person with SV duty and a monthly pay up to the upper limit of the Übergangsbereich in a run (Minijob or Midijob), kinderlos together with children under 25, a Geschäftsführer whose status as Beschäftigter is not answered (Rückfrage) or who is a Beschäftigter, a Kappung or Mindestkirchensteuer, a Kirchensteuer rate of the Land of residence other than the Betriebsstätte’s (a Rückfrage), missing settings or rates. conflict: a year without final rule data (a value not final yet refuses only the part it changes: payroll_run.preview returns the rest with open_parts, each naming the value, and warns payroll_part_open; payroll_run.finalize and the Beitragsschätzung refuse while a part they need is open), a second run, a state into a settled month, a Kontenrahmen without the Konto of a payroll Kategorie (names it). Warnings: status_own_input, kirchensteuer_without_cap, versicherungspflichtgrenze_exceeded, payroll_part_open.

Keys, documents, Beitragsschätzung, yearly update (#133)

Section titled “Keys, documents, Beitragsschätzung, yearly update (#133)”
  • employee.list: each state carries keys { beitragsgruppe, person_group, person_group_proposal }, derived from the answers (decuma_lohn::schluessel); null for a person without a duty to report. person_group_proposal: 101 applies only when no other group fits, a proposal until personengruppe is set.
  • stand further holds postal_address?, versicherungsnummer?, identifikationsnummer? (items of § 1 EBV and § 4 LStDV) and, for a Geschäftsführer with status_origin bescheid, the required statusfeststellung { date, beschaeftigter, beleg_id? } (its result must equal sv.beschaeftigter; beleg_id a Beleg of the Mandant).
  • payroll.set_settings: sofortmeldung_branch? (asked, § 28a Abs. 4 SGB IV), uv_unternehmensnummer?, contribution_estimate? (expected_amount, previous_month: § 23 Abs. 1 Satz 2 or 3 SGB IV).
  • payroll_run.finalize renders and stores per person the Entgeltbescheinigung of the month and the Lohnkonto of the year (PDF in the Belegablage, table lohn_dokument, insert-only); an item of § 1 EBV the master data lack is the warning entgeltbescheinigung_incomplete.
  • entgeltbescheinigung.get { employee_id, month } → { employee_id, month, marking, items[{ provision, label, value }], file{ hash, file_name } }: the data behind the stored PDF, every item of § 1 EBV that applies, marked by its provision; download at GET /v1/files/{hash}, the same file on every download.
  • lohnkonto.get adds date_of_birth, postal_address, identifikationsnummer, per row pauschal_besteuert, pauschsteuer, lohnsteuerabzugsmerkmale, elstam_read_on, and retain_until (31 December of the sixth year after the last Lohnzahlung, § 41 Abs. 1 Satz 9 EStG) and file (the PDF stored with the newest run).
  • payroll_document.list { betrieb_id?, year } → { year, documents[{ kind, employee_id, name, period, run_month, replaced, retain_until, file }] }.
  • contribution_estimate.get { betrieb_id?, month } → { month, procedure, lines[{ einzugsstelle, name, beitragsnachweis_due, estimate, actual, restbeitrag, restbeitrag_previous_month, note }] }. expected_amount: the contributions the engine computes from the states valid on the day of the Beitragsnachweis; previous_month: the settled contributions of the previous month. restbeitrag = actual - estimate, due with the next month; payroll.payments then owes estimate + restbeitrag_previous_month per Einzugsstelle and warns restbeitrag_from_previous_month.
  • Yearly update of the Lohnsteuer: a new Programmablaufplan is added as a module of its own (pap<year>.rs) with its Prüftabellen as a test; before lohnsteuer::pap dispatches to it, jahreswechsel::dry_run recomputes the stored cases (tests/cases/katalog-lohn/lohnsteuer-laufend.toml) with the old and the new version and lists every case and output that changes (crates/decuma-lohn/tests/jahreswechsel.rs shows it on a synthetic version). Each listed change is checked against the BMF’s calculator or Prüftabellen before the module is wired in. A version published during a year goes the same way.

One Meldung per Betrieb and Anmeldungszeitraum (ADR 0037, ADR 0040 Nr. 9), meldungsart lohnsteuer_anmeldung, name lsta-<zeitraum>-<betrieb_id>. Every payload names { betrieb_id?, zeitraum }: YYYY-MM, YYYY-Qn or YYYY, which must be the kind of the confirmed Anmeldungszeitraum valid at the end of the period (otherwise validation naming the period that holds the month). The values are the sums of the settled runs of every month of the period; a month in which nobody was employed adds nothing, any other month without a run is not_found (“Zuerst den Monat abrechnen”). A period without wages is a Meldung with zeros. Kennzahl 86 counts every person with wages settled in the period while every month with wages counts the same persons; when they change, the number of distinct persons is a proposal (rueckfrage_zahl_arbeitnehmer) that the person confirms or corrects once with lohnsteuer_anmeldung.confirm_employee_count; until then the Freigabe is refused. The Steuernummer is the one of the lohnsteuerliche Betriebsstätte (payroll.set_settings: lohnsteuer_finanzamt, lohnsteuer_steuernummer, valid-from), the Mandant’s when none is set; one Betriebsstätte per Betrieb; a period in which Finanzamt or Steuernummer change is refused (validation, next step: let them apply from the start of an Anmeldungszeitraum), so two Finanzämter are never merged into one Anmeldung. The Rückfrage carries the three possible counts: Arbeitnehmer at the end of the period, everyone employed in it, everyone paid in it. The Formulardefinition is rule data (regelwerk/formulardefinition-lsta-2026-01-01.toml); a year without one is validation. Freigabe, input sheet, Übermittlung by hand and the record of a Meldung filed elsewhere are the shared part of a Meldung from records (decuma_meldung::angaben, also used by the Einkommensteuer) on the tables of Filing 1.

  • lohnsteuer_anmeldung.get (query) → { meldung, zeitraum, von, bis, version, zustand, kennzahlen[{ kz, wert, abrechnungen[{ monat, personalnummer, betrag }] }], stand, stand_hash, frist, zahlung_bis, journal_stimmt, rueckfrage_zahl_arbeitnehmer?{ vorschlag, bestaetigt, am_ende, beschaeftigt, mit_lohn }, freigabe?, freigabe_fehlt?, abweichungen[{ kennzahl, uebermittelt, berechnet }], uebermittelt[{ version, weg, transferticket, uebermittelt_am }], naechster_schritt{ code, text }, nicht_unterstuetzt[{ kennzahl, grund }] }. zustand: entwurf, freigegeben, uebermittelt, berichtigung_noetig (a Lohnlauf correction changed a transmitted value; version is then the next one, stand.werte carries every Kennzahl again and "10": "1"). stand as the Meldungsstand format. frist and zahlung_bis from the Fristen engine with the Land of the Betriebsstätte. journal_stimmt compares Kennzahl 83 with what the runs posted to the liability Konto of the Lohnsteuer (by Kategorie, SKR04 or SKR03); a difference blocks the Freigabe. After the Übermittlung naechster_schritt (zahlen) names the amount and its day. Kennzahl 83 above zero appears in report.liquidity on its payment day.
  • lohnsteuer_anmeldung.release { betrieb_id?, zeitraum, hash, geprueft } (Freigabeklasse filing, human of the Mandant only, second factor) → { freigabe_id, meldung, version, hash }. conflict: the values changed since hash was read, already transmitted, no Steuernummer, the Journal check fails. A correction of a Lohnlauf that changes a value lets the Freigabe lapse (freigabe.zustand: "verfallen"); one that leaves every value equal keeps it. Warning frist_expired.
  • lohnsteuer_anmeldung.input_sheet (query) → { meldung, version, hash, freigabe_id, veraltet, zeilen[{ zeile?, kennzahl?, bezeichnung, wert }] }: Finanzamt (when set), Steuernummer and the code of the Anmeldungszeitraum (26 01, 26 41, 26 19), then the released values in the order of the form with their line (13 Kennzahl 10, 14 Kennzahl 86, 18, 23, 24, 26, 27, 33).
  • lohnsteuer_anmeldung.confirm_employee_count { betrieb_id?, zeitraum, anzahl } (Freigabeklasse ledger_write) → { meldung, vorschlag, anzahl }: a typed record of the Meldung (table lsta_zahl_arbeitnehmer), part of its Meldungsstand as Kennzahl 86; a later change of the settled persons asks again. validation when the number follows from the Abrechnungen.
  • lohnsteuer_anmeldung.list (query) { betrieb_id? } → { zeilen[{ meldung?, zeitraum, zustand, version?, betrag?, frist?, zahlung_bis?, naechster_schritt }] }: one row per Anmeldungszeitraum with a settled run, newest first; zustand offen with the next step when it cannot be computed yet.
  • lohnsteuer_anmeldung.transmit → { uebermittlung_id, eingabeblatt } (way “Von Hand in Mein ELSTER”); conflict without a valid Freigabe of the current values.
  • lohnsteuer_anmeldung.mark_as_transmitted { betrieb_id?, zeitraum, transferticket } → { uebermittlung_id, version, transferticket, uebermittelt_am, naechster_schritt }.
  • lohnsteuer_anmeldung.record_external { betrieb_id?, zeitraum, uebermittelt_am, transferticket, werte } → { meldung, version, uebermittlung_id, abweichungen }: a Meldung filed elsewhere; warning external_differs.
  • payroll_run.correct of a month whose Anmeldung was transmitted returns the warning period_already_filed.

Entgeltbescheinigung and Lohnkonto as PDF, payments with Offene Posten and SEPA, ELStAM, the prepared reports for the SV-Meldeportal, Midijob runs (the engine exists), screens. Minijob runs are settled (Beitragsnachweis Minijob-Zentrale, Buchung 3 for the Pauschsteuer).

Team and Zugriffe, Regeln with test run and pause, the Freigaberichtlinie with conditions, outbound and inbound webhooks, the Kanal e-mail for Belege, notifications (issue #125, ADR 0030). Mandant-scoped unless marked “Account” or “public”.

Change to the command layer (for every branch that rebases on this one)

Section titled “Change to the command layer (for every branch that rebases on this one)”
  • Step 1 (Zugriff). Policy::admit admits a human on a Mandant when the Account is its Inhaber (Access::Inhaber) or holds a Zugriff in state erteilt (Access::Zugriff { freigabe }); anything else is not_found, exactly as for a Mandant that does not exist. A revoked Zugriff is therefore refused on the next request, with the same answer.
  • Capabilities. The rights an entry needs combine (richtlinie::rechte_fuer): a payroll entry needs lohn and, as a Command, also the right of its class, so the payroll Commands of class filing need lohn and freigabe, payroll administration lohn and verwalten. Queries are checked too (Policy::abfrage_erlaubt): a payroll query needs lohn, for a team member and for an API-Schlüssel a member created. For a team member Policy::decide checks the rights of the entry before the Freigaberichtlinie: freigabe for Freigabeklasse filing; verwalten for administration Commands (no Freigabeklasse) unless the Command sets const FUER_TEAM: bool = true; every other Command (the books: Belege, Buchungen, Rechnungen, exports) is part of every Zugriff unless “Nur lesen” is on. Queries need no right. pruefvermerk.record needs a Berater’s Zugriff (berater), also under “Nur lesen”. Policy::visible applies the same rights to a key a member created, so it lists only what the member’s rights allow now (ADR 0047). const NUR_INHABER: bool marks what stays the Inhaber’s even with verwalten (mandant.delete; later the transfer of ownership); Access::Zugriff { freigabe, verwalten }. A missing right is not_allowed; detail names it, next_step “den Inhaber um das Recht bitten”.
  • The Freigabe mark. HUMAN_INHABER_ONLY on a Command of Freigabeklasse filing admits a human who is the Inhaber or a team member with freigabe. An API-Schlüssel, a Regel, an Agent and the installation stay refused (needs_human), whatever any data say; a team member without freigabe gets needs_human with next_step “Freigabe anfragen” (release.request). On every other human-only Command a team member with verwalten passes unless it is NUR_INHABER; otherwise not_allowed.
  • The Freigabe as data. Beside the mark, Policy::freigabe_ohne_menschen asks the Freigaberichtlinie whether an Actor that is no human of the Mandant may give the Freigabe: a row of Freigabeklasse filing with entscheidung: "freigabe" for that Actor kind or Actor. The shipped policy has no such row and no Command of the open layer writes one (setzen and zelle_setzen refuse the class filing), so today only a human of the Mandant gives a Freigabe; widening it later is a change of data. filing.release and the Übermittlung Commands stay on REST, CLI and MCP; a caller who may not use them gets needs_human with next_step.
  • Policy with the payload. Policy::decide takes the payload as a fifth argument (conditions of the Freigaberichtlinie). Command::betrag(&Payload) -> Option<Betrag> (default None) names the amount a condition compares; buchung.record, buchung.post and payment.record implement it.
  • Policy with the origin. Policy::decide takes the origin the caller set on the call as a sixth argument: for a Command run inside another one the outer call’s, as it is logged; command.check takes an optional origin that reaches it the same way. A policy that approves a Command ahead of time for one process of a caller (one run of an automation) binds the approval to that process with it. The open policy does not read it.
  • Limits apart from access (ADR 0054). Policy::limit refuses by a count of the installation, after decide and validation, and is not asked for a replay of a stored Command. Rights belong in admit and decide: they run before every replay. It is required: a policy that wraps another hands it on, one without limits answers Ok(()).
  • Nested Commands. Ctx::ausfuehren(name, payload, begruendung) runs another registered Command inside the running transaction (policy and capability checked for the same Actor, “human Inhaber only” refused) and appends its own log entry before the outer one. Used by confirmation.accept and the inbound webhook.
  • Rechnungen and Mahnungen (Books 3). Name their Commands rechnung.* and mahnung.*, or give the sending ones Freigabeklasse external_communication, so that the capability rechnungen covers them.

Rechte = {verwalten: bool, freigabe: bool, lohn: bool} (prototype version 10, “team right Verwalten”): “Sieht und bearbeitet die Bücher” is always part of a Zugriff (Belege, Buchungen, Rechnungen, exports); verwalten covers the administration of the Inhaber (Bankkonten, settings, Kategorien, Regeln, webhooks, imports, the Freigaberichtlinie but its rows of Meldungen, own API-Schlüssel); freigabe is “Darf Meldungen freigeben”; lohn is “Sieht Lohn”. Default of an invitation: verwalten on, freigabe and lohn off. What stays with the Inhaber (R11), refused with not_allowed and next_step “Das legt der Inhaber fest.”: every Command of the team (zugriff.* but access.mine, invitation.link, invitation.withdraw, invitation.send_again), deleting and transferring the Mandant, the Tarif (hosted), and the rows of Freigabeklasse filing in approval_policy.set. The Freigabe of a Meldung by a member needs freigabe.

A Zugriff is of art teammitglied or berater: a Berater has the same switches, never freigabe (refused with validation in access.invite and access.set_permissions, and ignored by the policy whatever the data say), states a beruf (steuerberater, wirtschaftspruefer, rechtsanwalt, buchhalter; self-declared, limits nothing) and can record a Prüfvermerk. The ceiling of persons (DECUMA_TEAM_MAX) counts the Inhaber and open invitations; lowering it removes no one.

Name Payload Result and refusals
team.list (query) Listenabfrage Liste of Teamzeile; text name, email; categorical art (inhaber, teammitglied, berater, einladung), zustand; sortable name, zuletzt_aktiv. No CSV
access.get (query) {zugriff_id} Zugriff plus verlauf: the last 100 Command-Log entries of that Account in the Mandant, [{seq, at, command, begruendung}]
access.invite {email, rechte?, art?, beruf?, gueltig_tage?} (default 7 days; beruf required with art: "berater", warning advisor_responsibility) {einladung_id, link, laeuft_ab_am, per_mail}; link (<public url>/#/einladung?token=...) is in every result and kept out of the Command-Log; with SMTP it is mailed to email (per_mail: true); on an installation without SMTP nothing is sent (per_mail: false) and Konto > Team shows “Link kopieren”. conflict: a Zugriff or an open invitation for that address exists, or the ceiling of persons is reached (DECUMA_TEAM_MAX, unset in the open layer; next_step: revoke a Zugriff or withdraw an invitation, then “frag den Betreiber dieser Installation” or, with DECUMA_EDITION=gehostet, “schreib uns”)
invitation.withdraw {einladung_id} {einladung_id, zustand: "zurueckgezogen"}
invitation.send_again {einladung_id} {einladung_id, link, laeuft_ab_am, per_mail}: a new link and expiry, mailed again where SMTP exists; the earlier link stops working. conflict when accepted or withdrawn
invitation.link {einladung_id} {einladung_id, link}: “Link kopieren” on a pending invitation (also by a member with verwalten): a new token, shown once and kept out of the Command-Log; the earlier link stops working. No link is ever stored. conflict when the invitation was accepted, withdrawn or has expired
invitation.get (query, public) {token} {zustand: "offen" | "abgelaufen" | "angenommen" | "zurueckgezogen", mandant_anzeigename, eingeladen_von, email, rechte, laeuft_ab_am}; email is the invited address the sign-in and the registration show prefilled and fixed. Nothing else of the Mandant, and never whether an Account exists for the address. not_found for an unknown or malformed token
invitation.accept (Account) {token, beruf?} (beruf required for a Berater invitation: the Inhaber’s choice in invitation.get is a prefill the person confirms or changes) {mandant_id, zugriff_id}; the Mandant appears in mandant.list; the app switches into it. conflict for abgelaufen (next_step “den Inhaber um eine neue Einladung bitten”), angenommen (“anmelden und den Mandanten wählen”), zurueckgezogen (“den Inhaber fragen”); not_allowed when the Account’s address is not the invited one (next_step “Abmelden und mit der eingeladenen Adresse anmelden, oder um eine Einladung an diese Adresse bitten”)
invitation.register (public) {token, passwort, anzeigename?, beruf?} (beruf as in invitation.accept) {account_id, mandant_id, zugriff_id, email_bestaetigt}: registration through the link with the invited address and acceptance in one step; it works while general registration is closed (DECUMA_REGISTRATION). The address is not confirmed by the invitation link (email_bestaetigt: false): a confirmation mail goes to it as after account.register; working in the Mandant does not wait for it. Then session.sign_in. conflict for a link that is not open (as invitation.accept) and when an Account with the address exists (next_step: sign in and accept); validation: password rule
access.set_permissions {zugriff_id, rechte} Zugriff; immediate effect. Warning release_permission_granted when freigabe is switched on: “Diese Person darf jetzt Meldungen freigeben, die dann übermittelt werden; die Freigabe bindet den Mandanten.”
access.set_read_only {zugriff_id, nur_lesen: bool} Zugriff; true switches every capability off in one step, false restores the switches as they were (“Rückgängig”)
access.revoke {zugriff_id} {zugriff_id, zustand: "widerrufen", schluessel_widerrufen}: the next request of that Account on the Mandant is refused, its API-Schlüssel of the Mandant are revoked; the Verlauf keeps the name
access.mine (query) {} {art: "inhaber" | "teammitglied" | "berater", beruf, mandant_anzeigename, rechte, freigabe_erlaubt}: the quiet line of the shell
pruefvermerk.record {meldung, umfang: "ganz" | "umsatz" | "vorsteuer", kommentar?} Pruefvermerk: by a Berater of the Mandant (person or own API-Schlüssel), bound to the hash of the current Meldungsstand; voluntary, never a precondition of the Freigabe. not_allowed for anyone else
pruefvermerk.list (query) {meldung} [Pruefvermerk] newest first: {id, meldung, version, hash, umfang, kommentar, name, beruf, beruf_selbst_angegeben, actor, erstellt_am, gilt_fuer_stand}
advisor_firm.list (Account query) {} [{mandant_id, anzeigename, art, beruf, zugriff_seit, rueckfragen_offen, meldungen_ohne_pruefvermerk, naechste_frist: {meldung, bezeichnung, abgabe_bis} | null}]: the Mandanten with an active Zugriff of the person; with an API-Schlüssel the person created only the row of the key’s Mandant (I-01; the only Account query a key may run). Every count follows the rights of the Zugriff: payroll Rückfragen only with lohn
access.update_profession {beruf} Zugriff: a Berater changes the Beruf they state; in the Verlauf; earlier Prüfvermerke keep theirs
release.request {meldung, notiz?} {meldung, angefragt_am}; notifies the Inhaber once per Meldung and person; changes nothing else
  • Teamzeile = {id, art, beruf, name, email, rechte_text, rechte, nur_lesen, zustand, zuletzt_aktiv, laeuft_ab_am}; id is the zugriff_id (an invitation: its einladung_id; the Inhaber: the Account id); zustand erteilt, widerrufen or offen/abgelaufen for an invitation; rechte_text the words of the table: “verwaltet” or “arbeitet mit”, plus “gibt frei”; “nur lesen”.
  • Zugriff = {zugriff_id, account_id, name, email, rechte, nur_lesen, art, beruf, zustand, erteilt_am, widerrufen_am, zuletzt_aktiv}.
  • API-Schlüssel: a team member may create keys for the Mandant (api_key.create) with any Freigabeklasse but filing (none under “Nur lesen”); such a key acts within the member’s rights as they are at each request.
  • Invitation flow of #/einladung: invitation.get gives the state of the link and the text; “Annehmen” leads to sign-in (then invitation.accept) or registration (invitation.register, which also accepts). The invited address must equal the Account’s address (case and surrounding spaces ignored); it need not be confirmed yet, since the link reached it. Konto > Team lists a pending invitation as a Teamzeile with art: "einladung" and zustand: "offen" or "abgelaufen" (“Erneut senden”: invitation.send_again; “Zurückziehen”: invitation.withdraw).

RegelDaten = {name, art: "kontierungsregel" | "automatisierung" | "webhook_aktion", ausloeser, bedingung: Bedingung | null, aktion: {command, payload}}.

  • ausloeser is an event type of event.types. Bedingung = {alle: [Bedingung]} | {eines: [Bedingung]} | {nicht: Bedingung} | {feld, op, wert}; op one of gleich, ungleich, kleiner, kleiner_gleich, groesser, groesser_gleich (amounts and dates), enthaelt, beginnt_mit (text, ignoring case), eines_von (wert a list). feld names a field of the event type (event.types), typed text, betrag, datum or id.
  • aktion.payload is a template: a string that is exactly "{{feld}}" becomes the field’s value, {{feld}} inside a longer string is replaced by its text. aktion.command is a Mandant Command of the registry that is not “human Inhaber only”.
  • An unknown event type, field or Command is validation and names it.
Name Payload Result and refusals
event.types (query, public) {} [{typ, beschreibung, felder: [{name, typ}]}]
rule.create {regel: RegelDaten} Regel, paused (aktiv: false)
rule.update {regel_id, regel: RegelDaten} Regel; a Regel paused by the loop limit may be switched on again afterwards
rule.test (query) {regel: RegelDaten} Testlauf: the Regel as it stands in the editor against the Events of the last 90 days; changes nothing
rule.activate {regel_id, pruefsumme?} Regel; warning rule_untested unless pruefsumme is the one rule.test returned for the current definition. conflict (next_step “Regel bearbeiten”) when the Regel was paused by the loop limit and not changed since
rule.pause {regel_id} Regel
automation.pause {grund} (a key such as downgrade) {grund, posten: [Posten]}; pauses in one step every active Regel, every running series of Rechnungen, every running Fixkosten series and the automatic Mahnwesen, each marked pausiert_durch: grund; deletes and changes nothing; what a person paused is left alone; one Event automation.paused (one notification and e-mail to the Inhaber listing what was paused) unless nothing was left to pause. A stop action
automation.resume {grund} {grund, posten}; switches on exactly what that reason paused, in one step; the posten carry ausgelassen, what fell due meanwhile, listed and not caught up (everything runs from today on)
automation.list (query) {grund?} [Posten] paused by a reason, with ausgelassen: [{datum, bezug}] (days before today: runs of a series or Fixkosten series, levels of the Mahnwesen with the Rechnung as bezug, events of a Regel’s trigger since the pause, its condition not evaluated)
rule.get (query) {regel_id} Regel
rule.list (query) Listenabfrage Liste of Regel; text name, satz; categorical art, aktiv; sortable name, geaendert_am
rule.history (query) {regel_id} [{at, command, ergebnis: "ok" | code, objekt: {buchung_id?, vorgang_id?, beleg_id?}, seq, detail}]: every Command the Regel issued (Command-Log, ergebnis: "ok") or tried (attempts), newest first. A Buchung in it is corrected with the normal buchung.correct or buchung.storno; there is no Command that reverses several
rule.draft_from_case (query) {vorgang_id} {regel: RegelDaten, satz} for “Immer so behandeln” of a booked Vorgang with one Kategorie: condition Aussteller and brutto between half and twice the booked amount, action buchung.record with that Kategorie and “Wie bezahlt?”. validation for a Vorgang that is not booked or has several Kategorien. The app sends it to rule.create and rule.activate
rule.templates (query) {} [{vorlage, regel: RegelDaten, satz}]: the shipped Regeln, created with rule.create and off until switched on (bankumsatz_passt_zuordnen)
  • Regel = {regel_id, ...RegelDaten, satz, aktiv, pausiert_grund: null | "von_hand" | "schleife", pausiert_durch: null | string, pruefsumme, erstellt_am, geaendert_am}; satz is the one sentence (“Wenn ein Beleg gelesen wurde und Aussteller enthält “Muster Energie”, dann buchung.record.“); the editor shows regel as JSON too.
  • Testlauf = {pruefsumme, ereignisse, treffer, faelle: [{event_id, at, typ, aktion: {command, payload}}] (at most 20), warnungen}. Warnings: regel_haette_nie_gegriffen; regel_greift_sehr_oft (more than 30 times in 90 days; text names the count); regel_ueberschneidet_sich (another active Regel with the same trigger matches one of the cases; names it).
  • Execution: the engine is an outbox consumer. It issues aktion as Actor {kind: "regel", id} with the Begründung Regel <id>: Event <event id>, Tiefe <n>. Events of a Command a Regel issued count one level deeper; at depth 5 the Regel is paused with pausiert_grund: "schleife" and issues nothing. A paused Regel issues nothing.
  • A Regel acts within the Freigaberichtlinie. A Command it may not run alone is not dropped: it becomes a pending confirmation.
Name Payload Result and refusals
confirmation.list (query) Listenabfrage Liste of {bestaetigung_id, regel_id, regel_name, command, payload, satz, zustand: "offen" | "angenommen" | "abgelehnt", erstellt_am, entschieden_am}; categorical zustand (“Zu erledigen” is filter: {zustand: ["offen"]})
confirmation.accept {bestaetigung_id} {bestaetigung_id, zustand, ergebnis}: runs the Command as the confirming person (Begründung names the Regel as origin). conflict when not offen
confirmation.reject {bestaetigung_id} {bestaetigung_id, zustand}
  • approval_policy.set and approval_policy.get accept and return bedingung (a Bedingung over the fields betrag and command of the Command) and the Actor kind teammitglied. A row with a condition decides only when the condition holds; otherwise, and when the Command names no amount, it asks. Rows of Freigabeklasse filing take allow or ask as before (they govern the Übermittlung Commands of an API-Schlüssel); the Freigabe itself passes only for a human of the Mandant or by a row freigabe (see “The Freigabe as data” above), which no Command writes. zelle_setzen refuses the row filing (validation): the screen cannot change it.
Name Payload Result
approval_policy.table (query) {} {zeilen: [{freigabeklasse, zellen: {teammitglied, regel, agent, api_schluessel}}]} in the order ledger_write (Buchung), money (Zahlung), external_communication, filing (Übermittlung); a cell is {entscheidung: "darf_allein" | "fragt_nach", bis_betrag, fest, own}, own true where the Mandant set it (approval_policy.set_cell, or a row of approval_policy.set that is not the shipped default unchanged; a cell set to “fragt nach” is the Mandant’s own, not the default); the row filing has fest: true and the text “nur ein Mensch des Mandanten”
approval_policy.set_cell {freigabeklasse, spalte, entscheidung, bis_betrag?} the table. validation for filing
Name Payload Result and refusals
webhook.create {url, ereignisse: [typ], beschreibung?} {webhook_id, geheimnis}; geheimnis shown once, kept out of the Command-Log. validation: not https (plain http only to a configured allowed network), an unknown event type, or a host that resolves to an internal address (loopback, private, link-local, CGNAT, unique local, multicast, unspecified, documentation)
webhook.update {webhook_id, url?, ereignisse?, beschreibung?} Webhook; the same checks
webhook.rotate_secret {webhook_id} {webhook_id, geheimnis}
webhook.pause, webhook.activate, webhook.delete {webhook_id} Webhook (loeschen: {webhook_id})
webhook.list (query) {} [Webhook]
webhook.deliveries (query) Listenabfrage Liste of Zustellung; date erstellt_am; categorical status, ereignis_typ, webhook_id; sortable erstellt_am. No CSV
event.list (query) Listenabfrage Liste of {event_id, seq, typ, at, status}; status over the webhook deliveries: zugestellt, fehlgeschlagen, offen, ohne_webhook; date at; categorical typ, status; sortable seq, at. No CSV (the tab has no export menu)
webhook.send {webhook_id, daten} {webhook_id}: the action of a Webhook-Aktion; delivered like an Event of type webhook.message to this webhook only. Freigabeklasse external_communication
  • Signing secrets are stored encrypted with the instance key DECUMA_SECRET_KEY (table geheimnis), shown once, never logged, and left out of the Mandant export (manifest.json names the omitted tables under ausgelassen with the reason). Without the key webhook.create is conflict with a FIX message for the operator. The inbound secret is kept as its SHA-256 only.
  • Webhook = {webhook_id, url, ereignisse, beschreibung, aktiv, pausiert_grund: null | "von_hand" | "fehler", erstellt_am, fehlschlaege_in_folge}.
  • Zustellung = {zustellung_id, webhook_id, event_id, ereignis_typ, erstellt_am, status: "offen" | "zugestellt" | "fehlgeschlagen", http_code, dauer_ms, versuche, letzter_versuch_am, fehler}.
  • A delivery is POST <url> with Content-Type: application/json, body {id, typ, at, daten}, headers Decuma-Event, Decuma-Event-Id and Decuma-Signatur: t=<unix seconds>,v1=<hex HMAC-SHA256(geheimnis, "<t>.<body>")> (scripts/verify_webhook.py checks one). A receiver accepts a delivery only within 5 minutes of t (replay protection); the script checks the same tolerance. 2xx is success; redirects are not followed; 10 s timeout. A failure is retried with the dispatcher’s backoff (30 s, doubling, measured with the instance clock); the fifth failure marks it fehlgeschlagen; three failed deliveries in a row pause the webhook (pausiert_grund: "fehler", Event webhook.paused, a notification). The target is resolved again before every try and refused when it resolves to an internal address. DECUMA_WEBHOOK_ALLOWED_NETWORKS (comma-separated CIDR) lets a self-hoster allow internal targets.
Name Payload Result
inbox_webhook.create {} {url, geheimnis}: creates or rotates the one inbound address of the Mandant; geheimnis shown once, kept out of the Command-Log
inbox_webhook.get (query) {} {url, erstellt_am, rotiert_am, fehlversuche: [{at, grund}]} or null
POST /v1/inbox/{mandant_id} (route) header Authorization: Bearer <geheimnis>, required Idempotency-Key; body either one document (Content-Type a Beleg type, limits as for uploads) or application/json {beleg: BelegdatenEingabe} (a Beleg with its fields, stored as the JSON it arrived as) or {bankumsaetze: <payload of bank_transaction.deliver>} the result of the Einlieferung (beleg.deliver or bank_transaction.deliver), Kanal webhook. not_authenticated for a wrong secret (recorded as an attempt); idempotency_conflict for the same key with another body; validation without a key
Name Payload Result
email_inbound.get (query) {} {adresse, absender, nachrichten: [EmailNachricht] (newest 50), betreiber_hinweis}; adresse null before one is created or when the installation has no receiving domain
email_inbound.create_address {name?} {adresse} (name-xxxxxxxx@<DECUMA_EMAIL_DOMAIN>; creates or rotates; the old address is refused from then on)
email_inbound.set_sender {absender: [string]} {absender}: addresses or @domain; empty means everyone
  • EmailNachricht = {nachricht_id, message_id, von, betreff, empfangen_am, ergebnis: "angenommen" | "abgelehnt", grund: null | "absender_nicht_erlaubt" | "ohne_anhang" | "zu_gross", einlieferung_id, beleg_ids, rueckfrage_id, warnungen}; a refused sender carries the warning absender_nicht_erlaubt.
  • The receiver (DECUMA_EMAIL_INBOUND, a listen address such as 0.0.0.0:25, and DECUMA_EMAIL_DOMAIN; off when unset; DECUMA_EMAIL_MAX_MB, default 30) refuses an unknown address at RCPT, a sender outside the allow-list at RCPT, and a message over the limit, without an attachment of an accepted type and without a link after DATA; each refusal for a known address is listed with its reason. An accepted message is one Einlieferung (Kanal email, key the Message-ID); each attachment of an accepted type becomes a Beleg; the whole message is stored unchanged as the record. A message with only a link to an invoice becomes an Einlieferung with the Rückfrage beleg_als_link (“Beleg herunterladen und hochladen”). Nothing in a message is executed and no link is fetched.
  • Spoofed senders: the receiver itself checks neither SPF nor DKIM. A message counts as authenticated only when a trusted relay in front of it (DECUMA_EMAIL_AUTHSERV_ID, its authserv-id) reports dmarc=pass in Authentication-Results; a Regel never acts alone on a Beleg from an unauthenticated message: its Command becomes a pending confirmation. A sender refused at RCPT is listed at most once per hour; further attempts leave no record. A wrong inbound-webhook secret is recorded at most once per sender address and hour.
  • POST /dev/email?an=<address>&von=<address> (decuma dev only): delivers the raw message in the body as the receiver would.
  • Delivery reports of sent Rechnungen and Mahnungen come with Books 3.

Occasions (anlass): rueckfrage_offen, freigabe_bereit (a Voranmeldung period ended and is not transmitted), freigabe_angefragt, frist_naht, webhook_pausiert, uebermittlung_bestaetigt. Each appears once per person in the notification centre, also when an Event is delivered twice. E-mail goes out only for frist_naht and uebermittlung_bestaetigt, and for any other occasion the person switched on; nothing else is ever sent.

Name Payload Result
notification.list (query) Listenabfrage Liste of {benachrichtigung_id, anlass, text, link, erstellt_am, gelesen} for the caller; categorical anlass, gelesen
notification.count (query) {} {ungelesen}: the count on the bell
notification.mark_read {ids?: [uuid]} (none: all) {gelesen}
notification.settings (query, Account) {} {anlaesse: [{anlass, email, push}], frist_vorlauf_tage} (default: e-mail only for frist_naht and uebermittlung_bestaetigt, push on, 7 days)
notification.set_settings (Account) {anlaesse?, frist_vorlauf_tage?} as the query
push.key (query, public; flag web_push) {} {vapid_public_key} (base64url)
push.subscribe (Account; flag web_push) {endpoint, p256dh, auth} {push_id}; the browser’s subscription (the app asks for the permission only after its own explanation step; states erlaubt, abgelehnt, nicht_unterstuetzt are the browser’s)
push.unsubscribe (Account; flag web_push) {push_id} {push_id}
  • E-mail goes through the mail port of App 1. Web push is the browser standard (RFC 8030 with VAPID, RFC 8292, and message encryption, RFC 8291); it needs the browser vendor’s push service and is therefore behind the feature flag web_push, off by default (DECUMA_VAPID_PRIVATE_KEY, base64url of the P-256 private key, and DECUMA_VAPID_SUBJECT required when on).
  • Fristen: a job of the installation checks once an hour and emits frist.reminder when the Frist of a Meldung lies within the person’s frist_vorlauf_tage, tax_payment.reminder (schluessel of the row of tax_payment.plan, due) the same for an unpaid Vorauszahlung or payment of a Bescheid with an amount, without a SEPA-Lastschriftmandat no later than the Frist’s remind_on (second business day before the due day), and for the hint on a missing Vorauszahlungsbescheid (vzb-<steuerart>-<year>, until tax_payment.confirm_no_bescheid) (occasion frist_naht), and filing.ready when a period ended.

The outbox now carries: case.ready (a Vorgang has Belegdaten: after a reading or a correction), reading.usage (a reading provider reported usage: beleg_id, einheiten, kosten, modell; ADR 0045), beleg.reading_failed (a reading failed; retryable true when the provider could not answer then and beleg.read_again may succeed later), beleg.reading_outcome (what the reading port answered beside the fields: outcome a ReadingOutcome), beleg_data.corrected (a person corrected the Belegdaten of an unbooked Beleg and a line has no Kategorie: the decision port answers it once more), decision.usage (the same for the decision port, one per decision; umsatz_id instead of beleg_id for a debit without Beleg), question.opened, buchung.posted, bankumsatz.eingegangen, transmission.result, release.requested, frist.reminder, tax_payment.reminder, filing.ready, webhook.paused, webhook.message, rule.paused, plus the earlier mandant.created, master_data.changed. Fields per type: event.types.

The export contains the new tables (zugriff, einladung, regel, bestaetigung, webhook, webhook_zustellung, eingang_webhook, email_adresse, email_nachricht, benachrichtigung); the Account-scoped account_mandant (now with art), benachrichtigung_einstellung and push_abo are covered by the isolation suite as Account tables.

The Rücknahme of a Regel (issue #137, ADR 0041, processes 6a). Mandant-scoped.

  • Freigabeklasse::Sammelkorrektur (sammelkorrektur): a row of the Freigaberichtlinie (approval_policy.table lists it between external communication and filing); the cell regel is fest with text “nie”. An API-Schlüssel needs ledger_write in its classes.
  • Command::BEI_NACHFRAGE: Option<&str>: a System Command run when the policy answers needs_human to a non-human Actor; it records a pending confirmation and the refusal’s next_step names it.
  • bestaetigung.zustand may be zurueckgezogen (withdrawn by a Rücknahme).
Name Payload Result and refusals
rule.rollback_preview (query) {regel_id, auswahl?: {von?, bis?, versionen?, mit_folgeregeln?, festgeschrieben?: [meldung], teil?}, seite?} Vorschau: anzahl, brutto, umsatzsteuer, vorsteuer, abgleiche, vorschlaege, entwuerfe, versionen [{version, buchungen}], zeitraeume [{meldung, bezeichnung, zustand, anzahl, umsatzsteuer, vorsteuer, uebersprungen}], uebersprungen [{grund, anzahl, brutto, naechster_schritt}], nicht_ruecknehmbar [{art, command, am, objekt, naechster_schritt}], folgeregeln, teil, teile, faelle (200 per page; each ergebnis stornieren, loesen or ueberspringen with grund (jahreserklaerung_uebermittelt when the yearly return of the year is filed, in the product or recorded as filed elsewhere; jahr_gesperrt in a locked year), bezug, naechster_schritt), faelle_gesamt, vorschau_hash, warnungen (regel_aktiv, uebersprungen, festgeschrieben_untouched, freigabe_verfaellt, berichtigung_noetig, posten_wieder_offen, nicht_ruecknehmbar, weitere_teile). not_found for an unknown Regel or one of another Mandant (same body)
rule.roll_back {regel_id, auswahl?, vorschau_hash, begruendung}, idempotency key {ruecknahme_id, regel_id, begruendung, anzahl, brutto, stornos: [{buchung_id, storno_id}], vorgaenge, abgleiche, vorschlaege, entwuerfe, uebersprungen, nicht_ruecknehmbar, zeitraeume, teil, teile} and the warnings of the preview. Refusals: active Regel conflict “Regel pausieren”; active included Folgeregel conflict naming it; hash missing validation “Vorschau abrufen”; Begründung missing validation “Begründung angeben”; above 2,000 Buchungen without teil validation; hash stale conflict “Vorschau erneut ansehen”; nothing to take back conflict with the skip list; API-Schlüssel or Agent where the row asks needs_human (one pending confirmation); transmitted periods by anyone but a human with Freigabe needs_human, without second factor second_factor_required; same key, other preview idempotency_conflict. Event rule.rolled_back {ruecknahme_id, regel_id, anzahl, begruendung}
rule.rollbacks (query) {regel_id} newest first: {ruecknahme_id, am, actor, begruendung, anzahl, brutto, uebersprungen (as it stands), vorgaenge: [{vorgang_id, offen, passt}]}; passt is the preview of rule.apply_again
rule.apply_again {regel_id, ruecknahme_id} {gebucht, vorgemerkt, im_eingang} (Vorgang ids). conflict “Regel fortsetzen” while paused
rule.activate as Work 1 warning rule_unchanged_after_rollback when the Regel was not changed since its last Rücknahme

Screens: Konto > Automatisierung > Regeln (#/konto/automatisierung/regeln, /regeln/:id, /regeln/:id/ruecknahme) and Freigaberichtlinie (#/konto/automatisierung/freigaberichtlinie).

ADR 0036. Every refusal carries code, detail and next_step in German and English.

Name Payload Result and refusals
installation.links (query, public) {} {agb, datenschutz, impressum, zustellung: "smtp" | "dev_post" | "protokoll", registrierung: "offen" | "geschlossen", eingerichtet: bool, bank_connection: bool, ...}; bank_connection says whether a provider of the consent port is configured (the app shows “Bank verbinden” only then)
installation.get_setup_code (query, public) {code} {zustand: "offen" | "abgelaufen" | "benutzt" | "unbekannt"}; not_allowed while locked (five wrong codes within 5 minutes; an unknown code counts)
installation.generate_setup_code {} {link, code, gueltig_bis}; only the installation (decuma setup-link); link = <public url>/#/einrichtung?code=<12 characters>
account.register {email, passwort, anzeigename?, einrichtungscode?} {account_id}; with a valid code the Account is created under either policy and counts as confirmed; conflict for a wrong, used or expired code; not_allowed under geschlossen without a code (next step: the Einrichtungslink while no Account exists, else an invitation). Under offen without SMTP the address counts as confirmed
account.reset_password_with_recovery_code (public) {email, code, neues_passwort} {ok}; uses the code up, ends every session, revokes the API-Schlüssel and open reset links as account.reset_password; not_authenticated alike for an unknown address and a wrong or used code
account.reset_access {email} {link, gueltig_bis}; only the installation (decuma reset-access <e-mail>); not_found for an unknown address
  • Screens: #/einrichtung?code= (states from einrichtungscode_lesen: form, abgelaufen and unbekannt with the command to copy, benutzt with “Anmelden”; without a code the command), then #/einrichtung/zweiter-faktor (the Sicherheit flow, “Später einrichten”), then #/start. Sign-in under geschlossen: no “Registrieren”, the line about invitations; while eingerichtet is false, the command for the link. #/registrieren under geschlossen: “Registrierung ist geschlossen”. Forgotten password under protokoll: e-mail, recovery code and new password, or the operator’s command; nothing says whether an Account exists. Under dev_post the mail screens link to /dev/post.
  • Second factor for critical actions: Commands marked ZWEITER_FAKTOR (filing.release, est.release, account.update_password, api_key.create, mandant.delete, account.delete, account.second_factor.disable, account.generate_recovery_codes) refuse a person without a second factor with second_factor_required (403, CLI exit 11). x-decuma.secondFactor in the OpenAPI document marks them. The app opens the set-up in a dialog and repeats the Command once.

Geschäftspartner, Produkte, Rechnungen, sending, Angebote, recurring Rechnungen and Mahnungen (issue #123, ADR 0029). Mandant-scoped; every name refuses a Mandant without a Betrieb with not_allowed; betrieb_id is optional as in Books 1. Amounts are decimal strings, dates YYYY-MM-DD (days in the installation’s time zone), ids UUIDs. Routes the app uses (prototype): #/einnahmen/rechnungen, #/einnahmen/rechnungen/neu, #/einnahmen/rechnungen/:nr, #/einnahmen/rechnungen/hochladen, #/einnahmen/angebote, #/einnahmen/angebote/hochladen, #/einnahmen/angebote/:nr, #/einnahmen/wiederkehrend, #/einnahmen/wiederkehrend/neu, #/einnahmen/mahnungen, #/einnahmen/mahnungen/:nr, #/einnahmen/mahnungen/einstellungen, #/einnahmen/kunden, #/einnahmen/kunden/neu, #/einnahmen/kunden/import, #/einnahmen/produkte, #/einnahmen/produkte/neu, #/ausgaben/lieferanten. In the routes :nr is the id (rechnung_id, angebot_id).

Not built in this ticket (see ADR 0029): the export of a Mahnfall as PDF, the reduced content of a Kleinbetragsrechnung (every Rechnung is checked against the full § 14 Abs. 4 UStG; § 33 UStDV only exempts it from the e-invoice), the e-invoice for turnovers tax-free under § 4 Nr. 8 to 29 UStG, invoices in a foreign currency.

Name Payload Result and refusals
business_partner.create GeschaeftspartnerEingabe Geschaeftspartner. Warning ust_idnr_not_confirmed (below). validation: no rollen, no name, kundenart missing for a Kunde, sitz missing for a land other than DE
business_partner.update {geschaeftspartner_id, ...GeschaeftspartnerEingabe} (only the fields sent change) Geschaeftspartner. Never touches an issued Rechnung: it keeps the Kunde as it was issued. conflict for an archived one
business_partner.archive {geschaeftspartner_id} Geschaeftspartner with archiviert_am. It is no longer offered in the editor; its Rechnungen stay
business_partner.get (query) {geschaeftspartner_id} Geschaeftspartner plus {rechnungen: [Rechnungszeile], offene_posten: [OffenerPosten], buchungen: [{buchung_id, nummer, datum, text, betrag}]}
business_partner.list (query) Listenabfrage Liste of Geschaeftspartner. Text name, nummer, email_rechnung, ust_idnr; date erstellt_am; categorical rolle (kunde, lieferant), sitz, archiviert (ja, nein); sortable name, nummer, erstellt_am; CSV yes. Tab Kunden: filter: {rolle: ["kunde"], archiviert: ["nein"]}; Lieferanten likewise
business_partner.import (idempotent) {inhalt, rolle: "kunde" | "lieferant", zuordnung?: {"<spalte>": "<feld>" | "nicht_uebernehmen"}, kundenart?: "unternehmer" | "verbraucher", vorschau: bool}; inhalt the CSV file, base64 (UTF-8 or ISO-8859-1, separator ; or ,, first line the column names; not written to the Command-Log) Import below. With vorschau: true nothing is written (the screen’s preview and its one line); with false the rows marked neu are created and nothing else changes. Without zuordnung the fields are proposed from the column names. Warning customer_already_existing (text names the count) when rows exist already. validation: an empty file, a feld that does not exist, a column mapped twice
ust_idnr.check {ust_idnr, geschaeftspartner_id?} UstIdPruefung; with geschaeftspartner_id (whose ust_idnr it is) the query is qualified (name, street, post code, place) and the result is stored on that record. Every query is kept unchanged with the record the service answered (table ustid_abfrage, in the export). Never refuses for the answer: an invalid or unreachable check is a result with its consequence
  • GeschaeftspartnerEingabe = {rollen: ["kunde" \| "lieferant"], name, nummer?, strasse?, plz?, ort?, land? (ISO 3166 alpha-2, default "DE"), sitz?: "inland" \| "eu" \| "drittland" (default "inland" for DE; required otherwise), email_rechnung?, ust_idnr?, steuernummer?, zahlungsziel_tage?, kundenart?: "unternehmer" \| "verbraucher", leitweg_id?, e_rechnung?: "zugferd" \| "xrechnung" \| "pdf"}. leitweg_id: BT-10 of a public buyer; e_rechnung: the file the Kunde gets, absent: derived (below). sitz is stated, not derived: the product keeps no list of member states.
  • Geschaeftspartner = {geschaeftspartner_id, rollen, name, nummer, strasse, plz, ort, land, sitz, email_rechnung, ust_idnr, steuernummer, zahlungsziel_tage, kundenart, ustid_pruefung: UstIdPruefung | null, leitweg_id, e_rechnung, erstellt_am, archiviert_am}.
  • UstIdPruefung = {ust_idnr, ergebnis: "bestaetigt" | "ungueltig" | "nicht_moeglich", geprueft_am, quelle, folge, format_gueltig, art: "qualifiziert" | "einfach" | "format", status, id, abgleich: {firmenname?, strasse?, plz?, ort?}} (kb umsatzsteuer/ust-idnr-pruefung.md). format_gueltig: the offline check against the format table per member state (rule data ustid format; no check digit exists); a failed format is the warning ust_idnr_format, never a refusal. The confirmation (§ 18e Nr. 1 UStG) is asked for a foreign number with the Mandant’s own German USt-IdNr.: quelle fake (decuma dev), bzst (the eVATR interface, only with DECUMA_EVATR_URL), nur_formatpruefung (a German number, or no own German USt-IdNr.), nicht_verfuegbar (no service configured). The service’s status decides: evatr-0000 and evatr-2008 confirmed, evatr-2001, -2002, -2006 invalid, anything else and no answer nicht_moeglich (repeat later). abgleich per field: A matches, B differs (named in folge), C not asked, D not given. folge the consequence in plain words when not confirmed or a field differs.
  • Warning ust_idnr_not_confirmed on business_partner.create and aendern with a ust_idnr of an EU Kunde when the last check is not bestaetigt, and on invoice.issue for an EU service or an innergemeinschaftliche Lieferung when no confirmation exists from on or before the day of the service; text is the folge.
  • Import = {spalten: [{spalte, name, erster_wert, feld}], zeilen: [{zeile, name, status: "neu" | "schon_vorhanden" | "fehler", fehler, geschaeftspartner_id}], neu, schon_vorhanden, fehler, ergebnis}; zeilen the first 20 rows in the preview, every row otherwise; ergebnis the one line (“12 neu, 3 schon vorhanden, 1 mit Fehler.”). Fields: name, nummer, strasse, plz, ort, land, sitz, email_rechnung, ust_idnr, steuernummer, zahlungsziel_tage, kundenart. A row exists already when a record of the role has the same ust_idnr, or the same nummer, or the same name ignoring case. A row without name or with a value a field does not take is fehler and is skipped. For rolle: kunde a row’s kundenart comes from its column, else from the payload’s kundenart; with neither the row is fehler (no silent default; the screen asks once for the whole file).

Books 1 gains: a Kategorie of category.list may carry konto_je_schluessel (the Konto for the answer with that Steuerschlüssel instead of konto; the platform fees book a tax-free payment service on the bank-fee Konto 6855) and nachfrage (the question the capture form asks: whether and what tax the Beleg shows) and vorschlag (the rate the form preselects); such a line is refused without steuersatz or steuerschluessel (validation, detail the question), even where one rate is preselected (kb umsatzsteuer/steuerfreie-und-ermaessigte-eingangsleistungen.md: Fachbücher, Porto und Versand, Fortbildung). A capture line takes leistungsdatum? of its own (Teilleistungen). Erfassung takes geschaeftspartner_id? (the link is kept in buchung_partner; business_partner.get lists the linked Buchungen). The capture form offers business_partner.list and creates one with business_partner.create from the Belegdaten (aussteller).

Name Payload Result and refusals
product.create {name, einheit, preis_netto, kategorie, steuersatz?, art?: "leistung" | "lieferung", beschreibung?} Produkt. kategorie is a Kategorie of richtung: einnahme valid today (category.list); steuersatz where it has several rates. validation else, listing the valid ones
product.update {produkt_id, ...} Produkt; a price change applies to every Entwurf created afterwards, never to an issued Rechnung
product.archive {produkt_id} Produkt
product.list (query) Listenabfrage Liste of Produkt. Text name; date erstellt_am; categorical kategorie, archiviert; sortable name, preis_netto; CSV yes
  • Produkt = {produkt_id, name, einheit, preis_netto, kategorie, steuersatz, art (default "leistung"), beschreibung, erstellt_am, archiviert_am}.
Name Payload Result and refusals
invoice.create_draft RechnungEingabe Rechnung (zustand: "entwurf", no number). Each position’s treatment and the notes are derived at once (positionen[].behandlung, hinweise). validation: unknown or archived Kunde or Produkt; a position without bezeichnung and Produkt; a treatment the rule cannot derive (below; detail says why, next_step “Kategorie der Position wählen”)
invoice.update_draft {rechnung_id, ...RechnungEingabe} (the whole draft) Rechnung. conflict once issued (below)
invoice.delete_draft {rechnung_id} {rechnung_id}; the Entwurf is gone, no number was used. conflict once issued
invoice.preview (query) {rechnung_id} {medientyp: "application/pdf", inhalt} (base64): for an Entwurf the page as it would be issued, with “ENTWURF” for the number; for an issued Rechnung its stored file
invoice.issue (ledger_write, idempotent) {rechnung_id, rechnungsdatum?} (default today) Rechnung with nummer, buchung_id, posten_id, dateien. In one transaction: the next number of the Nummernkreis, the content check, the PDF rendered and stored as the Beleg, the Buchung against Forderungen (as buchung.record with “noch offen”), the Offener Posten. Warnings of the capture (period_already_filed, …), ust_idnr_not_confirmed, e_rechnung (below). Refusals below
invoice.xml_copy (query) {rechnung_id} {name, medientyp, inhalt}: the XRechnung (UBL) of a Rechnung issued as PDF, the same Rechnung from the stored data (number, date, type 380). conflict when an e-invoice was due for it (next step: als E-Rechnung berichtigen), for an e-invoice, an Entwurf, a Storno or Korrektur, or when the issued Rechnung lacks a detail the XML needs; validation when the previous year’s Gesamtumsatz decides and is not recorded
invoice.amend_as_e_invoice (ledger_write) {rechnung_id} Rechnung: the Entwurf of the Berichtigung of a PDF Rechnung for which an e-invoice was due, format xrechnung, type 384 naming the original (BT-25, BT-26), no Buchung on issuing. conflict when no e-invoice was due (then invoice.xml_copy)
invoice.storno {rechnung_id, grund, datum?} (grund below, required) Rechnung: a new Entwurf of art: "storno" that names the original (storno_von), with its positions negated and grund, wirksam_am. Issuing it reverses the original Buchung (buchung.storno) with the deciding day of grund: the Offener Posten is gone and the original reads storniert. conflict for an Entwurf, a Storno, an already reversed Rechnung, and while payments are linked to its Posten (next_step “Zahlung zuerst zurückbuchen”)
invoice.correct {rechnung_id, grund, datum?} Rechnung: a new Entwurf of art: "korrektur" naming the original (korrektur_von), with its positions to change; with grund: angaben_falsch of art: "berichtigung". Issuing a Korrektur reverses the original Buchung and books the corrected one in the same transaction; the Posten follows the corrected amount. Issuing a Berichtigung books nothing: the original keeps its Buchung and Posten, the document names it (§ 31 Abs. 5 UStDV). Same conflict cases as stornieren (payments do not block a Berichtigung)
invoice.deliver (ledger_write, idempotent) {quelle?, kunde_id, nummer, rechnungsdatum, faellig_am?, leistungsdatum?, leistungszeitraum?, positionen?: [PositionEingabe], netto?, steuersatz?, kategorie?, seiten?: [hash], text?} Rechnung with eigene_nummer: true: an own Rechnung uploaded (seiten, files through POST /v1/files) or a Rechnung of another system (quelle its name, e.g. “Shop”; default hochgeladen). Either positionen or netto with steuersatz (one position; kategorie optional, else derived). Without seiten the PDF is rendered from the fields as the editor does. The number stays outside the product’s Nummernkreis. A number the Mandant has given before (any quelle, any Nummernkreis) is conflict (§ 14 Abs. 4 Satz 1 Nr. 4 UStG). Warnings gap_in_number_sequence (never blocking, the Rechnung is saved), supply_date_missing_or_future, and those of the capture. The same Idempotency-Key with another payload is idempotency_conflict
invoice.get (query) {rechnung_id} Rechnung
invoice.list (query) Listenabfrage Liste of Rechnungszeile plus {summe_offen, summe_ueberfaellig}. Text nummer, kunde; date rechnungsdatum; categorical zustand, kunde_id, art; sortable rechnungsdatum, nummer, brutto, faellig_am; CSV yes
invoice.files (query) {rechnung_id} {dateien: [Datei]}: the files stored at issuing, byte for byte, downloadable at GET /v1/files/{hash}. conflict for an Entwurf
invoice_details.get (query) {betrieb_id?} Rechnungsangaben
invoice_details.set {betrieb_id?, absender?: Absender, logo?: hash | null, muster?, naechste_nummer?, zahlungsziel_tage?} Rechnungsangaben. logo a file stored through POST /v1/files, image/jpeg or image/png (8 bit, RGB or grey, no transparency, not interlaced; validation else); null removes it. naechste_nummer (an integer from 1) and muster are conflict once a Rechnung of the Nummernkreis is issued
  • RechnungEingabe = {betrieb_id?, kunde_id, positionen: [PositionEingabe], leistungsdatum?, leistungszeitraum?: {von, bis}, zahlungsziel_tage?, text?, angebot_id?, teilleistungen?: bool, zahlungstermin_vereinbart?: bool, art?: "rechnung" | "anzahlung" | "schluss", anzahlungen?: [rechnung_id], service_time_not_agreed?: bool} (the last three: section “Anzahlungsrechnung and Schlussrechnung” of Books 4). teilleistungen: the Entgelt is agreed per month (§ 13 Abs. 1 Nr. 1 Buchst. a Satz 2 und 3 UStG): the leistungszeitraum must be whole months and each Kategorie’s net amount the same price per month to the cent; issuing books one part per month, executed at the month’s end (kb umsatzsteuer/soll-und-istversteuerung.md); else validation naming both conditions. zahlungstermin_vereinbart: faellig_am was agreed as a calendar date (Verzug from the next day, § 286 Abs. 2 Nr. 1 BGB); default false (a term set only in the Rechnung is not taken as one). text is Markdown: paragraphs, # headings, - lists, **bold**; everything else is shown as typed (no HTML, no links fetched, no images).
  • PositionEingabe = {produkt_id?, bezeichnung?, menge (default 1), einheit?, preis_netto?, kategorie?, steuersatz?}; with produkt_id the Produkt’s values of the day fill what is not given.
  • Rechnung = {rechnung_id, betrieb_id, art: "rechnung" | "storno" | "korrektur", zustand, nummer, quelle, eigene_nummer, rechnungsdatum, faellig_am, leistungsdatum, leistungszeitraum, kunde: Geschaeftspartner (as issued; the current record for an Entwurf), absender: Absender (as issued), positionen: [Position], summen: {netto, steuer: [{satz, netto, steuer}], brutto}, hinweise: [{code, text, norm}], text, storno_von, korrektur_von, storniert_durch, korrigiert_durch, angebot_id, serie_id, buchung_id, posten_id, offen, gezahlt, dateien: [Datei], zustellungen: [Zustellung], fehlend: [{feld, text}], naechster_schritt: {code, text}, erstellt_am, ausgestellt_am, ausgestellt_von, format: "pdf" | "zugferd" | "xrechnung", teilleistungen, zahlungstermin_vereinbart, grund, wirksam_am, anzahlungen, settled_by, service_time_not_agreed, deductions, amount_due}. art also berichtigung, anzahlung, schluss; zustand also settled. fehlend lists, for an Entwurf, what invoice.issue would refuse (empty when complete); naechster_schritt.code: ergaenzen, ausstellen, senden, zustellung_pruefen, zahlung_abwarten, mahnen, keiner.
  • Position = {pos, produkt_id, bezeichnung, menge, einheit, preis_netto, netto, kategorie, steuersatz, steuerschluessel, behandlung}; behandlung is the sentence of the Kategorie.
  • zustand: entwurf; ausgestellt (issued, not sent); gesendet (handed over or marked as sent); nicht_zugestellt (the last delivery was rejected); ueberfaellig (gesendet, past faellig_am, offen above zero); teilweise_bezahlt; bezahlt (offen zero, from the Offener Posten of Books 2, whatever way the payment came); storniert. A Rechnung that was never sent or whose delivery failed is never ueberfaellig and never reaches the Mahnwesen.
  • faellig_am = rechnungsdatum + zahlungsziel_tage (Rechnung, else Kunde, else Rechnungsangaben, else 14).
  • Datei = {art: "pdf" | "zugferd" | "xrechnung", hash, medientyp, name}: zugferd the PDF/A-3 with factur-x.xml embedded; xrechnung the XML (application/xml) next to the PDF for reading.
  • format (kb accounting/e-rechnung-erzeugen-xrechnung-und-zugferd.md, 1.4): the Kunde’s e_rechnung; else xrechnung with a leitweg_id; else zugferd (profile EN 16931) for a Kunde inland unternehmer when the Mandant is no Kleinunternehmer; else pdf. A Storno, Korrektur or Berichtigung keeps the original’s format (type code 384 with BG-3). The file follows EN 16931 (totals by BR-CO-10 to 16, the tax per category and rate exactly by BR-CO-17); what it lacks is in fehlend as {feld: "e_rechnung", text} and refused on issuing (validation; for XRechnung: Leitweg-ID or Kundennummer as BT-10, telephone, e-mail and IBAN of the sender, the Kunde’s e-mail; for an EU service or a Lieferung both USt-IdNr.; next_step “…oder diese Rechnung als PDF ausstellen”). Treatments without an e-invoice (§ 4 Nr. 8 ff. UStG) are refused for zugferd and xrechnung. A service not taxable at home to a business abroad (erloes_drittland_unternehmer) is category O with VATEX-EU-O and “nicht steuerbar”, no rate on the positions: the file carries the Steuernummer (BT-32, BT-29) and handelsregister (BT-30), never a USt-IdNr. (BT-31, BT-48; BR-O-02); without a Steuernummer validation, next step: enter it or issue a PDF (no e-invoice duty towards a recipient abroad); O mixed with another category is validation (two Rechnungen). An export is category G with VATEX-EU-G and “Steuerfreie Ausfuhrlieferung”, which needs the sender’s USt-IdNr.; without one category E with the same text and no code, and the warning export_of_goods_without_ust_idnr. A type 384 without the original’s number and date is validation; a Lieferung needs the Kunde’s country (BR-IC-12). Versions and identifiers are rule data (e_rechnung formate). invoice.send attaches the XML for xrechnung, else the PDF.
  • Rechnungszeile = {rechnung_id, nummer, art, zustand, kunde_id, kunde, rechnungsdatum, faellig_am, netto, brutto, offen, quelle}.
  • Absender = {name, strasse, plz, ort, land, email, telefon, iban, bic, steuernummer, ust_idnr, handelsregister}; name, steuernummer and ust_idnr default to the Mandant’s master data, handelsregister (BT-30 of an e-invoice) to its registergericht and registernummer.
  • Rechnungsangaben = {betrieb_id, absender: Absender, logo, muster, naechste_nummer, beispiel (the next number as it will read), zahlungsziel_tage, mail_konfiguriert: bool}. muster holds {jahr} and {nummer} (or {nummer:4}, zero-padded), default RE-{jahr}-{nummer:4}; the counter does not restart with the year. mail_konfiguriert: false: the “Senden” button explains it (below).

Treatment of a position (kb umsatzsteuer/saas-erloese-und-stripe.md, umsatzsteuer/rechnungsanforderungen-vorsteuer.md, umsatzsteuer/kleinunternehmer-19-ustg.md). A position’s kategorie, when given, wins; else:

Mandant and Kunde Treatment (Kategorie) Note set by the rule
Kleinunternehmer on the Leistungsdatum (any Kunde) erloes_kleinunternehmer “Steuerfrei nach § 19 UStG (Kleinunternehmer)” (§ 34a UStDV)
Kunde sitz: inland the Produkt’s Kategorie none
Kunde sitz: eu, unternehmer with ust_idnr, art: leistung erloes_eu_unternehmer “Steuerschuldnerschaft des Leistungsempfängers” (§ 14a Abs. 1 UStG)
Kunde sitz: drittland, unternehmer (status shown, Abschnitt 3a.2 Abs. 11 UStAE), art: leistung erloes_drittland_unternehmer “Nicht im Inland steuerbare Leistung (Leistungsort nach § 3a Abs. 2 UStG beim Leistungsempfänger)” (no statutory note; the kb’s neutral sentence)
Kunde abroad who is no business shown as such (a consumer, an EU Kunde without USt-IdNr.), by the position’s service_kind (kb umsatzsteuer/leistungsort-dienstleistungen-ausland.md, “Entscheidungstabelle”): catalog (§ 3a Abs. 4 Satz 2 UStG) outside the EU, on_site with performed_in: drittland, streamed outside the EU, property with performed_in: drittland erloes_drittland_nicht_steuerbar (Kz 45) “Nicht im Inland steuerbare Leistung (Leistungsort außerhalb der EU)”
the same, catalog in the EU, other to a consumer or an EU Kunde, property with performed_in: inland the inland Kategorie (Produkt or rate, § 3a Abs. 1 UStG) none
any other (no service_kind, electronic to a consumer abroad (§ 3a Abs. 5 UStG), on_site at home (§ 4 Nr. 21 UStG) or in the EU, on_site to a business (§ 3a Abs. 3 Nr. 5 UStG), a place in another EU state, other to a Kunde outside the EU of unstated status, a Lieferung abroad) not derived: validation naming what decides, next_step: the position’s service_kind or kategorie

A Kleinunternehmer takes erloes_kleinunternehmer unless the place lies outside the EU (§ 19 Abs. 1 UStG frees only turnover at home): then the Drittland Kategorie of the rule, without tax.

invoice.issue warns invoice_after_six_month_limit (never refuses) when the Rechnung is dated after the day of § 14 Abs. 2 Satz 2 UStG: six months after the leistungsdatum (or the end of the leistungszeitraum), not moved for a weekend, for a position at home to an unternehmer, or a taxed property position to anyone. Without a day of the service on the Rechnung there is no warning. The EU cases warn rechnung_nach_frist_14a instead (15th of the next month).

erloes_kunde_schuldet_steuer chosen by hand carries “Steuerschuldnerschaft des Leistungsempfängers” (§ 14a Abs. 5 UStG). The tax-free Kategorien carry the note of § 14 Abs. 4 Satz 1 Nr. 8 UStG (code steuerbefreiung, Abschnitt 14.5 Abs. 20 UStAE): erloes_igl “Steuerfreie innergemeinschaftliche Lieferung”, erloes_ausfuhr “Steuerfreie Ausfuhrlieferung” (the fixed text of the kb, also BT-120), erloes_steuerfrei “Steuerfreie Leistung”.

Content check of invoice.issue (§ 14 Abs. 4 Satz 1 UStG; for a Kleinunternehmer § 34a UStDV; § 14a Abs. 1 Satz 3 UStG): name and address (strasse, plz, ort) of Absender and Kunde, the Absender’s steuernummer or ust_idnr, at least one position with bezeichnung, menge and einheit, leistungsdatum or leistungszeitraum, for erloes_eu_unternehmer and erloes_igl the ust_idnr of both (§ 14a Abs. 1 Satz 3 and Abs. 3 Satz 2 UStG). A Kleinunternehmer’s Rechnung needs no leistungsdatum (§ 34a UStDV; Abschnitt 14.7a Abs. 1 Satz 2 UStAE): it is issued, the books take the Rechnungsdatum as the day of the service and warn supply_date_missing_or_future, the PDF prints none. It gets a number of the Nummernkreis like any Rechnung. A leistungszeitraum without leistungsdatum over more than one Voranmeldungszeitraum of the master data (unset counts as monat) is validation on issuing and on invoice.deliver: one service completed at its end or Teilleistungen with prices of their own decides when the tax arises (§ 13 Abs. 1 Nr. 1 Buchst. a UStG, Abschnitt 13.1 Abs. 3 UStAE); next_step: one Rechnung per period, or a leistungsdatum instead. A number already given (by the Nummernkreis of another Betrieb of the Mandant or an uploaded Rechnung) is conflict (one Unternehmer, Abschnitt 14.5 Abs. 11 UStAE); next_step: a pattern of its own. invoice_details.set refuses a muster that reads like another Betrieb’s apart from the width of {nummer} (validation; the Rechnungen of both could not be told apart). Date, number, net per rate, rate and tax, and the notes are set by the product. Each missing datum is validation; detail names every missing field, next_step where to enter it (the Kunde’s form, Rechnungsangaben, the Entwurf).

Refusals of Rechnungen:

Case Code next_step
A missing mandatory datum on invoice.issue validation names the datum and the form
A position with tax on the Rechnung of a Kleinunternehmer (a taxed kategorie or a steuersatz above 0) validation “Position ohne Steuer (Kleinunternehmer) anlegen”
entwurf_aendern, entwurf_loeschen or ausstellen on an issued Rechnung conflict “Stornorechnung oder Korrekturrechnung erstellen”
invoice.send by an Actor the Freigaberichtlinie does not allow needs_human (nothing is sent) #/einnahmen/rechnungen/<rechnung_id>
invoice.send without a configured mail server conflict “Mailserver in den Einstellungen der Installation eintragen (DECUMA_SMTP_HOST)”
invoice.send for an Entwurf or a Kunde without email_rechnung and no an conflict; validation “erst ausstellen”; “E-Mail-Adresse beim Kunden eintragen”
A repeated Idempotency-Key with another payload (invoice.deliver, business_partner.import) idempotency_conflict

Warnings: gap_in_number_sequence (text names the missing numbers, at most ten and “…”; judged on the numeric tail of the number among all numbers with the same text before it; Abschnitt 14.5 Abs. 10 Satz 4 UStAE: a gap is no defect), ust_idnr_not_confirmed, supply_date_missing_or_future, period_already_filed (the deciding date of a line lies in a festgeschriebener Meldezeitraum, as in Books 1), e_rechnung: a Rechnung of format: pdf to a Kunde inland unternehmer (above 250 euro, not a Kleinunternehmer, not only § 4 Nr. 8 ff. turnovers, a service from 2025) judged by § 27 Abs. 38 UStG with the service and the day of transmission (kb accounting/e-rechnung.md): at issuing with the Rechnungsdatum, again at invoice.send (electronic, today) and invoice.mark_as_sent (post and persoenlich count as paper). A service up to 2026 transmitted by 31.12.2026: on paper allowed, electronically with the recipient’s consent (hinweis code e_rechnung_zustimmung at issuing, not printed). A service of 2027 transmitted in 2027 (Nr. 2; owner decision 2026-11-24): the structured Rechnung is always allowed and the default for a business at home; a PDF is issued only with the Gesamtumsatz of the previous year recorded (master_data.set_from gesamtumsatz_vorjahr, gueltig_ab 1 January) and at most 800,000 euro and the Kunde’s consent (e_rechnung: pdf); without the turnover validation with next step “Vorjahresumsatz erfassen oder die strukturierte Rechnung ausstellen”, above it or without consent validation with “Die strukturierte Rechnung ausstellen”. Anything else (a service of 2026 transmitted from 2027 on, of 2027 from 2028 on, from 2028, whatever the turnover) is covered by no transition: invoice.issue and invoice.send refuse the PDF (validation, next step “Die strukturierte Rechnung ausstellen”); invoice.mark_as_sent records the delivery and warns. Never refused: up to the Kleinbetrag limit, a Kunde that is no business at home, only § 4 Nr. 8 ff. turnovers, a Kleinunternehmer as issuer. The dates, the 800,000 euro and the 250 euro are rule data (e_rechnung uebergang). rechnung_nach_frist_14a: an EU service or an innergemeinschaftliche Lieferung issued after the 15th of the month after the service (§ 14a Abs. 1 Satz 2, Abs. 3 Satz 1 UStG); the 15th is shown as it falls, not moved for a weekend or holiday, and the text says so and that missing it is no administrative offence (Abschnitt 14a.1 Abs. 3 Satz 4 UStAE); the Rechnung is issued. supply_description_unclear: a position whose bezeichnung has no letter or is one of a few generic phrases (“Leistungen laut Vereinbarung”, “Dienstleistung”, …) names neither kind and scope nor a clear reference to another document (§ 14 Abs. 4 Satz 1 Nr. 5 UStG); the Rechnung is issued (an empty one is refused when the position is made). verzug_30_tage (a printed hinweis, Mahnwesen setting hinweis_30_tage): on a Rechnung to a verbraucher the note of § 286 Abs. 3 BGB.

Storno and Korrektur (kb umsatzsteuer/storno-und-14c.md, “Wirkungszeitraum von Storno und Berichtigung einer Ausgangsrechnung”; the one question “Warum wird die Rechnung storniert?”; grund):

grund (label) Effect Refusal
entgelt_geaendert “Preis oder Leistung haben sich nachträglich geändert (Nachlass, Skonto, Rückgabe, Vertrag aufgehoben, Kunde zahlt nicht)” needs datum (the day of the change); the reversal (and for a Korrektur the corrected Buchung) decides on that day: the reduction in the original Kennzahl in that period, the earlier Voranmeldung stays (§ 17 Abs. 1 Satz 8 UStG) validation without datum
steuer_zu_hoch “Der Steuerbetrag oder Steuersatz war von Anfang an zu hoch” Korrektur only (Fall b1), with empfaenger_unternehmer and datum (the day the corrected Rechnung reaches the recipient). Issuing the Korrekturrechnung (with the tax owed, one rate) reverses the original and books the correction; the original’s period keeps the original’s gross less the tax owed as base, and towards an Unternehmer the excess (tax shown minus tax owed on the original gross) on UST_14C, Konto 3851, on the original’s Rechnungsdatum (Kennzahl 69). The period of datum takes the excess back (Kennzahl 69 negative where nothing else counts there) and, for a lowered amount, the change of the base and its tax (§ 17). Towards a final consumer no Kennzahl 69 (Abschnitt 14c.1 Abs. 1a UStAE). Korrekturen with linked payments are refused (nothing to repay) validation without empfaenger_unternehmer or datum, on stornieren, on issuing when the Korrektur asks for more, has several rates, the original shows no excess at the rate owed, or datum lies before the issue; conflict for a lowered amount under Istversteuerung or of a turnover without tax
steuer_zu_niedrig “… zu niedrig” Korrektur only: booked in the original’s period (the legal tax belongs there; a filed period warns period_already_filed) validation on stornieren (“Rechnung korrigieren statt stornieren”)
unberechtigter_steuerausweis “Die Rechnung hätte es so nicht geben dürfen (keine Leistung, falscher Empfänger, andere Leistung)” Storno only (Fall c), with aufwandskonto the first time (an expense Konto without tax function, e.g. 7650 or 6300; kept for later cases): the reversal takes the turnover out of the original’s period; the whole tax shown is booked on UST_14C, Konto 3851 against that expense, on the original’s Rechnungsdatum (Kennzahl 69), and stays until the Finanzamt agrees. invoice.record_consent_14c {rechnung_id, mitgeteilt_am, zeitraum_tag, betrag} records the consent and books the reduction in the period of zeitraum_tag (Kennzahl 69 minus betrag; a filed period becomes a Berichtigung) validation on korrigieren and without aufwandskonto while none is kept; invoice.record_consent_14c: conflict while the Rechnung is not reversed with this reason or without a positive betrag, validation above the tax shown less earlier consents
angaben_falsch “Nur Angaben sind falsch oder fehlen, die Beträge stimmen” Korrektur only: a Berichtigung (art: berichtigung), no Buchung, no Voranmeldung changes; recipient and amounts must stay validation on stornieren; validation on issuing when recipient, Entgelt or tax changed
neu_ausstellen “Die Rechnung wird unverändert neu ausgestellt” the reversal keeps the original’s deciding days; a Korrektur must keep recipient and amounts validation on issuing a Korrektur that changed them
Name Payload Result and refusals
invoice.send (external_communication; the shipped Freigaberichtlinie now asks for an API-Schlüssel too, so only a person sends unless the Mandant allows it) {rechnung_id, an?} (default the Kunde’s email_rechnung) {rechnung_id, zustand, zustellung: Zustellung}. The mail goes through the mail port with the PDF attached, from “ über Decuma” at the installation’s address, Reply-To the Absender’s email. A rejection by the mail server is no refusal: the result has zustand: "nicht_zugestellt" and the reason
invoice.mark_as_sent {rechnung_id, datum, weg: "post" | "eigenes_mailprogramm" | "persoenlich"} Rechnung (gesendet). validation for a datum before rechnungsdatum or after today
  • Zustellung = {zustellung_id, weg: "email" | "post" | "eigenes_mailprogramm" | "persoenlich", an, am, zustand: "uebergeben" | "zugestellt" | "zurueckgewiesen", grund, von (Actor)}. With plain SMTP uebergeben is the server’s answer at hand-over; zugestellt and later bounces come with the receiver of Work 1 or a provider’s delivery events (not built here).
  • The confirmation dialog shows Kunde, an and the format (“PDF”) before calling.
Name Payload Result and refusals
quote.create {kunde_id, datum, netto, steuersatz, gueltig_bis?, nummer?, bezeichnung?, seiten?: [hash]} Angebot (offen). Not part of the books: no Buchung, no Beleg number
quote.update {angebot_id, ...} Angebot
quote.set_status {angebot_id, zustand: "offen" | "angenommen" | "abgelehnt"} Angebot
quote.convert_to_invoice {angebot_id} Rechnung (Entwurf with angebot_id, one position “Leistung laut Angebot ” with the net amount; the treatment derived as for any position). conflict unless angenommen, and when it has a Rechnung already
quote.get (query) {angebot_id} Angebot
quote.list (query) Listenabfrage Liste of Angebot; text nummer, kunde; date datum; categorical zustand; sortable datum, netto, gueltig_bis; CSV yes
  • Angebot = {angebot_id, kunde_id, kunde, nummer, bezeichnung, datum, gueltig_bis, netto, steuersatz, brutto, zustand, seiten, rechnung_id, erstellt_am}.
Name Payload Result and refusals
recurring_invoice.create {betrieb_id?, kunde_id, positionen: [PositionEingabe], intervall: "monat" | "quartal" | "jahr", erster_lauf, letzter_tag?, text?, zahlungsziel_tage?, ausstellen?: bool, senden?: bool} Serie (aktiv). letzter_tag absent: “ohne Ende”
recurring_invoice.update {serie_id, ...} Serie; applies from the next run
recurring_invoice.pause / recurring_invoice.resume {serie_id} Serie; a paused series creates nothing; resuming does not catch up the runs missed while paused; Serie, Fixkosten and the Mahnwesen settings carry pausiert_durch (null, or the reason of automation.pause)
recurring_invoice.get (query) {serie_id} Serie
recurring_invoice.list (query) Listenabfrage Liste of Serie; text kunde; date naechster_lauf; categorical zustand, intervall; sortable naechster_lauf
  • Serie = {serie_id, kunde_id, kunde, positionen, intervall, erster_lauf, letzter_tag, text, zahlungsziel_tage, ausstellen, senden, zustand: "aktiv" | "pausiert" | "beendet", naechster_lauf: {datum, netto, brutto} | null, naechste_termine: [date, date, date], laeufe: [{datum, rechnung_id, rueckfrage_id}]}. The amount of the next run uses the prices of today.
  • A run: the instance clock runs every series whose next date is today or earlier (one run per due date, in order). Each run is the Command recurring_invoice.execute by the Actor System named serie:<serie_id> (in the Command-Log): it creates the Entwurf with the Kunde and Produkte as they are that day, leistungszeitraum from the run date to the day before the next. With ausstellen it then issues the Entwurf as the Actor Regel with the series’ id, and with senden sends it the same way: the Freigaberichtlinie decides (shipped: a Regel may issue, ledger_write allow, and is asked before sending, external_communication ask, so the sent mail waits for a person). A run that cannot complete (an archived Kunde or Produkt, a treatment not derivable, a content check that fails) raises the Rückfrage serie_unvollstaendig on a Vorgang of its own (answers erledigt: the person has fixed it and creates the Rechnung by hand); the run counts as done, never skipped silently.
  • The clock’s own names: schedule.due (query, {}: {laeufe: [{serie_id, datum, ausstellen, senden}], mahnungen: [rechnung_id], mahnungen_senden}) and recurring_invoice.execute ({serie_id, datum}, Actor System only, else not_allowed). The clock runs once a minute in decuma serve and decuma dev.
  • decuma dev: POST /dev/takt runs the instance clock’s work once for every Mandant: {laeufe, mahnungen}. PUT /dev/post/abweisen {an}: the mail sink refuses messages to that address from then on (as a mail server would), for the “nicht zugestellt” path.
Name Payload Result and refusals
dunning.settings (query) {} Mahnwesen
dunning.configure {stufen: [{tage, betreff, text, gebuehr?}], verzugszinsen: bool, absender_email?, vor_dem_senden_bestaetigen: bool, automatisch_erstellen: bool, zinsbeginn_am_zugangstag?: bool, jahr_365?: bool, pauschale_als_kosten?: bool, pauschale_fordern?: bool, hinweis_30_tage?: bool} (the conventions the law leaves open, kb buchfuehrung/mahnung-und-verzug.md; defaults the kb’s: interest from the day after the Mahnung’s receipt, 366 days in a leap year, the lump sum counts as costs in the allocation; the lump sum not claimed; no 30-day note on Rechnungen) Mahnwesen. validation: no level or more than 4, tage not increasing or below 1, a negative fee, an unknown placeholder. Warning fee_before_arrears when the first level carries a fee (Verzug begins with that Mahnung, § 280 Abs. 2, § 286 Abs. 1 BGB)
dunning_notice.list (query) Listenabfrage Liste of Mahnzeile plus {summe_offen, summe_gebuehren, summe_zinsen, summe} over the filtered rows. Text nummer, kunde; date faellig_am; categorical stufe (0 to 4), kunde_id, zustand; sortable faellig_am, tage_ueberfaellig, offen; CSV yes. A Rechnung is a row by itself once it is ueberfaellig; it stays a row while a Mahnung case is open
dunning_case.get (query) {rechnung_id} Mahnfall
dunning_notice.create {rechnung_id} Mahnung (entwurf) of the next level with its text, amounts and PDF preview (datei). Warning bank_details_old (text names the date of the last bank data). Refusals below
dunning_notice.send (external_communication) {mahnung_id, bankdaten_alt_bestaetigt?: bool} Mahnung with zustellung. When the last bank data is older than faellig_am: conflict naming that date unless bankdaten_alt_bestaetigt: true (the second confirmation). A rejected mail leaves the Mahnung nicht_zugestellt: it does not count as a delivered level
dunning_notice.mark_as_sent {mahnung_id, datum, weg: "post" | "eigenes_mailprogramm" | "persoenlich"} Mahnung (gesendet)
dunning_notice.discard {mahnung_id} Mahnung (verworfen); only an Entwurf
dunning_case.suspend {rechnung_id, grund} Mahnfall (ausgesetzt). validation without grund
dunning_case.resume {rechnung_id} Mahnfall

A payment is recorded with payment.record (Books 2) on posten_id of the Rechnung.

  • Mahnwesen = {stufen, verzugszinsen, absender_email, vor_dem_senden_bestaetigen, automatisch_erstellen, platzhalter: [name], beispiele: {gebuehr: "5.00", text}, hinweise: [{text, norm, quelle_url}], basiszins: {satz, gueltig_ab, quelle_url, abgerufen_am} | null}. Defaults before the first einstellen: one level after 14 days with a plain text, no fee, no interest, confirmation on, automatic off. hinweise is what the kb document buchfuehrung/mahnung-und-verzug.md states on charges: interest only during Verzug, 5 or 9 percentage points above the Basiszinssatz (§ 288 Abs. 1 and 2 BGB), Mahnkosten only as damage from Verzug, the law names no amount (§§ 280, 286 BGB), interest and fees carry no Umsatzsteuer (Abschnitt 1.3 Abs. 6 UStAE). Placeholders: {kunde}, {nummer}, {rechnungsdatum}, {faellig_am}, {offen}, {gebuehr}, {zinsen}, {summe}, {stufe}.
  • Mahnzeile = {rechnung_id, nummer, kunde_id, kunde, faellig_am, tage_ueberfaellig, stufe (levels delivered), zustand, naechster_schritt: {code, text, datum}, offen, gebuehren, zinsen}; naechster_schritt.code: mahnung_erstellen, mahnung_senden (an Entwurf waits), warten (the next level falls due on datum), rueckfrage (a payment may belong), ausgesetzt, alle_stufen_gesendet.
  • Mahnfall = {verzug: {ab, grund: "kalendertermin" | "dreissig_tage" | "mahnung"} | null, pauschale: amount | null, kosten_offen, rechnung: Rechnungszeile, zustand: "offen" | "ausgesetzt" | "alle_stufen_gesendet" | "erledigt", stufe, naechste_stufe: {stufe, faellig_ab} | null, offen, gebuehren, zinsen: Zinsaufstellung, entwurf: Mahnung | null, mahnungen: [Mahnung] (the history, newest first), aussetzung: {grund, am, von} | null, bankdaten: {stand: date | null, alt: bool}, rueckfrage: Rueckfrage | null}. erledigt: paid or cancelled; a Korrekturrechnung moves the case to the corrected Rechnung’s amount. alle_stufen_gesendet: the screen offers to wait; the export for a hand-over is left out (see above). “Forderungsausfall buchen” comes with Books 4.
  • Mahnung = {mahnung_id, rechnung_id, stufe, zustand: "entwurf" | "gesendet" | "nicht_zugestellt" | "verworfen", betreff, text, offen, gebuehr, gebuehren_bisher, zinsen: Zinsaufstellung, summe, datei: Datei, zustellung: Zustellung | null, erstellt_am, erstellt_von, gesendet_am}; offen is the remainder of the Rechnung on the day of the Mahnung (a partial payment lowers it and the levels continue on it).
  • Zinsaufstellung = {betrag, ab, abschnitte: [{von, bis, tage, basiszins, aufschlag, satz, grundlage, betrag}], hinweis, anrechnung: [{datum, zahlung, kosten, zinsen, hauptforderung}], hauptforderung, zinsen_offen, kosten_offen}. Verzug (Mahnfall.verzug, § 286 BGB) begins with the earliest of: the day after faellig_am when zahlungstermin_vereinbart; 31 days after the later of due date and receipt (the first delivery not rejected), for a verbraucher only when the Rechnung carries verzug_30_tage; the day after the first delivered Mahnung (its day of sending as receipt; with zinsbeginn_am_zugangstag that day). Interest runs only with verzugszinsen: true, from the Verzug up to the day of the Mahnung, on the remainder of the main claim (§ 289 BGB: no interest on interest or costs). A payment on the Posten pays the costs incurred by its day first (delivered fees, the lump sum when claimed as costs), then the interest so far, then the main claim (§ 367 Abs. 1 BGB; a payment on the Posten is the payer’s choice under § 366 Abs. 1 BGB); anrechnung shows it per payment as a proposal, Mahnfall.offen is then the main claim left, the Journal keeps the payment on the Forderung (splitting interest and costs off comes with Books 4). pauschale (§ 288 Abs. 5 BGB, 40.00 from the rule data): for a Kunde not verbraucher once in Verzug; a Mahnung claims it only with pauschale_fordern, nothing books it. Rate: Basiszinssatz plus 9 points for a Kunde unternehmer, plus 5 for a verbraucher (§ 288 BGB). A new section begins on each 1 January and 1 July and after each payment; days counted inclusive, year of 365 days (366 in a leap year), each section rounded half away from zero to the cent. hinweis states these conventions in plain words. A section without a Basiszinssatz in the rule data is not computed: betrag is null and hinweis says the interest follows after the update. No text of this section shows internal verification state.

Refusals of Mahnungen:

Case Code next_step
A Mahnung for a Rechnung that is bezahlt or storniert, a suspended case, a Rechnung not ueberfaellig, a level not due yet (detail names the day), an Entwurf that exists already, a case with every level delivered conflict the screen of the case
A Mahnung (create or send) while a payment that may belong to the Rechnung waits: an open credit Bankumsatz with the amount of the remainder, the Rechnung’s number in its reference, or the Kunde’s name as the other side. The Rückfrage zahlung_vor_mahnung is raised (it stays although the Command is refused) conflict “Rückfrage zur Zahlung beantworten” (#/eingang/<vorgang_id>)
dunning_notice.send by an Actor the Freigaberichtlinie does not allow needs_human #/einnahmen/mahnungen
dunning_notice.send without a mail server conflict as for invoice.send
dunning_case.suspend without grund validation

The Rückfrage zahlung_vor_mahnung (“Gehört dieser Zahlungseingang zur Rechnung ?”, umsatz_id on the Vorgang) is answered with question.answer: gehoert_dazu (the Mahnung stays held; link the Bankumsatz with bank_transaction.assign), gehoert_nicht_dazu (that Bankumsatz no longer holds this case).

Automatic: with automatisch_erstellen the instance clock creates the Entwurf of every level that falls due (Actor System named mahnwesen), raising the same Rückfrage instead where a payment may belong. With vor_dem_senden_bestaetigen: false it also sends them; otherwise they wait for a person. The Agent is always asked (Freigabeklasse external_communication).

The export of the Mandant contains the new tables (geschaeftspartner, produkt, rechnung with its positions, rechnungsangaben with the Nummernkreis, zustellung, angebot, serie, serie_lauf, mahnwesen, mahnung, mahnfall_aussetzung, buchung_partner) and the rendered files under belege/; the isolation suite covers them.

Foreign currency on a Beleg, the capture at a bank line whose amount differs from the Beleg, the check of the invoice requirements for the Vorsteuer, structured E-Rechnungen read without a model, Skonto, Anzahlung, Forderungsausfall, Bewirtung, Einfuhrumsatzsteuer and the Kassenbuch (issue #124, ADR 0031; priority of #141). Mandant-scoped; every name refuses a Mandant without a Betrieb with not_allowed. Amounts are decimal strings, dates YYYY-MM-DD, months YYYY-MM.

Not built yet (ADR 0031 says why and what each waits for): Fixkosten, the mixed-use and low-value-asset cases, the Rückfragen of a wrong recipient and of the supplier’s seat, “als Kleindifferenz ausbuchen”, a Kandidat reason skonto, foreign-currency Bankumsätze.

BelegdatenEingabe and Belegdaten.felder (section Books 1) gain, each optional: waehrung (ISO 4217 code of every amount of the Beleg; absent is EUR), skonto ({prozent, tage?}: the agreed cash discount, percent of the gross amount when paid within tage days of the Belegdatum), and the invoice data aussteller_anschrift, aussteller_steuernummer (Steuernummer or USt-IdNr. of the issuer), empfaenger, empfaenger_anschrift, leistung (quantity and kind, or extent and kind of the service). Erfassung gains bewirtung?: {anlass, teilnehmer: [string]}.

Rule data regelwerk/kurs-bmf_<jahr>_<monat>-<jahr>-01-01.toml (art kurs, one version per run of scripts/bmf-kurse.py, which reads the CSV of the BMF data portal): the BMF monthly average rates (§ 16 Abs. 6 Satz 1 UStG), one entry per currency and month (waehrung, monat, kurs = units per euro, fundstelle the BMF-Schreiben), with source. This build carries 29 currencies for January to October 2026; the newest version wins for a month two list. A month is published on the first working day of the following month; until then, and for a currency not listed, the Rückfrage kurs_fehlt asks for the official rate.

  • A capture with waehrung other than EUR keeps the Belegdaten in the currency and converts every amount of each line, before any sum: euro = amount / rate, to the cent, half away from zero; the tax per invoice and rate is computed on the converted lines. The month of the rate: the month of the leistungsdatum; paid before the performance, the month of the payment (Abschnitt 13.5 Abs. 7 UStAE); own revenue under Istversteuerung, the month of receipt (§ 16 Abs. 6 Satz 2 UStG).
  • Vorgang gains umrechnung: {waehrung, monat, kurs, quelle: "regelwerk" | "person", fundstelle, quelle_url, betraege: [{zeile, netto, steuer, brutto, netto_euro, steuer_euro, brutto_euro}]} | null, the conversion of its current Buchung.
  • No rate for the currency and month: nothing is booked; the capture is stored as the Vorschlag and the Vorgang gets the Rückfrage kurs_fehlt (result buchung_id: null, rueckfrage_id). The same capture again while it is open is conflict naming it. question.answer on it is conflict with next_step naming exchange_rate.record.
  • Refused (validation): a foreign currency without leistungsdatum; an Eigenbeleg in a foreign currency; revenue under Istversteuerung not paid at once; tax the recipient owes (§ 13b) under Istversteuerung (the month is not decided by the product; next_step to clarify it and capture in euro). A daily rate is never used.
Name Payload Result and refusals
exchange_rate.record {waehrung, monat, kurs, veroeffentlicht_am, fundstelle, rueckfrage_id?} {waehrung, monat, kurs, buchung_id}: the rate as the official publication states it, stored as entered by a person (insert-only). With rueckfrage_id the waiting Vorschlag is booked (buchung_id), warning exchange_rate_manual. conflict when a rate for currency and month exists; validation for EUR, a code that is not three capitals, a rate not above zero, a future month, no fundstelle
exchange_rate.list (query) {waehrung?} [{waehrung, monat, kurs, quelle, fundstelle, quelle_url, veroeffentlicht_am}]

Every Buchung converted with a rate entered by a person warns exchange_rate_manual.

A bank line in another amount than its Beleg

Section titled “A bank line in another amount than its Beleg”

bank_transaction.assign differenz gains kursdifferenz and skonto, and bankgebuehr applies to both directions; with erfassung it accepts kursdifferenz and bankgebuehr too:

  • erfassung with differenz: the Beleg is booked at its own (converted) amount as noch offen, and the Bankumsatz settles that Posten in the same call. Without differenz a capture whose amount differs from the Bankumsatz is validation, next_step naming the two answers.
  • kursdifferenz (only for a Posten booked from a foreign currency, else validation): the Posten is settled; the difference is booked on Kursaufwand bei der Zahlung (6881, less came in or more went out) or Kursertrag bei der Zahlung (4847). The tax of the Rechnung stays as converted (Abschnitt 16.4 Abs. 1 Satz 2 UStAE). For one Posten from a foreign currency, and for erfassung with a foreign waehrung, this is the default: the difference is booked without a question. 6880 and 4840 are for the valuation at the balance-sheet date (year-end track).
  • bankgebuehr: a credit shorter, or a debit longer, than the remainder; the difference is booked through the Kategorie bankgebuehren, the Posten settled. Otherwise validation.
  • skonto: below.

Every capture with a line whose Vorsteuer comes from an invoice (VST_19, VST_7) is checked (the capture form carries the invoice fields): up to 250.00 euro gross in total (after conversion) as a small-amount invoice (§ 33 Satz 1 UStDV: issuer with address, date, kind of the service, amount and rate per line), above as a full invoice (§ 14 Abs. 4 Satz 1 Nr. 1 to 8 UStG). A missing datum warns invoice_detail_missing (text names each datum with its norm); whether Vorsteuer is taken is the person’s decision, and the product books none on its own. A Vorsteuer key on a Beleg of belegart sonstiges or kontoauszug is validation (no invoice, § 15 Abs. 1 Satz 1 Nr. 1 Satz 2 UStG; next_step to book without Vorsteuer or request the invoice).

Name Payload Result
invoice_check.get (query) {beleg_id} {kleinbetrag, pruefungen: [{code, ok, norm, angabe}]} on the current Belegdaten; the limit is rule data grenze kleinbetragsrechnung; steuer_nicht_zu_hoch fails for a line whose tax exceeds its rate on its Entgelt (§ 14c Abs. 1 UStG)

Before German tax from an invoice becomes Vorsteuer (buchung.record, Books 5):

  • Seat of the issuer: the Geschäftspartner’s sitz; without one, signs of an issuer abroad (a USt-IdNr. of another state, a currency other than EUR) raise the Rückfrage lieferant_sitz (inland, eu, drittland; the capture waits as its Vorschlag). eu or drittland is validation (German tax shown by an issuer abroad is no Vorsteuer; next_step the Kategorie of a service from abroad).
  • E-invoice format: an invoice of an issuer at home that had to be an e-invoice and is none (no Belegdaten from structure, no transition of § 27 Abs. 38 UStG) is validation unless auf_berichtigung_warten or e_rechnung_weg (objektiver_nachweis | uebergangsregel_angenommen, then warning e_rechnung_fehlt); a service of 2027 warns e_rechnung_umsatzgrenze.
  • Per line mitbenutzung: {art: laufend|gegenstand, unternehmensanteil, zuordnung?: ganz|anteilig|keine} (natürliche Person only, else validation; ganz is validation): the business share of net and Vorsteuer stays, the rest is booked on Privatentnahmen (2101); a Gegenstand under 10 percent gets no Vorsteuer.
  • Per line wirtschaftsgut: {selbstaendig_nutzbar}: cost up to the expense limit stays on the Kategorie’s Konto, else GWG (0670), Sammelposten (0675) or Andere Betriebs- und Geschäftsausstattung (0690) by the choice of the Wirtschaftsjahr; without it the Rückfrage gwg_wahl_des_jahres (sofortabzug, sammelposten), whose answer is stored for the year.
  • A proposed line above the expense limit net, in a Kategorie that can hold an asset, is asked first: Rückfrage asset_or_consumption (asset, consumption, ongoing_service; held asset_or_consumption; consumption proposed when its positions are read in full and none is above the limit). The case has no proposal while it is open; consumption and ongoing_service give it (booked only on confirmation), asset leaves the case to the capture with wirtschaftsgut (warning capture_as_asset). The same lines are asked once. Only a person answers: a program’s question.answer is kept as proposed (warning hold_needs_person, the question stays open), its question.withdraw and its booking of such a line as an expense (buchung.record, buchung.post, buchung.correct, a capture with a Bankumsatz or in the Kasse) are needs_human (next_command question.answer, or beleg_data.correct, which opens the question), a Regel’s booking waits as a confirmation; after the person’s answer a program records the proposal. A person’s ongoing_service holds for later Belege of the same issuer, Betrieb, Kategorie, description and positions, at the same price while not all positions are read (warning ongoing_service_by_issuer_answer); issuer_answer.list shows it, issuer_answer.revoke ends it. Shipping (porto) and fremdleistung_inland in another line count for the limit; fremdleistung_inland is asked only when the Beleg names a thing supplied or made, or describes nothing; a Kategorie of services (rent, insurance, advice, postage, training, …) only when it names the supply of a thing or a Mietkauf; software with a period on the Beleg is asked with ongoing_service proposed.

A payment of one Posten whose amount is the remainder less skonto.prozent of the gross amount of the Posten (to the cent), on a day at most skonto.tage days after the Belegdatum, is inside the terms of the Beleg.

  • payment.record gains differenz?: "skonto" (one Posten, betrag the amount paid); bank_transaction.assign takes differenz: "skonto". The Posten is settled; in the same Buchung the deduction is split over the lines of the Rechnung in proportion to their gross amounts and into Entgelt and tax with each line’s rate (tax rounded to the cent, Entgelt the rest) and booked with the line’s key on the payment day (§ 17 Abs. 1 Satz 8 UStG): supplier side Erhaltene Skonti (5736 19 %, 5731 7 %), or the asset Konto of a line in Kontenklasse 0 (§ 255 Abs. 1 Satz 3 HGB), reducing the Vorsteuer; customer side Gewährte Skonti (4736, 4731), reducing the Umsatzsteuer. The Rechnung’s period is untouched.
  • The same difference after the period: differenz: "skonto" is validation; without it the rest stays open and the result warns cash_discount_outside_frist.
  • Refused (validation): no terms or another difference; a customer-side Skonto under Istversteuerung; a line with another key than those four.
Name Payload Result and refusals
receivable.write_off (idempotent; the app asks for confirmation) {posten_id, datum, grund: "insolvenz" | "uneinbringlich"}; Begründung in the envelope, required {buchung_id, nummer, posten_id}: the remainder is split over the Rechnung’s lines and booked on Forderungsverluste (6936 19 %, 6931 7 %, 6930 without tax) with each line’s key against Forderungen, dated datum: the Umsatzsteuer is corrected in its period (§ 17 Abs. 2 Nr. 1 Satz 1 UStG). insolvenz: the day the proceedings opened (Abschnitt 17.1 Abs. 16 UStAE); uneinbringlich: the person’s decision. Refused: no Begründung, a Verbindlichkeit, datum before the Posten or after today, Istversteuerung (validation); written off already (conflict); settled (conflict)
  • OffenerPosten gains ausfall: {buchung_id, datum, grund, betrag} | null; zustand gains ausgebucht (rest 0.00). A Storno of the write-off Buchung reopens it.
  • A later payment (payment.record with one Posten and its betrag, or bank_transaction.assign with posten) posts the reversal as a Buchung of its own: the money Konto against Erträge aus abgeschriebenen Forderungen (4925) with each line’s key, dated on the payment (§ 17 Abs. 2 Nr. 1 Satz 2 UStG). The Posten stays ausgebucht; the payment is listed in its zahlungen.

A payment (by hand or by Abgleich) of a Posten before the deciding day of one of its lines with a key that moves the tax to an earlier payment (anzahlung_bei_zahlung): own tax under Sollversteuerung (§ 13 Abs. 1 Nr. 1 Buchst. a Satz 4 UStG) and tax the recipient owes (§ 13b Abs. 4 Satz 2 UStG). The paid share of each such line (base and tax in proportion to the gross amount) is due in the period of the payment and taken off again on the line’s own deciding day, as a pair of lines on the same Konto in the payment Buchung, so no balance changes. Warning payment_before_supply names it.

Vorsteuer from an invoice paid before its supply (§ 15 Abs. 1 Satz 1 Nr. 1 Satz 3 UStG, Abschnitt 15.3 Abs. 1 Satz 2 UStAE; catalog op-anzahlung-007): a payment of a Verbindlichkeit before the deciding day of a Vorsteuer line (VST_19, VST_7) moves the paid share of the Vorsteuer, as the same pair of lines, to the later of the payment day and the day of possession of the invoice (rechnung_erhalten_am, else the confirmed day of invoice_receipt.confirm, else the Belegdatum, which the capture accepted only in the month of the Eingang).

Own Anzahlungen to a supplier (kb buchfuehrung/anzahlung-und-schlussrechnung-sonderfaelle.md, Abschnitt 5; catalog op-anzahlung-007, -016 to -018), on Erfassung:

  • prepayment_for: goods | intangible_asset | land | building | machinery | equipment | service: the invoice is the supplier’s Anzahlungsrechnung; the net amount stands on the Anzahlung Konto of what was ordered (SKR04 1180, 0170, 0705, 0720, 0780, 0795, 1300; SKR03 1510, 0039, 0079, 0129, 0299, 0499, 1500), not on the Kategorie’s expense Konto; its Vorsteuer as above.
  • A later invoice of the same supplier (issuer name or geschaeftspartner_id) while such an Anzahlung is not settled: without prepayments the capture becomes the Rückfrage anzahlung_zugehoerig (answers anzahlung_gehoert_dazu, anzahlung_gehoert_nicht_dazu). prepayments: [buchung_id] (or the answer) links them: Vorsteuer = the invoice’s tax less the Vorsteuer of the linked Anzahlungen, also when the invoice does not deduct them (Abschnitt 15.3 Abs. 5 Satz 3 UStAE); their net amount leaves the Anzahlung Konto; the expense keeps the whole Entgelt; the Verbindlichkeit is the rest. Warning anzahlung_nicht_abgesetzt when the invoice asks for more than is open. prepayments: []: none belongs. An invoice that may belong to an expense booked before it (“Rechnung folgt”) is refused with the case in retry_payload.case_id; not_paid_before: true captures it as an expense of its own. Captured into that case, the case the Beleg arrived in is closed; the Storno opens it again.
  • deducted_on_invoice: the gross the invoice deducts (BT-113). With no own Anzahlung to the supplier recorded: validation (no Vorsteuer from it). A linked Anzahlung with no recorded payment: validation.

RechnungEingabe.art: anzahlung or schluss (default rechnung; invoice.update_draft may switch between the three). Catalog op-anzahlung-001 to -015; kb buchfuehrung/skonto-anzahlung-forderungsausfall.md, Beispiel 3, and buchfuehrung/anzahlung-und-schlussrechnung-sonderfaelle.md; § 13 Abs. 1 Nr. 1 Buchst. a Satz 4, § 14 Abs. 5 UStG, Abschnitt 14.8 UStAE.

  • Anzahlungsrechnung (art: "anzahlung"): leistungsdatum or leistungszeitraum is the expected time of the supply, or service_time_not_agreed: true (§ 31 Abs. 4 UStDV, Abschnitt 14.8 Abs. 4 UStAE); the page and the file say it is an Anzahlung before the supply and name that time. Issuing posts no Buchung: the document is a Beleg, and the Rechnung is an Offener Posten of art: "anzahlung" (posten_id = rechnung_id, rest the gross requested). received_on: the payment it bills was received already on that day (§ 14 Abs. 4 Satz 1 Nr. 6 UStG; before the Rechnungsdatum it stands on the page and in BT-7; after it: validation). A payment (payment.record with that Posten alone, or bank_transaction.assign, at most the rest) books the money Konto against Erhaltene Anzahlungen (SKR04 3250, SKR03 1710, rule data supplement <kennung>.anzahlungen) for the Entgelt and, for a position taxable at home, the Umsatzsteuer Konto for the tax of the share received, both keyed and dated the receipt: the tax is in the Voranmeldung of the month of receipt (Kennzahl 81 or 86; under Istversteuerung as a line posted at payment), a partial payment taxes only what is received. A position without domestic tax (Kleinunternehmer, steuerfrei, igL, Ausfuhr, § 3a Abs. 2 to an EU Unternehmer, nicht steuerbar im Drittland) is received without tax and without Kennzahl; the whole amount is in the Kennzahl of its treatment with the Schlussrechnung; a Kleinunternehmer’s receipt counts toward the Gesamtumsatz on its day. E-invoice type 386 (UBL or ZUGFeRD), the expected time (or calendar month) in BT-22, no BT-72. validation: a position whose tax the customer owes (§ 13b, Kennzahl 60; next step: one Rechnung over the whole Entgelt after the supply) or with no Kennzahl; a part payment on positions with and without domestic tax (which positions it pays is asked); no expected time and not service_time_not_agreed. No Skonto, waiver, write-off or returned payment on such a Posten (validation).
  • Schlussrechnung (art: "schluss", anzahlungen: [rechnung_id], the Anzahlungsrechnungen of this order): the positions are the whole supply. Rechnung.deductions: [{number, received_until, net, tax}] lists what was received on each named Anzahlungsrechnung up to the Rechnungsdatum (nothing received: not deducted), amount_due = gross less the deductions. Issuing books the whole supply as a Rechnung and a second Buchung that deducts the Anzahlungen: Erhaltene Anzahlungen and the Umsatzsteuer of each key, Soll, keyed on the day of the supply (only what was reported at receipt), against Forderungen, recorded as a payment of its Posten with weg: "verrechnung"; the Voranmeldung of the supply’s month carries only the rest. Under Istversteuerung the Schlussrechnung’s tax stands on „Umsatzsteuer nicht fällig“ and the deduction lowers that Konto by the Anzahlungen’ tax (nothing reported in that month; the rest due with its payment; the year-end check counts the tax less the deducted). The named Anzahlungsrechnungen are then zustand: "settled" (settled_by), their Posten closed (rest 0.00). E-invoice type 380 with BT-113 (gross received) and BT-115 = BT-112 - BT-113 (BR-CO-16), each Anzahlung with Entgelt and tax in BT-22 (BMF vom 15.10.2026, Rn. 3), one BG-3 (BT-25, BT-26) per named Anzahlungsrechnung, and for one paid less than requested (or not at all) a BT-22 note that it is settled by this Rechnung. validation: the Schlussrechnung names no Anzahlungsrechnung while the Kunde has one with receipts not yet settled (§ 14 Abs. 5 Satz 2 UStG; else § 14c Abs. 1 UStG, op-anzahlung-005); a named one that is not an issued, open Anzahlungsrechnung of the Kunde; a receipt after the day of the supply; the Anzahlungen received above the Schlussrechnung per key (Entgelt or tax); an Anzahlung received with another treatment than the Schlussrechnung’s (also a Kleinunternehmer’s Anzahlung with a regular Schlussrechnung): the next step is to correct it in the period of its receipt.
  • invoice.issue of a rechnung to a Kunde with such receipts not settled is conflict with the question whether one belongs to this supply; Rechnung.unsettled_anzahlungen (Entwurf) names them; AusstellenPayload.unrelated_anzahlungen: true answers no.
  • invoice.storno of an Anzahlungsrechnung without payments posts nothing; of a Schlussrechnung it reverses its Buchung and the deduction, and the Anzahlungsrechnungen are open again. invoice.correct of either is conflict (next step: reverse and issue anew).

Steuerschlüssel EUST (kb umsatzsteuer/steuerschluessel-und-kennzahlen.md): the line is the amount of the Einfuhrumsatzsteuer from the customs notice (Kategorie einfuhrumsatzsteuer, Konto 1433), its leistungsdatum the day it arose; it enters Kennzahl 62 (Zeile 40) and not Zeile 37. An Eigenbeleg is not accepted.

“privat ausgelegt” books against 3510 (refund owed to the Gesellschafter) for a juristische Person and 2181 (Privateinlage) for an Einzelunternehmen (kb buchfuehrung/zahlungsstand-eines-belegs.md); a Personengesellschaft keeps 2180. “bar” needs a Kasse (below).

The Gesamtumsatz counts the Entgelte received (§ 19 Abs. 2 Satz 1 UStG): a Skonto granted at payment is taken off (for a Kleinunternehmer on 4730), a written-off rest never counts, a refund in the year of its payment reduces it. A refund in another year than the payment it returns is refused for a Kleinunternehmer (validation, next step to clarify the year).

Name Payload Result
incoming_invoice.list (query) Listenabfrage Liste of {vorgang_id, beleg_id, zustand, lieferant, rechnungsnummer, belegdatum, brutto, waehrung, zahlung, rest, posten_id, pruefung, rueckfrage_offen, buchung_id}: every Vorgang whose Beleg is an incoming invoice (Belegart rechnung or kleinbetragsrechnung, or booked against Verbindlichkeiten). Text lieferant, rechnungsnummer; date belegdatum; categorical zustand, zahlung (offen, teilweise, bezahlt, ohne_posten), pruefung (ok, fehlgeschlagen, nicht_geprueft); sortable belegdatum, brutto; CSV yes. A row opens the drawer from case.get, beleg.get and invoice_check.get

Kategorien of their own rule set kategorie-ausgaben: bewirtung, einfuhrumsatzsteuer, and for § 13b: werbung_eu, werbung_drittland, plattform_eu, plattform_drittland (a platform fee that is an exempt payment service belongs to bankgebuehren).

beleg.deliver reads a structured E-Rechnung from its data, without any model: an XML page (application/xml, now accepted by POST /v1/files) in XRechnung UBL (Invoice, CreditNote) or CII, or a PDF with an embedded factur-x.xml (ZUGFeRD). The Belegdaten record has quelle: "struktur", every field gelesen: number, date, Leistungsdatum, issuer with address and tax number, recipient with address, the kind of the service, currency, gross total and one line per VAT breakdown (net, tax, rate); the Vorgang is gelesen. The file stays the Beleg unchanged. A file whose specification identifier (BT-24) is not one of XRechnung 3.0, EN 16931, ZUGFeRD BASIC or EXTENDED is kept as an ordinary document and warns no_e_invoice_profile.

Source: kb buchfuehrung/kassenbuch-und-bargeld.md, “Folgen für die Software”. It exists only once a Kasse is added; it is no cash register (no sales dialog, no receipt for a cash customer, no change).

Name Payload Result and refusals
cash_box.create {betrieb_id?, name, konto?, anfangsbestand, eroeffnet_am}; konto of kind aktiv (default 1600) Kasse = {kasse_id, name, konto, anfangsbestand, eroeffnet_am, bestand}. conflict: a Kasse with this Konto exists
cash_box.list (query) {} [Kasse]
cash_book.enter (idempotent) {kasse_id, art, datum, betrag?, text?, zur_bank?, erfassung?, tagesabschluss?: {nummer, beleg_id, summen: [{steuersatz, brutto, zahlungsart: "bar"}]}, beleg_id?, eigenbeleg?}; art betriebseinnahme and betriebsausgabe (with erfassung, a capture paid bar), privateinlage and privatentnahme (with betrag and eigenbeleg; not for a juristische Person), geldtransit (with betrag, zur_bank, a deposit slip or Eigenbeleg; through 1460), tagesabschluss (cash sums per rate of an external register with its Beleg) {eintrag_id, nummer, buchung_id, bestand}. Every entry is a Buchung against the Kasse Konto, numbered without gaps per Kasse. conflict when the balance would end any day below zero (late entries are sorted into the order of days and every following day is checked; detail names the day and the balance, next_step the missing entry, e.g. a Privateinlage or a Geldtransit from the bank). Warning cash_box_recorded_late when more than one business day lies between the day of the event and the recording
cash_book.storno (idempotent) {eintrag_id} the Storno entry naming the entry, with the Storno of its Buchung; conflict for a second Storno. An entry is never changed (the table is insert-only; the application role cannot update it)
cash_count.record (idempotent) {kasse_id, datum, gezaehlt, buchen?} {sollbestand, gezaehlt, differenz, eintrag}; with buchen the difference is an entry kassendifferenz with an Eigenbeleg (Fehlbetrag on 6300, Überschuss on 4830)
cash_book.get (query) {kasse_id, von?, bis?} {kasse, anfangsbestand, eintraege: [{eintrag_id, nummer, datum, erfasst_am, spaet, art, betrag, bestand, text, beleg_id, buchung_id, storno_von}], endbestand}

“bar” in “Wie bezahlt?” (buchung.record, payment.record) needs a Kasse (validation naming cash_box.create); with one Kasse it writes the entry. The opening balance is a fixed figure of the Kasse, not a Buchung: the balance of the Kasse Konto plus the opening balance equals the running balance.

The Kategorie bewirtung (rule data regelwerk/kategorie-ausgaben-2026-01-01.toml, kennung ausgaben, listed by category.list with the others; 7 and 19 percent) needs bewirtung with anlass and at least one teilnehmer, else validation (next_step: without a business occasion close the Vorgang with grund: "privat"). The net amount of each line splits into 70 percent on 6640 and 30 percent on 6644 (the 30 percent share rounded to the cent); the Vorsteuer stays in full (§ 4 Abs. 5 Satz 1 Nr. 2, Abs. 7 EStG; § 15 Abs. 1a Satz 2 UStG; Abschnitt 15.6 Abs. 6 UStAE).

A recurring expense from a contract (kb buchfuehrung/dauerschuldverhaeltnis-vertrag-als-beleg.md, “Folgen für die Software”); the contract is the Beleg of the whole series. The run never books: on each date it records the expected expense. A debit to the Lieferant with the agreed amount, the Beleg of the month or the confirmed Teilleistung completes it, exactly once. Route #/ausgaben/wiederkehrend.

Name Payload Result and refusals
recurring_expense.create {betrieb_id?, lieferant_id, kategorie, brutto, netto?, steuer?, steuersatz?, angaben?: {aussteller_anschrift, aussteller_steuernummer, empfaenger, empfaenger_anschrift, rechnungsnummer, leistung}, intervall: monat|quartal|jahr, erster_termin, ende?, vertrag_beleg_id, vertragsdatum, zeitraum_je_rate?}; amounts, rate and statements only as the contract shows them (the fields of an Eingangsrechnung); zeitraum_je_rate answers “Nennt der Vertrag für jede Rate den Monat oder Zeitraum, für den sie gilt?” (no default) Fixkosten = {fixkosten_id, lieferant, kategorie, intervall, erster_termin, ende, brutto, netto, steuer, steuersatz, angaben, fehlende_angaben, weitere_belege, zeitraum_je_rate, zustand: aktiv|beendet, naechster_termin, naechste_termine, laeufe: [{lauf_id, termin, brutto, zustand: erwartet|erfuellt, buchung_id}]}. validation: no Lieferant, no expense Kategorie, amounts that do not add up, a tax amount on a Kategorie without Vorsteuer. A statement the Vorsteuer needs that the contract lacks (the check of an Eingangsrechnung; the time of the service is no defect) is listed in fehlende_angaben, warns contract_input_missing and raises the Rückfrage fixkosten_angabe_fehlt: no Vorsteuer from the contract and no rate booked on its own until a document supplies it. The contract’s Vorgang in the Eingang is closed (fixkosten_vertrag)
recurring_expense.supplement_inputs {fixkosten_id, beleg_id, angaben} adds the statements of a supplementing document (§ 31 Abs. 1 UStDV), the document becomes a further Beleg of the contract; settles fixkosten_angabe_fehlt when nothing is missing
recurring_expense.clarify_deviation {rueckfrage_id, antwort: nachtrag|einmalig|gehoert_nicht_dazu, nachtrag?: {beleg_id, belegdatum, ab?, brutto?, netto?, steuer?, steuersatz?}} answers the Rückfrage fixkosten_betrag_weicht_ab raised by a debit to the Lieferant with another amount (nothing is linked before): nachtrag records the new amount from the rate it names (a further Beleg of the contract) and links the payment; einmalig books the paid amount once, Vorsteuer at most the contract’s tax and at most the statutory tax; gehoert_nicht_dazu leaves payment and rate open and asks no second time. question.answer refuses both Fixkosten Rückfragen and names the Command
recurring_expense.update {fixkosten_id, brutto?, netto?, steuer?, steuersatz?, ab?, beleg_id?, belegdatum?, zeitraum_je_rate?} (zeitraum_je_rate alone records the answer) from the next rate not run, or from ab (a Nachtrag naming an open rate); conflict for a rate completed already; a waiting debit with the new amount is linked
recurring_expense.end {fixkosten_id, ende} no rate after ende; a later debit to the Lieferant is no rate and goes the way of any Bankumsatz without candidate
recurring_expense.get, recurring_expense.list (queries) {fixkosten_id}, list query
recurring_expense.execute {fixkosten_id, termin} by the instance clock only (System named fixkosten:<id>; schedule.due lists the due dates under fixkosten); records the expected expense
recurring_expense.assign_beleg {lauf_id, beleg_id} {lauf_id, buchung_id, neue_buchung}: a completed rate takes the Beleg of the month as a further Beleg of its Buchung; an open one is booked against Verbindlichkeiten, settled later by its payment
recurring_expense.confirm_received {lauf_id} books an unpaid rate against Verbindlichkeiten with the contract as Beleg; conflict while zeitraum_je_rate is unanswered (the Vorsteuer waits) or answered no

In the Abgleich an open expected expense is a candidate fixkosten (lauf_id) of a debit to its Lieferant (name) from five days before its date on; passt with the agreed amount. bank_transaction.assign takes fixkosten_lauf_id and books Entgelt and Vorsteuer (or the gross amount for a Kategorie without Vorsteuer) against the bank, citing the contract and the statement. An import, a run and a change of the amount link a debit whose only candidate it is. Another amount is conflict with next_step the Nachtrag; a second link of the same rate is conflict. The Vorsteuer belongs to the period of the rate’s date, or later the day the payment document or the Beleg of the month is there when the contract does not name the period of each rate (§ 15 Abs. 1 Satz 1 Nr. 1 UStG, Abschnitt 14.5 Abs. 17 Satz 1 and 15.2 Abs. 2 Satz 6 UStAE).

New tables kurs_eingabe, umrechnung, forderungsausfall, kasse, kassenbuch_eintrag, fixkosten_betrag (all insert-only), fixkosten and fixkosten_lauf are in the export of the Mandant and in the isolation suite.

Books 4 block 3 (verdicts 5, 7, 11 of domain review; ADR 0031)

Section titled “Books 4 block 3 (verdicts 5, 7, 11 of domain review; ADR 0031)”
  • Rest erlassen: open_item.write_off_remainder {posten_id, datum, lieferant_verzichtet?, business_reason?} with a required begruendung, any amount (business_reason is asked under an Einnahmenüberschussrechnung above the Kleindifferenz, false is needs_human; a waiver without it is the Rückfrage waiver.<Buchung> of the EÜR; money back on a paid invoice that no correction shares out is the Rückfrage return.<Buchung>: payment, a Steuerschlüssel of its lines, none or other): the remainder is waived for good as a change of the base (§ 17 Abs. 1 UStG), split by gross over the lines and rates of the Rechnung, booked and declared in the Voranmeldungszeitraum of datum (never the invoice’s or the payment’s): own Forderung on Erlösschmälerungen 4720 / 4710 (SKR03 8720 / 8710, Kz 81 / 86 reduced), Verbindlichkeit on Nachlässe 5720 / 5710 (SKR03 3720 / 3710, Kz 66 reduced) only with lieferant_verzichtet: true, an asset line on its own Konto. The Posten is settled by a payment of the way erlass; a Storno reopens it. Refused: a datum in a transmitted period (conflict with next step), own revenue under Istversteuerung, a settled Posten. Not for an uncollectable Forderung (receivable.write_off). The Kleindifferenz parameter (rule data grenze kleindifferenz, angebot 2.00, product value on the reservation list) only decides whether bank_transaction.assign names open_item.write_off_remainder in the warning amount_differs; nothing is cleared by itself. After a payment that leaves an own Forderung with a rest within the parameter the Event open_item.remainder_open (posten_id, rest, datum, art) is emitted; the shipped Regel kleindifferenz_erlassen (rule.templates, off until switched on) answers it with open_item.write_off_remainder on the payment’s day, with the Regel as actor. A Regel is refused on a Verbindlichkeit and above the parameter.
  • Wrong recipient: the Mandant’s Anschrift is master data (master_data.set strasse, plz, ort; shown by mandant.get; the default of the issuer address of outgoing Rechnungen). A capture with Vorsteuer compares belegdaten.empfaenger and empfaenger_anschrift with the Mandant’s or Betrieb’s name and Anschrift (letters and digits, any case): the name with another address, or a shortened name at the Mandant’s address, books with the warning recipient_inexact; a Mandant that is a natural person is named by the full name (alone or with exactly one of the Betriebe) and a stored address, the full name elsewhere or without an address is asked with the proposal wir_sind_gemeint, a shortened or another name without one; a Beleg that only that name connects with the business is booked by a person (needs_human for every other caller, a Regel’s booking waits as a confirmation); another person is not booked: Erfasst.rueckfrage_id names the Rückfrage empfaenger_weicht_ab with the answers wir_sind_gemeint (booked with Vorsteuer, warning empfaenger_weicht_ab), fuer_uns_anderer_empfaenger (gross amount as expense, nothing in Kz 66, warning with the task to request a corrected invoice), nicht_fuer_uns (the Vorgang is closed without a Buchung, erledigt_grund kein_beleg_des_betriebs). After a corrected invoice the period is the person’s choice (both months are offered by rechnungspruefung::zeitraeume_nach_berichtigung; no Command books it yet).
  • Personengesellschaft: gesellschafter.create {name, haftung: "vollhafter" | "kommanditist"} -> {gesellschafter_id, name, entnahme_konto, einlage_konto} (Vollhafter: the next free pair of the blocks SKR04 2100/2180, 2102/2182 … 2108/2188, SKR03 1800/1890 …; own Konten created; at most eight; Kommanditist validation); gesellschafter.list. For a Personengesellschaft every private booking names gesellschafter_id: buchung.record and payment.record with privat_ausgelegt (and erstattet: false: booked on the Einlage Konto; true and missing are validation), cash_book.enter Privateinlage and Privatentnahme. journal::buchen refuses the Einzelunternehmen Konten 2101, 2131, 2181, 4640 for other Mandanten and the Vollhafter blocks outside a Personengesellschaft (Storno exempt).
  • GWG and Sammelposten: rule data grenze gwg (250 / 800 / 1000, each included), anlage::einordnen and anlage::aufloesung; Konten 0670/6260, 0675/6264 (SKR03 0480/4855, 0485/4862). No Command yet (Anlagenverzeichnis, Year-end 1).
  • Mixed use: ausgaben::vorsteuer_bei_mitbenutzung and ausgaben::wertabgabe (Einzelunternehmer: Wertabgabe as a manual Buchung 2131 an 4640 with UST_19, Kz 81); no capture input yet.
  • Uneinbringlichkeit: receivable.write_off grund also vorlaeufiger_verwalter (with befugnis: stark, zustimmungsvorbehalt, forderungseinzug, kassenfuehrung; keine or missing is validation) and abweisung_mangels_masse. payable.write_off {posten_id, datum} with a required begruendung (never by a Regel): the Vorsteuer of the remainder is reduced in the period of datum against the Konto of the expense; the Posten stays open with vorsteuer_berichtigt; a later payment deducts the Vorsteuer of its share again. The Voranmeldung shows Kennzahl 50 (Zeile 51) and 37 (Zeile 52) for these write-offs as positive amounts.

ADR 0042. Every payload carries jahr (the Wirtschaftsjahr, named by the year of its Stichtag).

Name Payload Result / refusals
asset.list (query) {jahr} anlagen [AfA-Plan per Anlage: jahr, afa, buchwert, zustand gebucht/vorgeschlagen/geplant], offene_kaeufe, anlagenspiegel (per position, frage_gwg_als_abgang), fragen, wahl_des_jahres, grenzen
asset.create {buchung_id, bezeichnung, lieferung, kategorie?, selbstaendig_nutzbar?, wahl_des_jahres?, jahre?, herkunft?, begruendung?, voll_im_ersten_jahr?} {anlage_id, behandlung, anschaffungskosten, jahre, herkunft}; validation without a line on the Anlagevermögen, a limit or an answer; conflict a second entry or the other choice of the year; warning useful_life_differs
asset.update_useful_life {anlage_id, jahre, herkunft, begruendung} the Anlage with its plan; conflict once an Abschreibung is posted
asset.record_disposal {anlage_id, datum, erloes, zeitanteil?} {afa, restbuchwert, ertrag, frage}; validation asks zeitanteil (no default)
loan.create {konto, bezeichnung, betrag, zins_prozent, beginn, ende, gesellschafter} {id}
closing.set_input {jahr, schluessel, wert} {id}; needs_human for a Regel or the Agent; validation a Hebesatz below the minimum
closing.proposals (query) {jahr} vorschlaege [schluessel, nr, art berechnet/gefragt/markiert, titel, rechnung, zeilen, norm, eingabe, markierungen, vorlaeufig, zustand vorgeschlagen/gebucht/abgelehnt/ueberholt/frage, buchung_id, differenz], pruefungen [schluessel, stand geprueft/hinweis/offen, text, betrag, ort, markierung]
closing.workbook (query) {jahr} schritte (vorbereiten, buchungen, bilanz, feststellen, uebermitteln, jahreswechsel), naechster_schritt, pruefungen, vorschlaege, groessenklasse {klasse, merkmale, vorjahr, ueberschritten, fragen}, termine {aufstellung, aufstellung_spaetestens, feststellung, offenlegung, verschiebung_nicht_angewandt}, jahresabschluss, feststellung, offenlegung, sperre offen/gesperrt/berichtigung, aufbewahrung
abschlussbuchung.adopt {jahr, schluessel?} {gebucht: [[schluessel, buchung_id]]}; conflict with an open check (names each and where it is fixed) or a tax before the others
abschlussbuchung.adjust {jahr, schluessel} Storno and replacement; warning provision_differs
jahresabschluss.get (query) {jahr, vorschau?, form?, format?} werte (aktiva, passiva, guv, vermerke, groessenklasse, anlagenspiegel, summenproben, vorschau), gespeichert {hash, version, letzte_nummer, ueberholt}; PDF with format: pdf
jahresabschluss.prepare {jahr} gespeichert; conflict open checks, open entries, open size class, above small
jahresabschluss.record_feststellung {jahr, hash, beschluss_am, ausschuettung?, einstellung_gewinnruecklagen?, beleg_id?} {id, verwendbar, ausschuettung, einstellung_gewinnruecklagen, vortrag}; warning frist_expired
jahresabschluss.record_disclosure {jahr, weg hinterlegung/veroeffentlichung, am, beleg_id?} {id}; conflict before the Feststellung; validation Hinterlegung above Kleinst
year.balance_carryforward (query) {jahr} zeilen, summe_soll, summe_haben, ergebnis, vorlaeufig, buchung_id
year.festschreiben {jahr} {letzte_nummer, jahresabschluss_hash, saldenvortrag_buchung, meldungen}; needs_human for any actor but a person
year.start_amendment {jahr, grund} {id}; needs_human; conflict while the next year is locked (names both ways); warning feststellung_update
year.complete_amendment {jahr} as year.festschreiben plus berichtigung_noetig; warning berichtigung_noetig

Every Buchung: conflict dated in a locked year (next step “Berichtigung des Jahres beginnen”); warnings asset_without_entry (a line on the Anlagevermögen) and closing_superseded (a year with a stored Jahresabschluss).