> ## Documentation Index
> Fetch the complete documentation index at: https://sims-bae272dd.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Scan a purchase invoice

> Photograph a supplier invoice and confirm what was read before anything is applied.

**Transactions → Purchase Invoices → Scan Invoice** reads a supplier invoice or
pick sheet and fills the line items in for you.

The rule that governs the whole screen: **nothing is applied until you confirm
it.**

## Scan one

**1. Upload the document**

Drag and drop, or choose a file. PNG, JPG, WEBP and PDF are supported, and
every page of a PDF is read.

A clear, flat, well-lit photo of the whole page reads far better than a
close-up of part of it.

**2. Start OCR Processing**

Reading takes a few moments. Larger and messier documents take longer.

**3. Review what was read**

The scanned page sits beside the extracted lines so you can compare them
directly. Every line carries a confidence badge — see below.

**4. Fix the lines that need it**

Edit any value. Map a line to the right product, link the supplier, or
create a product or category that does not exist yet.

**5. Check the totals**

The review screen shows Lines, Invoice discount, Deposits, Fees and the
**Printed total** so you can check the arithmetic against the paper.

**6. Apply**

A draft invoice is created for final confirmation.

## What the colours mean

Each line and the document as a whole get a **green**, **yellow** or **red**
badge with a percentage. Hover it to see the reason in plain English — for
example "line total $42.10 does not match qty × unit cost ($40.10)" or "UPC
fails check-digit validation".

> [card] Green
>
> Reads cleanly and the arithmetic agrees. Skim it.

> [card] Yellow
>
> Something did not line up. Check this line against the paper.

> [card] Red
>
> Do not accept without reading it. Usually a misread number or a line whose
> total does not match its quantity times its cost.

The score is not the model's opinion of itself — it is calculated from whether
quantity × unit cost equals the line total, whether the barcode passes its check
digit, how strong the product match is, and whether the lines plus tax, deposits
and fees add up to the printed total.

## Matching, not guessing

Lines are matched to products by exact **UPC** first, then by name. A line that
matches nothing is never dropped silently — it is offered as **New Product**.
The same applies to suppliers and categories.

When a scan would change something you already have — a cost, a barcode, a pack
size — you are shown the difference rather than having it overwritten.

For a new product, the selling price is prefilled from cost plus the margin on
the category you pick, with the price floor shown if it applies. If the category
has no margin, you are told so and asked to set a price.

> [!NOTE]
>
> Every line you map teaches PRODUCT\_NAME that supplier's item number. After a
> few invoices from the same distributor most lines match themselves, and review
> becomes a glance.

## Purchase or return

The scan reads whether the document is a purchase or a credit memo, and you
confirm it. It decides which way stock will move, so check it.

## When a scan fails

A failed scan is not just an error message — it is kept in the failed-imports
list with what the reader saw, so you can look at it rather than guess. Re-scan
with a better photo, or enter the invoice by hand.

> [!WARNING]
>
> Scans count against your plan's monthly document allowance, and only a few can
> run at once. Re-scanning the identical file does not cost another scan — the
> earlier result is reused.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.