[
  {
    "source_file": "inputs/invoice-01.png",
    "supplier": "Cedar Print",
    "invoice_number": "000742",
    "invoice_date": "2026-10-18",
    "po": "PO-1042",
    "currency": "CAD",
    "line_items": [
      {
        "description": "Workshop handbooks",
        "qty": 80,
        "unit_price": 7.5,
        "amount": 600.0,
        "recalculated_amount": 600.0,
        "po_qty": 80,
        "po_unit_price": 7.5,
        "po_match": true
      }
    ],
    "subtotal": 600.0,
    "tax": 72.0,
    "shipping": 20.0,
    "total": 692.0,
    "bank_account_suffix": "0412",
    "recalculation": {
      "subtotal": 600.0,
      "tax_at_12pct_of_merchandise": 72.0,
      "shipping": 20.0,
      "total": 692.0,
      "matches_invoice": true
    },
    "po_bank_suffix": "0412",
    "uncertain_fields": [],
    "exceptions": [],
    "notes": [
      "Shipping 20.00 CAD cannot be checked against the PO: inputs/purchase-orders.csv has no shipping column. Not a mismatch; approver may wish to confirm shipping was agreed."
    ],
    "payment_status": "No exceptions found; eligible for normal approval. No payment made."
  },
  {
    "source_file": "inputs/invoice-02.png",
    "supplier": "Harbour AV",
    "invoice_number": "001083",
    "invoice_date": "2026-10-19",
    "po": "PO-1043",
    "currency": "CAD",
    "line_items": [
      {
        "description": "Microphone rental",
        "qty": 3,
        "unit_price": 85.0,
        "amount": 255.0,
        "recalculated_amount": 255.0,
        "po_qty": 2,
        "po_unit_price": 85.0,
        "po_match": false
      },
      {
        "description": "Stand rental",
        "qty": 2,
        "unit_price": 15.0,
        "amount": 30.0,
        "recalculated_amount": 30.0,
        "po_qty": 2,
        "po_unit_price": 15.0,
        "po_match": true
      }
    ],
    "subtotal": 285.0,
    "tax": 34.2,
    "shipping": 0.0,
    "total": 329.2,
    "bank_account_suffix": "8891",
    "recalculation": {
      "subtotal": 285.0,
      "tax_at_12pct_of_merchandise": 34.2,
      "shipping": 0.0,
      "total": 319.2,
      "matches_invoice": false
    },
    "po_bank_suffix": "8821",
    "uncertain_fields": [],
    "exceptions": [
      {
        "code": "BANK_SUFFIX_MISMATCH",
        "severity": "high",
        "field": "bank_account_suffix",
        "invoice_value": "8891",
        "po_value": "8821",
        "detail": "Invoice bank account ending 8891 differs from the 8821 on file for PO-1043. Invoice footer states 'Banking details updated on this invoice.' An unverified bank-detail change announced on the invoice itself is a payment-fraud risk indicator.",
        "action_required": "Hold payment. Have an authorised person verify the change through contact details already on file (not details taken from this invoice) before any payment to either account."
      },
      {
        "code": "QTY_EXCEEDS_PO",
        "severity": "high",
        "field": "line_items[0].qty",
        "invoice_value": 3,
        "po_value": 2,
        "detail": "Microphone rental billed at qty 3; PO-1043 authorises qty 2 at 85.00. Unit price matches. Excess is 1 unit = 85.00 CAD merchandise + 10.20 CAD tax = 95.20 CAD. PO-consistent amounts would be subtotal 200.00, tax 24.00, total 224.00.",
        "action_required": "Confirm quantity actually received/used and whether a PO amendment exists before approving any amount above the PO."
      },
      {
        "code": "TOTAL_ARITHMETIC_ERROR",
        "severity": "high",
        "field": "total",
        "invoice_value": 329.2,
        "recalculated_value": 319.2,
        "detail": "Stated total due 329.20 does not equal its own components: subtotal 285.00 + tax 34.20 + shipping 0.00 = 319.20. Total is overstated by 10.00 CAD. Line amounts, subtotal and tax are each arithmetically correct as printed.",
        "action_required": "Do not pay the stated total. A corrected invoice is needed; the 'total' field here records the figure as printed, not a payable amount."
      }
    ],
    "notes": [
      "Stated total 329.20 exceeds the PO-consistent total 224.00 by 105.20 CAD (95.20 from the extra microphone incl. tax + 10.00 addition error)."
    ],
    "payment_status": "HOLD - do not pay until all three exceptions are resolved. No payment made and supplier not contacted."
  }
]
