Appearance
Invoice OCR Processing
When a worker uploads an invoice, TT Time Tracker automatically reads the document and fills in the key details. This article explains how that works and what to do when it goes wrong.
What OCR means
OCR stands for Optical Character Recognition — it is the technology that converts a photo of a document into machine-readable text. TT Time Tracker uses Google Cloud Vision to perform OCR on invoice images, then uses OpenAI to extract the structured data (amounts, dates, invoice numbers) from that text.
What happens step by step
Worker uploads — The worker takes a photo or selects an image file and submits it. The file is uploaded to secure storage immediately.
Job queued — The system creates an invoice record with status
nouveauand queues an OCR processing job. You can see the invoice immediately in the admin list.OCR runs — The background worker downloads the file, sends it to Google Cloud Vision, and receives the extracted text. This takes a few seconds.
Data extraction — The raw OCR text is sent to OpenAI, which identifies and extracts structured fields: supplier name, invoice number, date, amount excluding VAT (HT), VAT amount (TVA), and total amount (TTC).
Invoice updated — The extracted data is written to the invoice record. The status changes to
processed. You can now see the populated fields in the invoice detail view.
What the admin sees
When OCR completes, the invoice detail view shows:
- Pre-filled amounts (HT, TVA, TTC)
- Invoice number and date
- Status changed from
nouveautoprocessed
You should always review the extracted data before approving. OCR is accurate but not perfect — handwritten amounts, unusual fonts, or poor image quality can lead to extraction errors.
When OCR fails
If the extraction fails (poor image quality, unsupported format, API error), the invoice status changes to error. This does not delete the invoice — the original file is still stored.
When you see an invoice with status error:
- Open the invoice
- Download or view the original file
- Manually enter the amounts, date, and invoice number
- Proceed with normal review and approval
Image quality tips
Share these with your workers for best results:
- Take photos in good lighting — avoid shadows across the invoice
- Hold the camera straight above the document (not at an angle)
- Make sure all four corners of the invoice are visible
- Use the highest resolution available on the phone camera
- For paper invoices, flatten them on a hard surface before photographing