CustInvoiceJour
transactionPosted customer invoice header — one row per invoice issued from a sales order (or free-text posting), with totals, currency, due date, and the ledger voucher it posted under
What the badges mean
- main
- Table group: how F&O categorizes the table's role — main entity, group/header, transaction, worksheet header, worksheet line, reference, parameter, or framework.
- Shared across companies
- The table carries no
DataAreaId— rows aren’t partitioned per company, so a query never needs (and can’t use) a company filter here (see the quirks guide). - Date-effective
- The table carries a
ValidFrom/ValidToeffectivity window — a join without a date filter multiplies every key by its history (see the quirks guide).
Header & line
CustInvoiceJour is the header for its lines in CustInvoiceTrans.
Fields
23 fields · 4 key
23 fields.
| Key | Field | EDT | Description | Type | Length | Flags |
|---|---|---|---|---|---|---|
| Key | InvoiceId | InvoiceId | The invoice number; unique only together with InvoiceDate, numberSequenceGroup, and SalesId | string | 20 | |
| Key | InvoiceDate | Date the invoice was posted — the primary analysis date for revenue reporting | date | |||
| Key | numberSequenceGroup | Number-sequence group the invoice number was drawn from; part of the composite key (often blank) | string | 10 | ||
| Key | SalesId | SalesId | Sales order the invoice was posted from; part of the composite key | string | 20 | |
| InvoiceAccount | CustAccount | Customer account the invoice is billed to | string | 20 | ||
| OrderAccount | CustAccount | Customer account that placed the underlying order (can differ from the invoice account) | string | 20 | ||
| CustGroup | CustGroupId | Customer group of the invoiced customer at posting time | string | 10 | ||
| InvoiceAmount | Total invoice amount in the transaction currency | real | ||||
| InvoiceAmountMST | Total invoice amount converted to the company (accounting) currency | real | ||||
| SalesBalance | Net line amount of the invoice before tax and charges, in the transaction currency | real | ||||
| SumTax | Total sales tax on the invoice in the transaction currency | real | ||||
| SumLineDisc | Total line discount across the invoice in the transaction currency | real | ||||
| CurrencyCode | CurrencyCode | Transaction currency of the invoice | string | 3 | ||
| ExchRate | Exchange rate used to convert the invoice to the accounting currency | real | ||||
| DueDate | Payment due date derived from the invoice date and payment terms; unset rows carry the 1900-01-01 sentinel | date | ||||
| Qty | Total quantity invoiced across the lines | real | ||||
| Weight | Total weight of the invoiced goods | real | ||||
| LedgerVoucher | Ledger voucher the invoice posted under — the bridge to general-ledger transactions | string | 20 | |||
| SalesType | Type of the originating sales order (journal, subscription, sales order, returned order…) | enum | ||||
| DlvMode | Mode of delivery on the invoice | string | 10 | |||
| DlvTerm | Terms of delivery on the invoice | string | 10 | |||
| DeliveryPostalAddress | RecId | RecId of the ship-to address in LogisticsPostalAddress | int64 | |||
| InvoicePostalAddress | RecId | RecId of the bill-to address in LogisticsPostalAddress | int64 |
Field provenance: hand-curated.
Boilerplate SQL
Starting point for reading CustInvoiceJour on Databricks — enums are decoded, 1900-01-01 dates are wrapped to NULL, and the DataAreaId anchor is in place. Set your Unity Catalog location, company, and filter values below; they’re substituted into the SQL and the copy button.
6 parameters not filled: <catalog>, <schema>, <company>, <SalesId>, <DATE_FROM>, <DATE_TO>
-- ============================================================
-- Table : CustInvoiceJour Posted customer invoice header — one row per invoice issued from a sales order (or free-text posting), with totals, currency, due date, and the ledger voucher it posted under
-- Purpose: Column-selected read of CustInvoiceJour — auto-generated from field metadata
-- Grain : One row per company (dataareaid) + InvoiceId + InvoiceDate + numberSequenceGroup + SalesId
-- Notes : Auto-generated skeleton for Synapse Link / Fabric Link-landed F&O data (lowercase column names). Enums decoded inline where verified; datetimes stored in UTC; 1900-01-01 dates are sentinels mapped to NULL. System/audit columns omitted — see the quirks guide.
-- ============================================================
SELECT
c.invoiceid AS "The invoice number; unique only together with InvoiceDate, numberSequenceGroup, and SalesId",
c.invoicedate AS "Date the invoice was posted — the primary analysis date for revenue reporting",
c.numbersequencegroup AS "Number-sequence group the invoice number was drawn from; part of the composite key (often blank)",
c.salesid AS "Sales order the invoice was posted from; part of the composite key",
c.invoiceaccount AS "Customer account the invoice is billed to",
c.orderaccount AS "Customer account that placed the underlying order (can differ from the invoice account)",
c.custgroup AS "Customer group of the invoiced customer at posting time",
c.invoiceamount AS "Total invoice amount in the transaction currency",
c.invoiceamountmst AS "Total invoice amount converted to the company (accounting) currency",
c.salesbalance AS "Net line amount of the invoice before tax and charges, in the transaction currency",
c.sumtax AS "Total sales tax on the invoice in the transaction currency",
c.sumlinedisc AS "Total line discount across the invoice in the transaction currency",
c.currencycode AS "Transaction currency of the invoice",
c.exchrate AS "Exchange rate used to convert the invoice to the accounting currency",
CASE WHEN CAST(c.duedate AS DATE) = DATE '1900-01-01' THEN NULL ELSE CAST(c.duedate AS DATE) END AS "Payment due date derived from the invoice date and payment terms; unset rows carry the 1900-01-01 sentinel", -- 1900-01-01 sentinel → NULL
c.qty AS "Total quantity invoiced across the lines",
c.weight AS "Total weight of the invoiced goods",
c.ledgervoucher AS "Ledger voucher the invoice posted under — the bridge to general-ledger transactions",
c.salestype AS "Type of the originating sales order (journal, subscription, sales order, returned order…)", -- enum: decode c.salestype via GlobalOptionsetMetadata join — see quirks guide #enums
c.dlvmode AS "Mode of delivery on the invoice",
c.dlvterm AS "Terms of delivery on the invoice",
c.deliverypostaladdress AS "RecId of the ship-to address in LogisticsPostalAddress",
c.invoicepostaladdress AS "RecId of the bill-to address in LogisticsPostalAddress"
FROM <catalog>.<schema>.custinvoicejour c
-- Resolve LogisticsPostalAddress (via DeliveryPostalAddress): uncomment to join on its RecId surrogate key
-- LEFT JOIN <catalog>.<schema>.logisticspostaladdress deliverypostaladdress ON deliverypostaladdress.recid = c.deliverypostaladdress
-- Resolve LogisticsPostalAddress (via InvoicePostalAddress): uncomment to join on its RecId surrogate key
-- LEFT JOIN <catalog>.<schema>.logisticspostaladdress invoicepostaladdress ON invoicepostaladdress.recid = c.invoicepostaladdress
WHERE
c.dataareaid = '<company>'
-- AND c.salesid = '<SalesId>'
-- AND c.invoicedate >= '<DATE_FROM>' -- yyyy-MM-dd (UTC)
-- AND c.invoicedate <= '<DATE_TO>' -- yyyy-MM-dd (UTC)
ORDER BY c.invoiceid;Verified September 2026
Relationships
Diagram of 1-hop neighbors — join details below. RecId and InventDim edges are highlighted; they’re the joins newcomers most often get wrong.
Join details
ON custinvoicejour.invoiceid = custinvoicetrans.invoiceid AND custinvoicejour.dataareaid = custinvoicetrans.dataareaidON custinvoicejour.invoiceaccount = custtable.accountnum AND custinvoicejour.dataareaid = custtable.dataareaidON custinvoicejour.orderaccount = custtable.accountnum AND custinvoicejour.dataareaid = custtable.dataareaidON custinvoicejour.deliverypostaladdress = logisticspostaladdress.recidON custinvoicejour.invoicepostaladdress = logisticspostaladdress.recidON custtrans.invoice = custinvoicejour.invoiceid AND custtrans.dataareaid = custinvoicejour.dataareaid
Data Entities That Expose This Table
More Sales & Marketing tables
- CustInvoiceTransPosted customer invoice line — one row per invoiced line with item, quantity, price, and amounts; the revenue-by-item grain of order-to-cash analytics
- CustPackingSlipJourPosted packing-slip header — one row per shipment document posted against a sales order, with delivery date, ship-to address reference, and carrier details
- CustTableCustomer master — one row per customer account, with the RecId links to its global-address-book party and its default financial dimensions
- SalesLineSales order line — one row per order line; the core sell-side transaction, joined to its header by SalesId
- SalesTableSales order header — one row per order carrying customer, status, site, and requested dates
- CustGroupCustomer group master — one row per posting/reporting group of customers, carrying default payment terms and the settle-period used to derive due dates