## The invoice

The invoice line items, totals, tax and bank details.

## The purchase order

What was ordered, in what quantity, at what price.

## The contract

Rates, caps, retainage and payment terms.

## The vendor record

Bank details on file, tier, and how long they have billed us.

## Prior invoices

What this vendor has already billed and been paid.

## Correspondence

Emails about this invoice, from either side.

## Delivery evidence

Receiving notes, timesheets and shipment records.

## Approvals

Who signed off, and anything they said while doing it.

## Output (any that apply)

- PAY SCHEDULE SHORT
- PAY ROUTE FOR APPROVAL
- HOLD FOR DOCUMENTS
- REQUEST CORRECTED INVOICE
- DISPUTE LINES
- FRAUD REVIEW
- DUPLICATE

## Invoice Processing

### Accuracy Against Cost and Time

| Type          | Accuracy (%) | Cost per Case (USD) | Time (s) |
|---------------|--------------|----------------------|----------|
| haiku 4.5    | 42.9         | $0.0558              | 30.8     |
| opus 5       | 78.4         | $0.4856              | 92.1     |
| sonnet 5     | 72.9         | $0.3616              | 241.3    |
| DS v4 flash  | 69.8         | $0.0133              | 84.1     |

## The workflow

1. **Read the documents**
   Seven rounds of questions, one subject at a time. Sums, dates, account numbers and statuses are computed in code rather than asked.

2. **Reasons to stop**
   Four conditions end the review immediately: a fraud pattern, an invoice already paid, the wrong vendor or company, or a document that is not an invoice.

3. **Holds, disputes and corrections**
   Three rule lists run side by side. Every rule that applies adds its actions: hold the invoice, dispute particular lines, or request a corrected copy.

4. **Releasing the payment**
   A sequence of yes-or-no checks decides how the payment leaves: sent for approval, held for a signature, paid in the undisputed part, scheduled, or paid.

**Cases:**
- Prorated equipment support retainer invoice: Opus differs from the other two.
- CPA invoice from lookalike domain: Sol differs from the other two.
- Vulnerability scan invoice courier fee: TypeSafe differs from the other two.
- Photography invoice with cryptic codes: All three miss the reference.
- Tax compliance invoice wrong entity: All three agree.

## Models

| Model        | Description |
|--------------|-------------|
| Opus        | Invoice details check. |
| Sol         | Invoice comparison. |
| TypeSafe    | Document review. |

### Line outcomes:
- Bad lines are carved out of the payment.
- A duplicate charge, or work not performed.

### Invoice corrections:
- Amounts do not sum, or tax is charged twice.
- An unexplained or duplicated adjustment.

### Any holds or under review?
- Yes, release nothing; the actions stand.
- No lines carved out?

Action: Stop, Review, Back to the vendor, Pay.
