# Invoicing workflow: end to end

> From the Zendrea manual for AI assistants, generated 2026-10-31 from the knowledge of Zendrea's built-in assistant. All topics: https://www.zendrea.ch/llms.txt; all of them in one file: https://www.zendrea.ch/llms-full.txt. Screen names are quoted in English, account numbers are those of the standard Swiss chart, and nothing here is tax or legal advice.

An outgoing invoice goes through five distinct stages, each with a separate UI control and accounting effect. This model answers the lifecycle questions ("how do I send an invoice?", "why is the pay button greyed out?", "is the invoice already booked?").

1. **Create / save** — the user opens the new-invoice form (Entries panel → Invoices tab → +), fills in client, lines (rate-based via billing items, or flat-amount), VAT, and dates. An invoice can also start from an **accepted quote**: Create invoice on the quote's row opens this same form filled from the quote, and saving marks the quote as invoiced (the topic [quotes](https://www.zendrea.ch/docs/quotes.md)). Saving the form **immediately books the journal entry** in a single step: debit 1100 (A/R) and credit the configured revenue account (default 3400, overridable on the form). If VAT is included, the VAT portion is split off to the output-VAT account — with the "Multiple VAT rates" toggle on, one VAT line per rate (each line credits its own revenue account, and the PDF shows a per-rate VAT breakdown). The invoice is now booked and contributes to the income statement and A/R balance.

   **Invoice number** — there is no numbering-scheme setting. The number field **auto-fills** by continuing the format of the most recent invoice (it sits below the client field and recomputes when the client or issue date changes). Three shapes work automatically: **client-based** (prefix = the leading letters of the client's name — learned per client at whatever length their prior invoices use, e.g. `MPIR-2026-003` or `INSTI-2026-003`; a brand-new client defaults to the first 4 letters), **generic** (a constant prefix, company-wide series, e.g. `INV-2026-003`), and any **custom** format ending in a number. The 4-digit year resets the running number each calendar year; the field is always editable, and typing a new format once makes future invoices continue it. The **copy** button on an invoice row opens a new invoice with the same client, lines, texts and dates, and suggests the next number (the copied number is never kept: numbers are unique per company). The **issue date** defaults into the selected fiscal period — today when that period is the current year, otherwise it repeats the date of the last invoice in the period (an empty period: the end of its first month); it is the booking date and must stay within the viewed period.
2. **Edit / rebook** — opening an existing invoice in edit mode and saving again re-books it: the old journal entry is replaced atomically with a new one reflecting the updated values. Disabled when the fiscal period is closed.
3. **Generate PDF** — a separate step via the PDF button (the icon labelled "PDF" in the invoice row). Opens a dialog where the user can pick the invoice language (en/de/fr/it) and footer text before generating. The PDF includes a **Swiss QR-bill** for scan-to-pay (using the invoice's QR reference). If the company has **no IBAN configured yet** (Settings → Bank accounts), the PDF still generates — the QR slip then carries a **sample IBAN and a SPECIMEN watermark**: fine as a preview, not payable; after adding the real IBAN, generating the PDF again produces the payable version.
4. **Email to client** — sends the generated PDF to the client by email. The email button is **disabled, with the reason in its tooltip, until sending can succeed**: (a) a generated PDF exists, (b) that PDF is not a SPECIMEN (one made with the sample IBAN stays blocked until the IBAN is added under Settings → Bank accounts and the PDF regenerated), (c) email sending is set up under Settings → Email (outgoing mail server, port, login and password, saved), and (d) those saved settings give a valid sender: the login address, or the different sender address set there (the company's accounting contact under Settings → Company is not the sender). The dialog shows the From line read-only; it changes only under Settings → Email. Body and subject are pre-filled from the email template (localised by the invoice language).
5. **Record payment** — when the client pays, the user opens the payment confirmation modal (the down-arrow button, disabled until the invoice is booked and not yet paid). The modal collects payment date, actual amount, payment account (a bank account or creditor), and a difference account for rounding (the topic [payment-differences](https://www.zendrea.ch/docs/payment-differences.md)). On confirm a new journal entry is booked: debit bank / credit 1100 (A/R). The invoice is now paid and the pay button disappears. With bank transactions present (imported from a camt file), incoming bank transfers whose creditor reference matches the invoice's QR reference auto-flag the invoice as matched (green icon on the pay button) — the user still confirms the payment manually.

**Common questions and answers:**
- "Why can't I send an invoice?" — generate the PDF first; if the email button is still disabled, its tooltip names the reason: SPECIMEN PDF (add the IBAN under Settings → Bank accounts, then create the PDF again), email not set up (Settings → Email), or no valid sender address (also Settings → Email: a login that is not an email address needs the "Different sender address").
- "Can the app send invoices automatically when an entry is created?" — no, sending is always a manual step the user triggers.
- "Why is the invoice not in the income statement?" — only booked invoices appear; check that the user saved (which auto-books).
- "How do I cancel/delete an invoice?" — delete the underlying journal entry from the Ledger report. The invoice record itself persists but unlinked from the books. If the invoice was already settled, the confirmation lists the payment and removes both together; if that payment sits in a closed period, reopen the period first.
- "What's a QR-bill?" — Swiss QR-Rechnung, the standard scannable payment slip on every invoice PDF.
