How to validate invoice totals after PDF extraction
3 November 2026
Recalculate each line before accepting a total copied from an invoice. Then check the invoice identifier, supplier and currency in a separate step. If the currency is wrong, all the amounts can still add up. A spreadsheet should let the reviewer record “arithmetic passed” and “currency unresolved” against the same document.
Rebuild one invoice from its lines
The fictional invoice SYN-INV-001 is denominated in USD. It contains two units of a service at 50.00 and one unit of another service at 25.00. The reference record gives a subtotal of 125.00, tax of 12.50 and total of 137.50. The tax amount was chosen for this exercise. Ground truth
| Check | Calculation | What the reference shows |
|---|---|---|
| First line | 2 × 50.00 | 100.00 |
| Second line | 1 × 25.00 | 25.00 |
| Subtotal | 100.00 + 25.00 | 125.00 |
| Total | 125.00 + 12.50 | 137.50 |
Suppose the extracted record says 147.50. Its two line amounts still reconcile to 125.00, but 147.50 exceeds the independently calculated total by 10.00. That was the deliberate wrong-total case in the test data. Record the printed total, extracted total and recalculated total separately. If the printed invoice itself shows an inconsistency, preserve it and ask the authorised owner for clarification. Do not silently rewrite the source to balance the sheet. Injected validation cases
Use a second result for identity and currency
Another deliberately altered record leaves the amounts and invoice identifier unchanged but replaces the currency with UNLISTED. The 137.50 calculation still works. It says nothing about which currency the amount represents. Preserve the original currency text and ask the reviewer to locate it on the source, together with the supplier and document identifiers. Leave the currency unresolved until there is supporting evidence. Injected validation cases
For a routine review, give each invoice one row containing its file version and page, invoice ID, supplier ID, original currency, discrepancy amount, arithmetic result, identity result and evidence owner. Route a discrepancy to the person who can resolve that specific field. Changing an exchange rate cannot fix a misidentified currency, just as changing a total cannot establish the supplier.
The local extraction test used three synthetic documents and a method tailored to their labels. It checked 21 header fields and 20 line cells, and detected five deliberately seeded faults. It did not authenticate suppliers or approve a payment. A supervisor can use the completed sheet to decide whether the extracted invoice is ready for the next review, with the underlying PDF still available for inspection. Test results
Part of the Five checks for data extracted from a PDF invoice guide.
Validate invoice quantities and unit prices
This section answers a narrower question than the rest of this page, and it does not mint a new URL. The original contribution preserved here is a synthetic invoice corpus with field-level ground truth and reconciliation.
Check quantity and unit price against a total you already know. Do not let the extracted total bless the parts.
| Field | Value you wrote into the sample | Value extracted | Match |
|---|---|---|---|
| Quantity | Your fixture | Output | Not run |
| Unit price | Your fixture | Output | Not run |
| Line total you calculate from those two | Your arithmetic | Output | Not run |
Labelled synthetic case. Put a small quantity and a unit amount you choose into a sample invoice. The arithmetic is yours. An official tax rate is not required for this check, and none is supplied here.
Leave official unit prices and tax rates blank until a dated official extract, or an invoice addressed to your organisation, is in hand. Adobe’s numeric regional prices for South Africa, the UAE, Nigeria and Kenya, and Smallpdf’s numeric paid-plan prices, had not been extracted on 13 November 2026. A previously cited 7.5% Nigerian VAT figure is not treated as current. “Lower cost” is an aspiration, not a demonstrated saving.
The rest of this page remains the parent decision. Use the table for the question in the heading, and leave a cell blank rather than filling it from memory.
Published by Arke Technologies (Pty) Ltd, Johannesburg. Drafted with NotebookLM. Source checks and editing by Kairos (Codex).
