RECORDS / TERMS / THE NEXT APPOINTMENT

Verify Extracted Service Invoice Fields Against the Original Scan

A practical method for checking OCR-extracted vehicle service invoice fields against the original scan, reconciling line items and totals, and saving only verified data to your vehicle records.

7 min readRepair terminology1 viewsVerify Extracted Service Invoice Fields Against the Original Scan
— · 0 votes
Contents
  1. The short answer
  2. Before you compare: preserve both versions
  3. Which fields to check
  4. Use a comparison worksheet
  5. What OCR errors to look for
  6. Reconcile line items against the printed total
  7. Optional: automate the total check in JavaScript
  8. Transfer only checked fields into your vehicle records

The short answer

Treat the original scan as the authority and the extracted text as a draft. OCR (optical character recognition) is software that turns an image of printed or handwritten text into editable characters. Extraction is the step that sorts those characters into named fields such as date, mileage, labor and parts. To verify the result, compare every extracted field with the matching spot on every page of the scan, row by row. Mark any difference or unreadable character, and correct it only when the scan clearly shows the right value. Copy a field into your vehicle records only after it has been checked. Leave anything uncertain marked as pending rather than guessing.

This works the same way whether the text came from a phone scanning app, a desktop OCR program, or an open-source library you found on GitHub and ran in JavaScript or another language. The tool affects how many errors you will find. It does not change the need to check.

Before you compare: preserve both versions

  • Keep the original scan or photo unchanged, and store any enhanced copy separately.
  • Save an untouched copy of the raw extracted output before you edit anything, so you can tell what the software produced from what you corrected.
  • Count the pages of the original invoice and confirm each one exists in both the scan and the extraction. Multi-page invoices often lose a continuation page, a back side, or a separate parts sheet.
  • Note any page that is cropped, blurred, folded or shadowed. Values in those areas need closer checking.

Which fields to check

The fields that matter most are the ones that identify the vehicle, date the work, and describe what was done and charged. As one concrete reference, Florida's Department of Agriculture and Consumer Services (FDACS) publishes a guide to motor vehicle repair estimate and invoice requirements (revised June 27, 2024). It separates estimate items from invoice items. Its estimate examples include vehicle year, make and model, odometer reading, date and time, and the customer's request. Its invoice list includes the date and odometer reading, the work performed, itemized labor, parts and merchandise with their costs, whether replacement parts are new or used, and guarantee information. Those requirements apply to Florida. Other states set their own rules, and shops format invoices differently, so use the list as a practical checklist rather than a universal standard.

  • Vehicle identifiers: year, make, model, and any VIN or license plate printed on the invoice. Check each character of a VIN individually.
  • Dates: the date in, date out or invoice date, and the label printed next to each one. Confirm the date order, since 04/05 can mean April 5 or May 4.
  • Mileage: the odometer reading and its unit (miles or kilometers). Watch for dropped or extra digits and for mileage-in versus mileage-out labels.
  • Work performed: each description line, including text that wraps onto a second line or continues on the next page.
  • Charges: every labor, parts, merchandise, fee, discount and tax row, plus subtotals and the footer total.
  • Part status and warranty or guarantee notes, if the invoice shows them.

Use a comparison worksheet

A simple worksheet keeps the check systematic and records why you changed each value. Use one row per field or invoice line.

Scan page / rowFieldOriginal text (as seen on scan)Extracted textDiscrepancy or uncertaintyProposed correctionChecked status
1 / headerOdometer48,213 mi48213 kmUnit wrong48,213 miChecked
1 / line 3Work descriptionReplace front brake pads and resurface rotorsReplace front brake padsWrapped second line droppedAdd 'and resurface rotors'Checked
2 / line 1Parts amountSmudged; reads 45.00 or 46.0046.00Unreadable digitNone yetPending

The rows above are an illustrative example, not taken from a real invoice. Record missing rows explicitly (for example, 'present on scan, absent from extraction') and mark unreadable characters as unreadable. Do not leave them blank, because a blank looks the same as a field that was never checked.

What OCR errors to look for

  • Look-alike characters: 0 and O, 1 and l or I, 5 and S, 8 and B, and 2 and Z. These are especially common in VINs, part numbers and amounts.
  • Misplaced or missing decimal points and thousands separators in prices and mileage.
  • Columns that run together, so a quantity, unit price and line total merge into one number or shift into the wrong field.
  • Wrapped descriptions split into separate lines, or a second line dropped entirely.
  • Handwritten notes, stamps and signatures read as text, or skipped.
  • Rows that appear on the scan but are missing from the extraction. These are easy to miss because nothing looks wrong in the extracted text.

Reconcile line items against the printed total

Arithmetic is the quickest way to catch a dropped or misread row. Add the extracted charge rows and compare the sum with the total printed on the scan, including any tax, discount or adjustment the invoice shows separately. Here is a hypothetical example. The scan lists labor 120.00, parts 45.00 and a shop fee 5.00, which comes to 170.00 before any separately shown adjustments. If the extraction contains only labor and parts, the rows add up to 165.00. The 5.00 gap tells you to look for a missing row. When the totals match, that does not prove every row is correct, because two errors can cancel out. You still need to compare each row with the scan.

Optional: automate the total check in JavaScript

If you already process scans with a script, a small check can flag mismatches for manual review. The snippet below is illustrative and is not tied to any particular OCR library. It converts amounts to whole cents to avoid floating-point rounding, reports amounts it cannot parse, and compares the sum with the printed total. It only flags problems. It does not correct anything.

// Illustrative check: compares extracted charge rows with the total printed on the scan.
// It flags mismatches for manual review; it does not correct values.
function toCents(value) {
  const cleaned = String(value).replace(/[$,\s]/g, '');
  if (!/^-?\d+(\.\d{1,2})?$/.test(cleaned)) return null;
  return Math.round(parseFloat(cleaned) * 100);
}

function reconcile(rows, printedTotal) {
  const issues = [];
  let sum = 0;
  rows.forEach((row, i) => {
    const cents = toCents(row.amount);
    if (cents === null) {
      issues.push(`Row ${i + 1} (${row.label}): amount '${row.amount}' is unreadable`);
    } else {
      sum += cents;
    }
  });
  const totalCents = toCents(printedTotal);
  if (totalCents === null) {
    issues.push(`Printed total '${printedTotal}' is unreadable`);
  } else if (sum !== totalCents) {
    issues.push(`Rows sum to ${(sum / 100).toFixed(2)} but the scan shows ${(totalCents / 100).toFixed(2)}`);
  }
  return issues;
}

// Hypothetical example: the 5.00 fee row was dropped during extraction.
const extracted = [
  { label: 'Labor', amount: '120.00' },
  { label: 'Parts', amount: '45.00' }
];
console.log(reconcile(extracted, '170.00'));
// [ 'Rows sum to 165.00 but the scan shows 170.00' ]

Include tax, discounts and fees as their own rows, with discounts entered as negative amounts, so the sum is comparable to the printed total. Automated checks like this catch arithmetic gaps. They cannot confirm that a VIN, date, mileage or description matches the scan, so those fields still need a visual comparison.

Transfer only checked fields into your vehicle records

  • Copy only the fields marked as checked into your maintenance log or vehicle record.
  • Note the scan page each value came from, so you can find the source again later.
  • Keep pending fields visibly marked as pending. Do not fill them with a best guess, especially mileage and dates, because those drive service-interval and due-date tracking.
  • If a value cannot be resolved from the scan, ask the shop for a clearer copy or confirmation, then update the worksheet and the record together.
  • Store the original scan, the raw extraction and the completed worksheet together with the record.

Related articles