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
Header & line
CustInvoiceJour is the header for its lines in CustInvoiceTrans.
Fields
23 fields · 4 key
| 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 | 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 CustInvoiceJouron 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.
-- ============================================================
-- 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",
c.duedate AS "Payment due date derived from the invoice date and payment terms",
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;6 parameters not filled: <catalog>, <schema>, <company>, <SalesId>, <DATE_FROM>, <DATE_TO>
Relationships
1-hop neighbors — click a table to navigate there. RecId and InventDim edges are highlighted; they’re the joins newcomers most often get wrong.
Join details
ON custinvoicejour.invoiceid = custinvoicetrans.invoiceidON custinvoicejour.invoiceaccount = custtable.accountnumON custinvoicejour.orderaccount = custtable.accountnumON custinvoicejour.deliverypostaladdress = logisticspostaladdress.recidON custinvoicejour.invoicepostaladdress = logisticspostaladdress.recid