▦ TableProofTHE DOCUMENT WORKFLOW LAB

Numerical quality control

Validate invoice totals after OCR without hiding exceptions

Use arithmetic and source checks to catch missing lines, decimal mistakes, and duplicated totals in purchase invoice extracts.

Use totals as a check, not a verdict

Invoice arithmetic can help identify conversion problems, but a matching total does not prove that every line is correct. Two errors can offset each other, and a correct amount can sit beside the wrong product. Use reconciliation alongside checks of identifiers, row completeness, and the source document.

This guide concerns data quality after extraction. It does not decide tax treatment, payment approval, or accounting policy. Follow the invoice's displayed structure and your organization's established rules. When the source itself is unclear, record the question rather than changing extracted values merely to make the numbers balance.

Separate raw values from calculations

Keep the printed line amounts, subtotal, adjustments, and final total as extracted fields. Add calculated checks in separate columns or tables. This lets a reviewer distinguish what the document says from what the workbook computes. A correction should remain visible and traceable to the source.

PDF.co documents invoice fields and line items in its parser reference, but the existence of those output fields does not establish that a particular invoice was read correctly. Any extraction route should be checked against the same source-based expectations. Keep invoice-level values from being repeated and accidentally summed once for every line.

Confirm numerical interpretation

Inspect decimal marks, thousands separators, signs, and currency labels before calculating. A visually plausible amount may have been interpreted using the wrong regional convention. Power Query's official documentation explains locale-aware type conversion and numeric types. Use deliberate settings for the source rather than assuming the computer's default matches the supplier.

For every uncertain value, retain the original text and resolve it against the page. Do not silently turn an empty amount into zero. A blank can represent a missing field, a free item, a continuation row, or a recognition failure. Those cases need different treatment and should not be collapsed prematurely.

Reconcile in layers

Start with line-level checks where the source supplies quantities and unit prices. Then compare the sum of printed line amounts with the displayed subtotal. Finally account for separately printed discounts, delivery charges, taxes, and credits when comparing with the final total. Use the source's arithmetic and rounding conventions where they are explicit.

If there is a difference, inspect common failure locations: page boundaries, negative lines, faint decimal marks, and summary sections. Recount items and look for duplicate fragments. Avoid adjusting the largest amount to force a match. The purpose of a failed check is to make an unresolved condition visible.

Record acceptance and exceptions

Maintain a simple status for each document: ready, needs review, or incomplete. Include the difference found, the relevant page, and the correction made. Keep partial extractions separate from accepted records so a missing page cannot disappear into an apparently finished monthly workbook.

Once a reviewer resolves the difference, rerun all checks affected by the correction. Preserve the raw output and the approved version. The resulting record should explain both why the invoice passed and what remained outside the check, such as whether every description was compared character by character.

Sources

Evidence status: methodology. No unverified accuracy, savings or traffic claim is made.