Skip to content

Belege

A Beleg is the evidence behind a Buchung: an invoice, a receipt, an E-Rechnung. In OpenDecuma every Beleg arrives in the inbox (Eingang) as a case, is read, and is captured into a balanced Buchung. The original file is kept unchanged in the Belegablage.

Way How
Web app Upload or photograph it; a picture is deskewed, cropped and checked against the quality limits before it is read
E-mail A mail address of the Mandant receives Belege as attachments (self-hosting: Belege by e-mail)
Inbound webhook inbox_webhook.create gives a URL and a secret (shown once) for another system to deliver files
API, CLI, MCP file.store stores the file and returns its SHA-256; beleg.deliver puts one or more stored files into the inbox as one Beleg
Terminal window
decuma file.store --media-type application/pdf --content @rechnung.pdf # prints the hash
decuma beleg.deliver --payload '{"pages": ["<hash>"]}'

beleg.deliver checks for duplicates by file and content, opens a case and reads it: an E-Rechnung (XRechnung, or a PDF with embedded ZUGFeRD XML) from its structure, anything else through the reading port if the installation has one (Ports and hooks). Without a reading port, a person types the Belegdaten.

inbox.list shows the cases, what waits for a person first. Capturing a case (buchung.record) turns its Belegdaten, one line per tax rate with a Kategorie, and “Wie bezahlt?” into a balanced Buchung with the derived tax lines. A value that differs from what was read is kept with the warning read_value_overridden. Without a document, buchung.record writes an Eigenbeleg with a Begründung.

Where the product cannot decide alone (a missing Rechnungsangabe, a supplier abroad, a choice that is yours), the case carries a Rückfrage with the next step instead of a guess.

Situation Command
The reading was wrong (amount, date, issuer, number) beleg_data.correct: send only the fields to change; on a booked case with korrektur_buchen: true it also posts the Storno and the new Buchung
The Buchung is wrong buchung.correct (Storno and replacement in one transaction) or buchung.storno
Two files are one Beleg beleg.merge
A further document to an existing Buchung beleg.assign
The reading failed beleg.read_again

Nothing is deleted: the Journal is unchangeable, a correction is a Storno and a new Buchung, and both stay readable. beleg.list with the filter status: ohne_buchung lists the Belege that are not booked yet, with why and the next step.