maiven gateway · online··
manifest · 1d ago
Sign in
Back to catalog
MAIVENsourceraw_postgres

customer_invoices

source

What we billed customers, and how much is still owed.

Definition

AR invoice headers per customer (reusing the ecommerce customer + order). `amount_received` vs `total_amount` drives the open-AR balance that ties to the AR control account. Statutory record kept 7 years.

19 of 19
Column
Description
Tests · PII
customer_invoice_id
Primary key — BIGSERIAL on the source.
2 tests
invoice_number
Customer-facing invoice number. Unique.
2 tests
legal_entity_id
FK to `legal_entities.legal_entity_id`. Nullable.
customer_id
FK to ecommerce `customers.customer_id`. NOT NULL.
order_id
FK to ecommerce `orders.order_id`. Nullable.
period_id
FK to `fiscal_periods.period_id` (not staged in this slice). NOT NULL.
1 test
journal_entry_id
FK to the GL entry that recorded the invoice. Nullable.
invoice_date
Invoice date.
due_date
Payment due date.
currency
Transaction currency.
fx_rate_id
FK to `fx_rates.fx_rate_id`. Nullable.
subtotal_amount
Pre-tax total in txn currency. NUMERIC(12,2).
tax_amount
Tax total in txn currency. NUMERIC(12,2).
total_amount
Grand total in txn currency. NUMERIC(12,2).
base_total_amount
Grand total in functional USD. NUMERIC(14,2).
amount_received
Cumulative received in txn currency. NUMERIC(12,2).
status
Lifecycle — `draft` / `open` / `partially_paid` / `paid` / `void` / `written_off`.
1 test
created_at
Row insert timestamp in the source DB.
updated_at
Row update timestamp in the source DB.