Every bill is typed in twice.
Supplier bills arrive as emails, scans and phone photos. Someone reads each one and keys the supplier, date and amount into the ledger, then someone else checks it at month end.
For a practice handling a thousand bills a month, at about 2 minutes each, that is around 33 hours of typing before any checking.
The build
Four parts, all running on an ordinary computer with no paid service:
- Reader: RapidOCR finds and reads each line of text on the receipt.
- Extractor: rules that find the supplier (company suffixes such as Sdn Bhd, Ltd, Pty Ltd), the date in any of the common formats, and the total from the TOTAL, ROUNDED, NETT or GRAND TOTAL lines.
- Checks: date found, total found, total taken from a total line, supplier read, and supplier already a contact in Xero.
- Poster: each bill that passes is written in the Xero Accounting API format as an ACCPAY bill with status DRAFT, and as a row of Xero's bill import file. Nothing is approved automatically.
How it works
A bill reaches Xero only if all five checks pass. A new supplier always goes to a person first, so a misread name never creates a contact.
What it means for the finance team
Per 1,000 bills, about 232 arrive as drafts ready to approve and the other 768 arrive pre-filled for review. At 15 seconds to approve a draft and 45 seconds to review a pre-filled bill, typing time falls from about 33 hours to 11.
Most bills went to review for one reason: the supplier was new. The contact list came only from the 200 receipts used to write the rules, so 72% of test suppliers were unknown. In a practice with a settled supplier list, the share posted directly would be higher.
Method, results and failure cases
Data and split
- ICDAR 2019 SROIE task 3: 626 scanned receipts from Malaysian shops and restaurants, each labelled with company, date, address and total. Images and labels from the public SROIE repository.
- Rules were written and tuned only on receipts 000–199 (200). The 426 receipts from 200 onward were run once for this page.
- A field counts as right when the date matches the label exactly, the total matches to the cent, and the supplier matches after removing spaces and punctuation.
- 95% bootstrap intervals over receipts.
Accuracy by field
Running the same extractor on the text supplied with the dataset gives 69% all right, against 56% from this pipeline's own reading: about 13 points are lost to reading the image, and the rest to the rules.
Why bills went to review
| Check | Receipts that failed it |
|---|---|
| date found | 30 |
| total found | 1 |
| total from a TOTAL line | 57 |
| supplier read | 1 |
| supplier already in Xero | 305 |
A receipt can fail more than one check.
Findings
| Receipt | Read as | Printed |
|---|---|---|
| 201 | 10.0 | 10.60 |
| 213 | 11.6 | 10.45 |
| 378 | 0.19 | RM 3.30 |
| 389 | 1.19 | RM 21.00 |
| 390 | 3.25 | RM 57.40 |
The problem in real terms
A bookkeeping practice with three to eight staff looks after 30 to 80 small-business clients on Xero. Bills reach it as forwarded emails, phone photos and Dext or Hubdoc uploads; each is keyed or corrected, coded, and checked again at BAS time, and month and quarter end bunch the work into a few days. Practices that automate capture describe saving between half a minute and two minutes a bill, and a bookkeeper looking after two to three times as many clients.
- Team
- Practice owner, two to six bookkeepers
- Scale
- Several hundred to a few thousand bills a month across clients
- Systems
- Xero, Dext or Hubdoc, a shared inbox, Excel for exceptions
- Constraints
- GST and BAS accuracy; client data under the Privacy Act; nothing approved without a person
Baselines
Tuning set against test set
| Measure | Rules written on (200) | Test (426) |
|---|---|---|
| All three fields right | 49.0% | 55.9% |
| Sent straight to a Xero draft | 53.0% | 23.2% |
| Drafts fully right | 81.1% | 89.9% |
| Supplier already a contact | 72.0% | 28.4% |
| Reading time per receipt, median | 1.1 s | 1.2 s |
The drop in drafts sent straight through, from 53% to 23%, is almost entirely the contact check: the supplier list came only from the 200 tuning receipts. Accuracy of what was sent held up (81% to 90%).
Assumptions
- Two minutes to key a bill, 15 seconds to approve a draft and 45 seconds to review a pre-filled one.
- Malaysian till receipts stand in for Australian supplier bills; tax invoices with ABN, GST and line items need more fields.
- The Xero payloads follow the Accounting API and bill import formats; they were not posted to a live organisation.
What a practice would do next
- Week 1: export each pilot client’s Xero contacts, so known suppliers pass the contact check.
- Weeks 2 to 3: add ABN, GST and account-code fields; test on 300 of the practice’s own past bills.
- Weeks 4 to 8: run for two or three clients alongside Dext or Hubdoc; drafts only, every one approved by a bookkeeper.
- Then: compare keying time and corrections at the next BAS.
Limits
- SROIE receipts are Malaysian till receipts in ringgit. Invoices with line items, purchase order numbers and GST need more fields and a fresh test.
- The Xero files follow the Accounting API and bill import formats but were not posted to a live organisation for this study.
- A larger reader or a layout model would cut misread totals; it would need retesting on the same split.
Run it yourself
# code MIT; SROIE images and labels from the public SROIE repository
git clone https://github.com/manazafzal/case-studies && cd case-studies/invoice-to-xero/code
pip install -r requirements.txt
python bills.py ./sroie/data ./out && python score.py ./outRun 18 Nov 2026, 23:59 AEDT (Melbourne time) · seed 20261118
Sources
- Huang, Z. et al. (2019). ICDAR 2019 competition on scanned receipt OCR and information extraction. ICDAR. Data via github.com/zzzDavid/ICDAR-2019-SROIE.
- RapidOCR (RapidAI), PaddleOCR models in ONNX.
- Xero Accounting API: Invoices (Type ACCPAY) and the bill import template.
