507eb62216
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.
15 lines
586 B
Markdown
15 lines
586 B
Markdown
# Receipt samples
|
|
|
|
Real receipts, **redacted**, as the OCR read them: never the photo (no binaries in git). For each receipt:
|
|
|
|
```
|
|
fixtures/receipts/<shop>-<n>.ocr.json # the OCR's lines of words: [[{"text","confidence","bbox":{x,y,w,h}}]]
|
|
fixtures/receipts/<shop>-<n>.expected.json # what fiscus_capture::receipt::read must find
|
|
```
|
|
|
|
Black out card numbers, loyalty numbers and anything personal on the photo **before** it is read; keep the rest
|
|
as printed. The photos themselves stay outside git. A rule specific to one shop is written only from its samples
|
|
here.
|
|
|
|
None yet.
|