CustInvoiceTrans
transactionPosted customer invoice line — one row per invoiced line with item, quantity, price, and amounts; the revenue-by-item grain of order-to-cash analytics
Header & line
CustInvoiceTrans lines join back to their header CustInvoiceJour — and the DataAreaId — so a line never fans out across companies.
Fields
21 fields · 5 key
| Key | Field | EDT | Description | Type | Length | Flags |
|---|---|---|---|---|---|---|
| Key | InvoiceId | InvoiceId | Invoice this line belongs to; joins to CustInvoiceJour together with InvoiceDate, numberSequenceGroup, and SalesId | string | 20 | |
| Key | InvoiceDate | Posting date of the invoice, repeated on the line; part of the composite key and the line-level analysis date | date | |||
| Key | numberSequenceGroup | Number-sequence group of the invoice; part of the composite key (often blank) | string | 10 | ||
| Key | SalesId | SalesId | Sales order the invoiced line came from; part of the composite key | string | 20 | |
| Key | LineNum | LineNum | Line number within the invoice | real | ||
| ItemId | ItemId | Item invoiced on the line | string | 20 | ||
| InventDimId | InventDimId | Inventory-dimension combination the line shipped against; join to InventDim to resolve site / warehouse / batch | string | 25 | ||
| Name | Line description as printed on the invoice | string | 60 | |||
| Qty | Quantity invoiced in the sales unit | real | ||||
| SalesUnit | Sales unit of measure for the invoiced quantity | string | 10 | |||
| SalesPrice | Unit sales price in the transaction currency | real | ||||
| LineAmount | Net line amount in the transaction currency — the revenue measure most analyses sum | real | ||||
| LineAmountMST | Net line amount converted to the company (accounting) currency | real | ||||
| DiscAmount | Line discount amount in the transaction currency | real | ||||
| DiscPercent | Line discount percentage | real | ||||
| CurrencyCode | CurrencyCode | Transaction currency of the line (matches the header) | string | 3 | ||
| InventTransId | InventTransId | Inventory transaction reference linking the invoiced line to its stock movements | string | 40 | ||
| OrigSalesId | SalesId | Original sales order for return/credit lines that reference an earlier order | string | 20 | ||
| TaxGroup | TaxGroup | Sales tax group applied to the line | string | 10 | ||
| TaxItemGroup | Item sales tax group applied to the line | string | 10 | |||
| ExternalItemId | The customer's own item number for the invoiced item, when maintained | string |
Field provenance: hand-curated.
Boilerplate SQL
Starting point for reading CustInvoiceTranson 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 : CustInvoiceTrans Posted customer invoice line — one row per invoiced line with item, quantity, price, and amounts; the revenue-by-item grain of order-to-cash analytics
-- Purpose: Column-selected read of CustInvoiceTrans — auto-generated from field metadata
-- Grain : One row per company (dataareaid) + InvoiceId + InvoiceDate + numberSequenceGroup + SalesId + LineNum
-- 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 "Invoice this line belongs to; joins to CustInvoiceJour together with InvoiceDate, numberSequenceGroup, and SalesId",
c.invoicedate AS "Posting date of the invoice, repeated on the line; part of the composite key and the line-level analysis date",
c.numbersequencegroup AS "Number-sequence group of the invoice; part of the composite key (often blank)",
c.salesid AS "Sales order the invoiced line came from; part of the composite key",
c.linenum AS "Line number within the invoice",
c.itemid AS "Item invoiced on the line",
c.inventdimid AS "Inventory-dimension combination the line shipped against; join to InventDim to resolve site / warehouse / batch",
c.name AS "Line description as printed on the invoice",
c.qty AS "Quantity invoiced in the sales unit",
c.salesunit AS "Sales unit of measure for the invoiced quantity",
c.salesprice AS "Unit sales price in the transaction currency",
c.lineamount AS "Net line amount in the transaction currency — the revenue measure most analyses sum",
c.lineamountmst AS "Net line amount converted to the company (accounting) currency",
c.discamount AS "Line discount amount in the transaction currency",
c.discpercent AS "Line discount percentage",
c.currencycode AS "Transaction currency of the line (matches the header)",
c.inventtransid AS "Inventory transaction reference linking the invoiced line to its stock movements",
c.origsalesid AS "Original sales order for return/credit lines that reference an earlier order",
c.taxgroup AS "Sales tax group applied to the line",
c.taxitemgroup AS "Item sales tax group applied to the line",
c.externalitemid AS "The customer's own item number for the invoiced item, when maintained"
FROM <catalog>.<schema>.custinvoicetrans c
-- Dimension expansion: uncomment to resolve site / warehouse / location / batch
-- LEFT JOIN <catalog>.<schema>.inventdim id ON id.inventdimid = c.inventdimid AND id.dataareaid = c.dataareaid
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 custinvoicetrans.itemid = inventtable.itemidON custinvoicetrans.inventdimid = inventdim.inventdimid