AI invoice processing: synthetic rule reference
Run: python3 check.py
Run: python3 invoice_reference.py
No external dependencies or calls. No PDFs are included. No accounting action or payment.
This deliberately narrow example assumes positive invoices, line quantity times price, explicit decimal strings, no line-level discounts, matching PO currency and the shown gross convention. One-cent arithmetic tolerance and exact unit-price matching are example choices, not financial policy.
Supplier status, evidence, existing-file and duplicate flags are asserted fixture inputs, not independently verified by this code. File replay assumes a confirmed stored receipt. Concurrency, authentication, destination writes and recovery are outside this reference. Adapt and evaluate before any real use.
Original AGI reference material for internal evaluation and adaptation. No warranty of production fitness.
