AP_INVOICES_ALL vs AP_INVOICE_LINES_ALL
AP_INVOICES_ALL is the invoice header — one row per invoice. AP_INVOICE_LINES_ALL is the line-level detail — one row per item/expense line on that invoice — joined back by INVOICE_ID.
Key tables
AP_INVOICES_ALL
CuratedInvoice header — supplier, amount, invoice date, payment terms, currency.
Key columns
Common joins
AP_INVOICE_LINES_ALL via INVOICE_ID
Line-level detail for the invoice — one row per item/expense line, tied back to the header by INVOICE_ID.
AP_PAYMENT_SCHEDULES_ALL via INVOICE_ID
The scheduled payment installment(s) for this invoice — due dates and amount remaining.
AP_HOLDS_ALL via INVOICE_ID
Any holds currently blocking this invoice from accounting or payment.
PO_HEADERS_ALL via PO_HEADER_ID (when PO-matched)
The purchase order this invoice was matched to, when it's a PO-matched invoice rather than a standalone one.
AP_INVOICE_LINES_ALL
CuratedInvoice line detail — item/expense lines tied to a header.
Key columns
Common joins
AP_INVOICES_ALL via INVOICE_ID
The invoice header this line belongs to.
AP_INVOICE_DISTRIBUTIONS_ALL via INVOICE_ID + INVOICE_LINE_NUMBER
The GL accounting distribution(s) generated from this line for posting.
Key columns
| Table | Key columns |
|---|---|
| AP_INVOICES_ALL | INVOICE_IDINVOICE_NUMVENDOR_IDINVOICE_AMOUNTINVOICE_DATE |
| AP_INVOICE_LINES_ALL | INVOICE_IDLINE_NUMBERLINE_TYPE_LOOKUP_CODEAMOUNT |
Relationships
Technical flow
Notes
A single invoice header can have many lines — e.g. a services invoice with several line items, or a PO-matched invoice with one line per PO line. Each line is then split further into accounting distributions in AP_INVOICE_DISTRIBUTIONS_ALL.
Related questions
Model-generated, grounded against the curated knowledge layer. Check specifics against your instance.