How to verify digits in OCR output from an invoice
Compare identifiers as strings, including leading zeros. An amount can look plausible even when an account digit or decimal separator is wrong.
Place the original next to the extracted text. Read a long identifier in groups of four, then compare quantity, unit price and total. Flag an unreadable digit for manual confirmation instead of filling it from context.
Keep identifiers as text when pasting the result into a spreadsheet. Automatic number formatting can remove leading zeros even after OCR recognized them correctly.