# Fixing OCR rounding and total mismatches in e-invoices

- Date: 2026-11-30
- Modified: 2026-11-30
- Reviewed: November 30, 2026
- Reading time: 2 min read

Why EN 16931 enforces strict cent-exact math (BT-106 to BT-115) and how to resolve EXTRACTION_SOURCE_TOTAL_MISMATCH or discount rounding cleanly.

> Reviewed against Directive 2014/55/EU on electronic invoicing, KoSIT XRechnung specification.

Unlike paper PDFs where a 1-cent rounding discrepancy often goes unnoticed, EN 16931 and KoSIT validate every subtotal arithmetic rule down to two decimal places.

Understanding why EXTRACTION_SOURCE_TOTAL_MISMATCH triggers keeps bad math out of downloaded XML.

## Where cent differences usually enter

When total checks flag a mismatch between extracted line sums and the printed grand total, adjust the line unit price, allowance (BG-20), or prepaid amount (BT-113) directly in the review screen so generated totals match the original PDF to the cent.

- Document-level discounts or flat rebates printed only as gross reductions without clarifying net allowance vs VAT impact (BG-20).
- Unit prices rounded to 2 decimals on the PDF while underlying quantity × unit price had 4 decimals.
- Early-payment cash discount (Skonto) printed cleanly vs Belgian VAT-adjusted Skonto rules, which require matching tax allowance and exempt charge entries.
- Partial prepayments deducted at the bottom instead of in BT-113 (Paid amounts).

## FAQ

### Why does the converter block download when totals diverge?

The converter checks the arithmetic and verifies that the XML matches the invoice data you reviewed. Compare the net amount, VAT and amount due with the original PDF during review. An OCR error can leave those amounts mathematically consistent.

## Official references

- [Directive 2014/55/EU on electronic invoicing](https://eur-lex.europa.eu/legal-content/EN/TXT/?uri=CELEX:32014L0055)
- [KoSIT XRechnung specification](https://xeinkauf.de/xrechnung/)
