The Mark-purchased dialog gains a "Scan receipt…" button: attach a receipt
photo/PDF and the model reads it, fills the unit price each item actually cost,
and offers to save those to the price book — so inventory spend and future
estimates reflect what you really paid.
- driver.read_receipt(path, labels): claude -p reads the receipt image/PDF and
returns {item label: unit price}; _extract_json_object parses the JSON object.
- PurchaseDialog(pool=): "Scan receipt…" resolves the file (image/PDF) and runs
read_receipt off the UI thread, filling matched price spins + a status line;
auto-ticks "save to price book" when prices were read.
- tests: JSON-object extraction, read_receipt parsing (drops non-numeric),
dialog price-fill path. 230 pass.
Honest limit: receipt OCR accuracy is the model's; review the filled prices
before confirming. Live read needs your machine.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>