---
name: customer-invoice-data-validation
description: Validates customer invoice records against orders, contracts, tax fields, and payment terms, flagging duplicates, arithmetic errors, missing identifiers, and inconsistent customer or currency data. Use for billing QA, invoice audits, accounts-receivable cleanup, pre-send checks, and master-data validation.
license: Apache-2.0
metadata:
  adlass.categories: "finance-accounting/accounts-receivable"
  adlass.industries: ""
  adlass.tags: "invoice-validation,accounts-receivable,billing,data-quality,duplicate-detection,customer-data"
  adlass.adaptation: "mapping"
  adlass.source: "original"
  adlass.version: "1"
---

# Customer invoice data validation

## Purpose

Check whether customer invoices are complete, internally consistent, and supported by the order or contract that generated them. Produce row-level exceptions that billing staff can reproduce without changing the source ledger.

## Scope

Review invoice headers and lines, customer master, sales orders, contracts, tax-code table, currency table, and payment terms. **Excluded:** issuing invoices, changing customer master data, jurisdiction-specific tax advice, and collecting overdue balances.

## Data basis

- Invoice table with invoice_id, customer_id, invoice_date, due_date, currency, subtotal, tax, total, and status.
- Line table with quantity, unit_price, line_amount, tax_code, and order_id.
- Customer, order, contract, tax-code, currency, and payment-term tables.

## Result

Create an invoice validation sheet with one row per invoice or defect, check name, expected value, observed value, severity, and citations, plus a summary of pass and exception counts.

The result must distinguish a failed business rule from a missing source field and an arithmetic mismatch from a duplicate candidate. Keep the invoice identifier on every exception so a billing operator can trace it back to the exact header or line.

## Quality criteria

- Recompute every invoice total from line amounts and tax fields.
- Flag duplicate IDs and same-customer/date/total candidates separately.
- Reconcile customer, order, currency, and payment-term keys.
- Preserve zero, negative, credit-note, void, and missing values.
- Cite invoice, line, order, contract, or master-data rows for each exception.

## Instructions

Treat credit notes and negative lines according to document type. Compare due dates with the supplied payment-term rule. Use exact currency codes and source decimal precision. A missing order is an exception, not proof that an invoice is invalid. Keep void invoices in the population with their status. Report manual overrides when no approval citation exists.

## Adapt before use

- Map invoice, line, customer, order, tax, and currency columns.
- Add approved validation rules and duplicate tolerance.
- Define treatment of credit notes, voids, and manual invoices.
- Add the payment-term reference table.
