till.addEntry
Add a single cash entry. Sequence number assigned by DB trigger. Mutation — changes data.
Input parameters
| Field | Type | Required | Notes |
|---|---|---|---|
type | enum | yes | One of: income, expense |
category | string | yes | |
amount | number | yes | |
description | string | yes | |
entryDate | string | no | |
reservationId | string · nullable | no | |
reservationCode | string · nullable | no | |
guestName | string · nullable | no |
Output fields
| Field | Type | Required | Notes |
|---|---|---|---|
ok | literal | yes | One of: true |
entryId | string | yes | |
sequenceNumber | integer | yes |
till.balance
Running balance — all-time net + today subtotal + last entry timestamp. Read-only query.
Input parameters
Returns object.
Output fields
| Field | Type | Required | Notes |
|---|---|---|---|
totalIncome | number | yes | |
totalExpense | number | yes | |
balance | number | yes | |
todayIncome | number | yes | |
todayExpense | number | yes | |
lastEntry | string · nullable | yes |
till.categories
Available categories per tenant, split by type. Read-only query.
Input parameters
Returns object.
Output fields
| Field | Type | Required | Notes |
|---|---|---|---|
income | array of object | yes | |
income.value | string | yes | |
income.label | string | yes | |
expense | array of object | yes | |
expense.value | string | yes | |
expense.label | string | yes |
till.closeDay
Close (festschreiben) the cash book up to a date. Locks the period against further postings and records a chained hash.
Input parameters
| Field | Type | Required | Notes |
|---|---|---|---|
date | string | yes |
Output fields
| Field | Type | Required | Notes |
|---|---|---|---|
ok | literal | yes | One of: true |
abschlussDate | string | yes | |
income | string | yes | Decimal as string — numeric column, not an IEEE-754 double |
expense | string | yes | Decimal as string — numeric column, not an IEEE-754 double |
entryCount | integer | yes | |
hash | string | yes |
till.closings
This tenant's finalizations (Festschreibungen), most recent first. Read-only query.
Input parameters
| Field | Type | Required | Notes |
|---|---|---|---|
limit | integer | no | Default: 60 |
Output fields
| Field | Type | Required | Notes |
|---|---|---|---|
lastClosedDate | string · nullable | yes | |
closings | array of object | yes | |
closings.abschlussDate | string | yes | |
closings.income | string | yes | Decimal as string — numeric column, not an IEEE-754 double |
closings.expense | string | yes | Decimal as string — numeric column, not an IEEE-754 double |
closings.entryCount | integer | yes | |
closings.firstSequenceNumber | integer · nullable | yes | |
closings.lastSequenceNumber | integer · nullable | yes | |
closings.hash | string | yes | |
closings.previousHash | string · nullable | yes | |
closings.createdAt | string | yes |
till.count
Number of entries (for pagination + status displays). Read-only query.
Input parameters
Returns object.
Output fields
Returns integer.
till.forDate
Entries for a specific date. Read-only query.
Input parameters
| Field | Type | Required | Notes |
|---|---|---|---|
date | string | yes |
Output fields
| Field | Type | Required | Notes |
|---|---|---|---|
entries | array of object | yes | |
entries.id | string | yes | |
entries.sequenceNumber | integer | yes | |
entries.entryDate | string | yes | |
entries.type | enum | yes | One of: income, expense |
entries.category | string · nullable | yes | |
entries.description | string | yes | |
entries.amount | string | yes | Decimal as string — numeric column, not an IEEE-754 double |
entries.reservationId | string · nullable | yes | |
entries.reservationCode | string · nullable | yes | |
entries.guestName | string · nullable | yes | |
entries.createdAt | string | yes | |
entries.createdByUserId | string · nullable | yes | |
entries.stornoOfEntryId | string · nullable | yes | |
entries.storniert | boolean | yes | |
totals | object | yes | |
totals.income | number | yes | |
totals.expense | number | yes | |
totals.net | number | yes |
till.report
Aggregated report across a date range — totals + per-category + per-day. Read-only query.
Input parameters
| Field | Type | Required | Notes |
|---|---|---|---|
from | string | yes | |
to | string | yes |
Output fields
| Field | Type | Required | Notes |
|---|---|---|---|
from | string | yes | |
to | string | yes | |
totals | object | yes | |
totals.income | number | yes | |
totals.expense | number | yes | |
totals.net | number | yes | |
byCategory | object | yes | |
byCategory.income | object | yes | |
byCategory.expense | object | yes | |
byDay | object | yes | |
entries | array of object | yes | |
entries.id | string | yes | |
entries.sequenceNumber | integer | yes | |
entries.entryDate | string | yes | |
entries.type | enum | yes | One of: income, expense |
entries.category | string · nullable | yes | |
entries.description | string | yes | |
entries.amount | string | yes | Decimal as string — numeric column, not an IEEE-754 double |
entries.reservationId | string · nullable | yes | |
entries.reservationCode | string · nullable | yes | |
entries.guestName | string · nullable | yes | |
entries.createdAt | string | yes | |
entries.createdByUserId | string · nullable | yes | |
entries.stornoOfEntryId | string · nullable | yes | |
entries.storniert | boolean | yes |
till.stornoEntry
Reverse a cash-book (Kassenbuch) entry by booking a counter-entry. Nothing is deleted — the ledger is append-only (GoBD).
Input parameters
| Field | Type | Required | Notes |
|---|---|---|---|
id | string | yes | |
reason | string | yes | |
confirm | literal | yes | One of: true |
Output fields
| Field | Type | Required | Notes |
|---|---|---|---|
ok | literal | yes | One of: true |
stornoEntryId | string | yes | |
sequenceNumber | integer | yes | |
entryDate | string | yes |
till.today
Today's entries + day totals. Read-only query.
Input parameters
Returns object.
Output fields
| Field | Type | Required | Notes |
|---|---|---|---|
entries | array of object | yes | |
entries.id | string | yes | |
entries.sequenceNumber | integer | yes | |
entries.entryDate | string | yes | |
entries.type | enum | yes | One of: income, expense |
entries.category | string · nullable | yes | |
entries.description | string | yes | |
entries.amount | string | yes | Decimal as string — numeric column, not an IEEE-754 double |
entries.reservationId | string · nullable | yes | |
entries.reservationCode | string · nullable | yes | |
entries.guestName | string · nullable | yes | |
entries.createdAt | string | yes | |
entries.createdByUserId | string · nullable | yes | |
entries.stornoOfEntryId | string · nullable | yes | |
entries.storniert | boolean | yes | |
totals | object | yes | |
totals.income | number | yes | |
totals.expense | number | yes | |
totals.net | number | yes | |
count | integer | yes |
till.verifyChain
Recomputes the chain and reports where it breaks. A guard that states its own scope: `checked` tells how many closings were actually recomputed. Otherwise a verification tool that reads nothing would always report success. Read-only query.
Input parameters
Returns object.
Output fields
| Field | Type | Required | Notes |
|---|---|---|---|
ok | boolean | yes | |
checked | integer | yes | |
broken | array of object | yes | |
broken.abschlussDate | string | yes | |
broken.grund | enum | yes | One of: hash_mismatch, chain_mismatch |
broken.erwartet | string | yes | |
broken.gefunden | string | yes |