| Changelog | api: 2 unchanged; capabilities invoice_documents: 2, quotes: 4,
quote_documents: 1, invoice_layout: 2; migration adds the reservation
columns and documents_json to ts_inv_invoices (nothing dropped). Not
additive for issuing: the server renders no document any more (PLAN-FAKTURA
§11.4, §11.5, §12; PLAN-SPESEN §1 «one renderer»; decisions E1–E6 of
2026-10-29). A Mac of invoice_documents: 1 must not issue against this
server; the Mac app checks the capability.
- One renderer: the app's PDF closes the issue (2026-10-29).
POST /invoices/{key}/issue reserves number, issued_on, due_on and
the next chain link (seq, prev_hash) and answers the frozen content
plus the footer sentence chain_line; the invoice is issuing. The app
renders the PDF with number and chain line and sends it raw to
PUT /invoices/{key}/document (application/pdf, ≤ 20 MB, must start
with %PDF- and contain number and chain line). The server files it under
Buchhaltung/<year>/Rechnungen/<date>_<number>_<customer>.pdf, appends the
ledger entry with the reserved link – its payload is the frozen invoice
plus document { kind, name, size, sha256 }, so one hash covers content
and PDF – and sets issued. POST /invoices/{key}/issue/cancel or
15 minutes without a document release number and link again (only while
the number is the counter's last: number_not_last); the record is a
draft again, nothing is in the ledger, numbers stay gapless. While an issue
is pending the team's ledger is closed: every other ledger write,
next-number and writes to that record answer 409 issue_pending.
reverse reserves the same way for the reversal or credit note; the
original changes only at the close.
- Nothing is rendered on the server (2026-10-29).
GET
/invoices/{key}/preview and POST /invoices/{key}/render answer 410
{ error: "gone", code: "gone" }. InvoicePdf, InvoicePage,
InvoiceDocument, EInvoiceXml, the job DocumentRetry and the libraries
tecnickcom/tcpdf, setasign/fpdi, sprain/swiss-qr-bill and
horstoeko/zugferd are removed. document_state, document_error and
document_tries leave issue, fixed and the record; fixed and the
record carry documents[] instead (older invoices read their stored
files there). An invoice issued by ≤ 0.31.0 whose render had failed takes
the app's PDF once with a document ledger entry as in 0.19.0.
- E-invoice XML from the app (2026-10-29). The app embeds ZUGFeRD in the
PDF/A-3 itself and sends the XRechnung file after the close to
PUT /invoices/{key}/document?kind=xml (raw, ≤ 20 MB, well-formed CII or
UBL parsed without network or DTD, must name the number); the server
files it next to the PDF with a ledger document entry (kind:
xrechnung). Tax case and QRR reference are still frozen by the server and
handed to the app (e_invoice: 1 stays).
- Chain verification with files (2026-10-29).
GET
/invoices/chain/verify?files=true re-hashes every filed PDF and XML
named in a payload; a difference is first_break with field:
"document". A PDF in hand is checked by its number, its chain line
(seq, prev_hash) and its SHA-256 against the entry's payload.
- Quotes with texts, attachments and a number on issue (2026-10-29).
The
quote record takes texts { greeting, intro, closing, footer }
(each ≤ 4000 characters) and attachments (≤ 2000, one per line).
POST /quotes/{key}/issue { date?, valid_until?, hours?, amount? } by
Team Admins and the quote's Leads sets number from the team's quote
counter and pattern settings.quote_number (default OF-{year}-{no},
per year), date, status: quoted, and freezes the offered part –
budgets, texts, attachments, customer, sums – as the server field
issued; afterwards number and issued do not change
(quote_issued_frozen), everything else stays writable. Only a draft is
issued (quote_not_draft); nothing goes into the ledger. A draft may be
unnamed (the app makes the draft first and names it later); the issue and
every other status need a name (422 quote_name_required, field: name).
- Three quote documents (2026-10-29).
PUT /quotes/{key}/document
stays for the TimeSister PDF and now needs an issued quote;
POST /quotes/{key}/documents?kind=sent|signed (raw PDF, ≤ 20 MB) files
what went to the customer and the signed copy as
<date>_OF-<n>_<customer>_gesendet.pdf / _unterschrieben.pdf (a second
of a kind is added with _2, never overwritten; at most 10 per quote);
GET /quotes/{key}/documents lists them, GET /quotes/{key}/document?kind=&name=
serves one. The record carries documents[] (server field).
- Invoice layout appendices (2026-10-29).
layout.appendix also takes
aps, companies and rates (PLAN-BACKLOG 28); the client computes
every table it lists (levels, budget, tags, aps, companies,
rates), the server checks the form (lists of at most 500 objects),
stores and freezes the layout and no longer computes tags itself.
- Error codes (2026-10-29). New:
issue_pending, not_issuing,
document_missing, number_not_last, document_mismatch,
document_exists, quote_lead_only, quote_not_draft,
quote_not_issued, quote_issued_frozen, quote_number_taken,
quote_documents_max; gone also names preview and render.
- Rate limits (2026-10-29).
issue, issue/cancel, reverse,
quotes/{key}/issue 60 per minute; the uploads PUT
/invoices/{key}/document, PUT /quotes/{key}/document, POST
/quotes/{key}/documents 30; the reads 120; chain/verify 30. The job
IssueExpiry (every 5 minutes) releases expired reservations.
- From the implementation (2026-10-29). Migration 1023 adds
issue_seq,
issue_prev_hash, issue_expires_at and documents_json to
ts_inv_invoices. The ledger lock sits in LedgerAppender::append, so the
XML upload and POST …/external wait for a pending issue too; the close of
a reversal still appends the original's cancelled entry after the
reversal entry (as 0.18.0); a reservation whose number is no longer the
counter's last is kept by the timeout as by the cancel (number_not_last).
composer.json has no runtime requirement any more; README and
.nextcloudignore follow. New classes IssueLock, IssueRelease,
QuoteIssueService, job IssueExpiry; Json::object().
|