AI invoice-check practice kit
All names, identifiers, documents and transactions are fictional.

Start with the five source text files and prompt.txt in an AI tool approved for
your documents. Compare its proposed extraction with the originals before
accepting any value. This kit makes no network calls and has no AI SDK dependency.

reviewed-input.json is a manually authored, normalized answer key, not a model
response. The box conversion, document identity, PO-line matches, source locators,
invoice history and receipt coverage have been explicitly set for this exercise.
An assistant cannot establish complete business records from a few uploads.

Requirements: Python 3.10+ and standard library only.
From this folder:
  python check_examples.py
  python reconcile.py

The latter writes results.json and review.csv beside the script. Expected:
  BR-10: ordered 200, billed 180, recorded receipts 160, quantity difference 20.
         INV-B L1 is $0.15/piece above PO price on 80 pieces = $12.00 difference.
  PAD-4: 80 billed and 80 received; no difference in fields checked.
  SEAL-1: 24 billed; receiving evidence unavailable. No zero receipt invented.
  INV-A copy: repeat import reported; counted once. Unique goods invoices $558.00.
The $12.00 price difference and the 20-piece quantity difference overlap. Do not
add them to invent a single recommended deduction. No payment amount is approved.

Scope: one supplier, one PO, USD, complete invoice history through 2026-10-06.
Every invoice in the exercise is unpaid; neither script nor worksheet checks a
real payment ledger. Goods-only amounts; tax, freight and other charges are
explicitly zero. No discounts, returns, credits, substitutions or amendments.
Receipt coverage is complete for L1/L2; unknown for L3. Confirmed quantities are
accepted quantities, not dispatched quantities. The exercise uses exact decimal
arithmetic and flags any price difference; no business tolerance is recommended.

This is a cumulative review, not an allocation of receipts to individual invoice
lines. A matching cumulative total alone does not make an invoice payable.
Duplicate matching uses supplier + exact invoice ID and reviewed economic fields;
it does not perform OCR ID normalization, fuzzy deduplication or bank reconciliation.
Conflicting versions, unmatched lines, unknown units, a different supplier/PO or
currency, incomplete invoice history and inconsistent arithmetic stop calculation.
Negative quantities/credits are unsupported. Do not remove such documents merely
to make the script run. Resolve them or extend a separately reviewed workflow.

Sources are locators, not a parser: the script does not read or verify the source
text against JSON. Do not feed raw model output directly into the calculator.
Local tests verify synthetic arithmetic and rejection paths, not OCR extraction,
model performance, fraud detection, financial compliance or time saved.

Files include the authored documents, prompt, reviewed input, local calculator,
tests and generated sample results/CSV. No private company documents are included.
