# Receipts: file attachment and OCR

> 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.

The app supports **attaching a receipt file** (PDF or image) to expense, asset-purchase, manual (Others) and credit-note (supplier & client) entries — receipts are *not* supported on salary, invoice, or payment entries. On the expense/asset lists the attachment is visible per row as an icon (hovering shows a tooltip with extracted metadata if available); the Others panel list has no receipt column — open the entry to view its attachment.

**Attaching:** the booking form (expense, asset purchase, manual entry, credit note) has an "Attach receipt" file picker. The selected file is copied into the app's receipts directory and linked to the journal entry on save. After save, the entry's row shows the receipt icon.

**Receipt OCR / metadata extraction (digital PDFs only, today):** when a PDF receipt is attached, the app runs a background extractor that pulls structured data from the PDF text — currently the Swiss QR-bill payload, when present. Fields extracted:
- Creditor name (payee)
- Creditor IBAN
- QR reference
- Total amount (in cents)

Status is one of "extracted" (something usable was found), "failed" (PDF couldn't be parsed or no QR-bill found), or empty (extraction not yet attempted). Results stream into the UI via a background channel — no user action needed.

**AI auto-fill from receipt (web, opt-in, premium).** The expense form has an **"Auto-fill from receipt"** button that appears once a receipt — image *or* PDF — is attached. It reads the receipt with Swiss-hosted AI and prefills the form (vendor → description, date, amount, currency) plus the **VAT treatment**, read from the receipt: **VAT inclusive** when the printed VAT belongs to one of the company's own active **input VAT codes**, and it selects that code for the booking date (the printed rate matched exactly; when no rate is printed, or it was misread, the rate the receipt's VAT amount and total imply). **No VAT** when the receipt shows no VAT, or VAT at a rate none of the company's codes has: that is foreign VAT (e.g. German 19% on a hotel bill from Germany), which can never be deducted as input tax, so the receipt books at its full amount. A foreign supplier registered for VAT in the company's own country prints the domestic rate and is deducted normally. It never picks **Acquisition tax**: reverse charge is never printed on an invoice, so for a bill from a foreign supplier that charges no VAT of the company's country (a service bought abroad) the user selects that treatment manually. The **date** is the receipt's own date, read day first (23.08.26 = 23 August 2026); when it falls outside the fiscal year selected at the top, the form keeps it in red and the note below the form says which year it belongs to (booking date rule, the topic [document-numbers](https://www.zendrea.ch/docs/document-numbers.md)). A **foreign-currency** total is kept in its own currency when the company can book that currency, otherwise converted to the base currency at the receipt's date and shown in a note below the form with the exchange rate used. The currency is the one printed with the amounts (its code, or a symbol such as "$" = USD), never guessed from the vendor's or customer's country. If a foreign receipt fills in without that note, its total went in unconverted as base currency: convert it at the rate of the receipt's date and correct the amount. When AI runs it also **suggests an expense category** — it classifies the receipt into one of the user's own expense presets (built-in + custom), which sets the preset and its expense account; the user can still change it. When **no preset fits** (e.g. a one-off hardware purchase), it instead suggests the best-matching **expense account** directly and the form shows **"[Custom]"** (no preset), so the booking still lands on a sensible account for the user to confirm. A bill from a social insurer (AHV office, pension fund, accident or daily sickness insurer such as Suva) gets no category and no account on purpose: the salaries already book those contributions and premiums, so the bill is paid from the **Social Insurance** report (its AHV / FAK, UVG, KTG or BVG tab), not booked as an expense. It is **opt-in** (the user clicks it; it does not run automatically), **never books on its own** (prefills editable fields only), and on **both the expense and asset-purchase forms** (on the asset form it classifies into an asset *type* — which sets the asset + amortization accounts and a default useful life — or, when none fits, suggests an asset account, amortization account and useful life directly in "Other" mode). How it reads depends on the file: a **photo or image** → AI vision model; a **PDF with a text layer** → its embedded text, where a Swiss QR-bill's financial fields (amount, IBAN, reference) are read for free by the deterministic parser, while its expense **category and a short description** come from one small classification-only AI call, and other invoices go to a text model for everything; a **scanned PDF with no text layer** → its first page is rasterized to an image and read by the vision model, like a photo. Every AI call **counts against the monthly AI quota** (only the QR-bill's deterministic financials are free), and at 0% quota the auto-fill is blocked with a "quota reached" message. The automatic on-import extractor is separate (deterministic; QR-bill / text PDFs only): a photo yields nothing automatically unless the user clicks the button. Because that extractor does not read images at all, it no longer reports a photo as unreadable: the receipt's hover tooltip says **"not read yet"** and points at the auto-fill button, rather than claiming an extraction failed. Whatever auto-fill reads IS kept on the receipt, so a scanned photo's vendor, amount and reference show in that tooltip afterwards and feed the Bank Account report's reference matching, with no second AI call. "No metadata extracted" now means only what it says: a file this extractor does read, a PDF, that turned out to contain nothing usable.

**Common questions:**
- "Can I attach receipts to invoices?" → No. Receipts attach to expense and asset purchase entries only.
- "Can I take a photo of a receipt (or attach a PDF invoice) and have the app fill the form?" → Yes, on the web app: attach the photo or PDF in the expense form and click "Auto-fill from receipt" — AI reads it, fills the fields, and suggests an expense category (which sets the account) for you to check before saving. It uses your monthly AI quota; a QR-bill's amounts are read for free, with just a small call to suggest the category and a short description.
- "Where are the receipts stored?" → Inside the app's data directory, linked by file path on the journal entry. They are included in exports.
