Ten deterministic anomaly rules, run after extraction. No AI is involved in rule evaluation — the rules are pure TypeScript so every decision is reproducible in QA.
Duplicate invoice number
highThis exact invoice number and vendor has been processed for this client in the last 180 days. Likely a resubmission or a copy of a forward we already have on file.
Suggested action: Do not post. Compare against ledger entry and confirm with client before taking any action.
Possible duplicate payment
mediumA different invoice number from the same vendor for the same amount has been processed within the last 30 days. Could indicate a duplicate payment risk.
Suggested action: Confirm with client this represents a distinct service period before posting. Reference the earlier invoice by ID.
Missing TRN on high-value invoice
highTotal is AED 10,000 or above but the supplier TRN was not parsed from the invoice. A UAE tax invoice for amounts at or above the high-value threshold must show the supplier TRN for input VAT recovery.
Suggested action: Request a compliant tax invoice from the vendor. Do not claim input VAT until received. Hold posting.
VAT rate is not 0%, 5%, EXEMPT, or OUT-OF-SCOPE. In the UAE these are the only valid rates for a standard supply.
Suggested action: Flag to partner. Possible typo on invoice or wrong VAT treatment. Verify with vendor before posting.
VAT arithmetic doesn't add up
mediumSubtotal plus VAT differs from the total by more than AED 0.05. The invoice's own arithmetic is inconsistent.
Suggested action: Recompute line by line. Ask vendor for a corrected invoice if you can't reconcile.
Line items don't sum to subtotal
mediumIndividual line item totals don't equal the stated subtotal (by more than AED 0.05). Common when discounts or adjustments aren't itemised.
Suggested action: Check for undeclared discount, rounding, or missing line item. If adjustment is intentional, ask vendor to itemise.
Invoice date is more than 90 days before today. May affect period allocation or VAT recovery windows.
Suggested action: Check whether this period has been closed. If so, post as prior-period adjustment with partner sign-off.
Invoice date is in the future. Unusual — often a quote or proforma mislabeled as an invoice.
Suggested action: Confirm this is a tax invoice not a proforma. Proformas are not valid for input VAT recovery.
Amount exceeds 3× vendor's 12-month average
lowTotal is more than three times the rolling 12-month average for this vendor-client pair. Could indicate a legitimate one-off or an error.
Suggested action: Verify scope of service. If one-off, note the reason in the supporting memo so the close reviewer doesn't requery it.
Category doesn't match vendor history
mediumSuggested category differs from the vendor's historically dominant category. Could indicate a legitimate change in service provided OR a miscategorised inventory purchase.
Suggested action: If the supplier has genuinely supplied a different service, tag the line appropriately. If this should be inventory (goods-for-resale) not an expense, route to the inventory module.