[fiscus-capture] Receipts: the fields every Czech receipt shows, read from an OCR's words; payment.receipt_attached
fiscus_capture::receipt::read takes the OCR's lines (words with boxes and confidence in thousandths) and finds the total, date and time, IČO (check digit), DIČ and the shop's name by their labels, never a shop's layout; unsure words mark their field, the shop is always to check; bounded, control characters dropped, a proptest. The phone's post takes a receipt (source receipt, ico, dic). The ledger gains payment.receipt_attached (the payment keeps its merchant and key), known_shop and receipt_match (exactly one candidate or none). docs/07_receipts.md; fixtures/receipts/ waits for redacted samples. v0.9.0.
This commit is contained in:
@@ -50,6 +50,9 @@ with exactly `amount`, `merchant`, `card`, `time`, plus an optional `currency`.
|
||||
- `merchant`: 1–200 characters, no control characters. `card`: 0–60 characters.
|
||||
- `time`: ISO 8601 with an offset (`2026-11-03T14:05:00+01:00`); the payment's date is the local date in it.
|
||||
- At most 4 KiB.
|
||||
- **A receipt read on the Android phone** (docs/07_receipts.md) comes the same way, with `"source": "receipt"`, the
|
||||
shop's name as `merchant`, an empty `card`, and optionally `ico` (8 digits with its check digit) and `dic` (`CZ`
|
||||
and 8–10 digits). An `ico` or `dic` without `"source": "receipt"`, or another `source`, is an error.
|
||||
*(assumption)* Apple's exact `amount` text is checked against the first real post.
|
||||
|
||||
**Android bank notifications.** `recognise(app, title, text, selected)`:
|
||||
|
||||
Reference in New Issue
Block a user