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.
Contents
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 / row | Field | Original text (as seen on scan) | Extracted text | Discrepancy or uncertainty | Proposed correction | Checked status |
| 1 / header | Odometer | 48,213 mi | 48213 km | Unit wrong | 48,213 mi | Checked |
| 1 / line 3 | Work description | Replace front brake pads and resurface rotors | Replace front brake pads | Wrapped second line dropped | Add 'and resurface rotors' | Checked |
| 2 / line 1 | Parts amount | Smudged; reads 45.00 or 46.00 | 46.00 | Unreadable digit | None yet | Pending |
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
Record and Preserve Details from an ADAS Calibration Report
How to read an ADAS calibration report PDF and build a traceable record of vehicle identifiers, dates, system labels, procedure references and outcomes, with open questions sent to the issuer.
Match and File a Vehicle Fluid Analysis Report
How to read a vehicle fluid analysis lab report PDF for record keeping: match it to the right vehicle, component and sample, record results exactly, and link earlier reports.
Identify and Transcribe Vehicle Emission Information Label Fields
How to find and read a VECI label: what the test group, engine family, evaporative family and other fields mean, and how to transcribe them accurately.
Identify Battery Test Report Values, Ratings and Reported Assessments
How to read a battery test report: tell measured voltage and ratings from the selected rating, keep units and test conditions, and record the tester's verdict.
Record Exact Dashboard Messages for a Service Visit
How to capture the exact wording of a dashboard message, plus the warning lights, sounds and driving conditions around it, so a service visit starts from an accurate record.
Identify Wheel Positions, Columns and Units on an Alignment Report
How to read a wheel alignment printout: find each wheel position, separate before, after and specification columns, and record units and symbols correctly.
Find Candidate Technical Service Bulletins and Record Their Scope
How to look up technical service bulletins through NHTSA by year, make and model, why a VIN search shows recalls instead, and how to record each bulletin's number, date, revision and stated vehicle scope.
Identify Brake Inspection Positions, Measurements and Units
How to read brake inspection sheet labels such as LF, RF, LR and RR, tell brake-lining millimeters apart from tire tread and pressure entries, and transcribe each value with its source sheet.
Record Vehicle Parts Purchases, Identifiers and Installation Evidence
A practical template for recording car parts receipts, part numbers and installation evidence, keeping purchases separate from documented installation.
Read Service Paperwork and Record Completed Work
How to read car service paperwork, extract vehicle, date, mileage, work and charge details, and separate recommended work from completed work before updating your service log.