VendInvoiceTrans
transactionPosted vendor invoice line — one row per invoiced line with quantity, price, and the links back to its purchase order and inventory movements
Header & line
VendInvoiceTrans lines join back to their header VendInvoiceJour — and the DataAreaId — so a line never fans out across companies.
Fields
18 fields · 3 key
| Key | Field | EDT | Description | Type | Length | Flags |
|---|---|---|---|---|---|---|
| Key | InvoiceId | InvoiceId | The invoice this line belongs to | string | 20 | |
| Key | InvoiceDate | Invoice date — part of the join back to the header | date | |||
| Key | LineNum | LineNum | Line number within the invoice | real | ||
| PurchID | PurchId | Purchase order the line was invoiced against — note the field really is spelled PurchID, not PurchId | string | 20 | ||
| OrigPurchId | PurchId | Original purchase order, kept when delivery schedules split the order | string | 20 | ||
| InventTransId | InventTransId | Inventory transaction reference (lot id) linking the line to its inventory movements | string | 40 | ||
| ItemId | ItemId | Item invoiced on the line | string | 20 | ||
| InventDimId | InventDimId | Inventory-dimension combination the line was invoiced against; join to InventDim to resolve site / warehouse | string | 25 | ||
| Name | Line description | string | 60 | |||
| Qty | Quantity invoiced | real | ||||
| PurchUnit | Purchase unit of measure | string | 10 | |||
| PurchPrice | Unit price in the invoice currency | real | ||||
| LineAmount | Net line amount in the invoice currency | real | ||||
| CurrencyCode | Invoice currency | string | 3 | |||
| DiscAmount | Line discount amount | real | ||||
| DiscPercent | Line discount percentage | real | ||||
| InternalInvoiceId | Internal invoice number, shared with the header | string | 20 | |||
| LedgerDimension | RecId | RecId of the ledger account combination the line posted to (DimensionAttributeValueCombination) | int64 |
Field provenance: hand-curated.
Boilerplate SQL
Starting point for reading VendInvoiceTranson 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 : VendInvoiceTrans Posted vendor invoice line — one row per invoiced line with quantity, price, and the links back to its purchase order and inventory movements
-- Purpose: Column-selected read of VendInvoiceTrans — auto-generated from field metadata
-- Grain : One row per company (dataareaid) + InvoiceId + InvoiceDate + 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
v.invoiceid AS "The invoice this line belongs to",
v.invoicedate AS "Invoice date — part of the join back to the header",
v.linenum AS "Line number within the invoice",
v.purchid AS "Purchase order the line was invoiced against — note the field really is spelled PurchID, not PurchId",
v.origpurchid AS "Original purchase order, kept when delivery schedules split the order",
v.inventtransid AS "Inventory transaction reference (lot id) linking the line to its inventory movements",
v.itemid AS "Item invoiced on the line",
v.inventdimid AS "Inventory-dimension combination the line was invoiced against; join to InventDim to resolve site / warehouse",
v.name AS "Line description",
v.qty AS "Quantity invoiced",
v.purchunit AS "Purchase unit of measure",
v.purchprice AS "Unit price in the invoice currency",
v.lineamount AS "Net line amount in the invoice currency",
v.currencycode AS "Invoice currency",
v.discamount AS "Line discount amount",
v.discpercent AS "Line discount percentage",
v.internalinvoiceid AS "Internal invoice number, shared with the header",
v.ledgerdimension AS "RecId of the ledger account combination the line posted to (DimensionAttributeValueCombination)"
FROM <catalog>.<schema>.vendinvoicetrans v
-- Dimension expansion: uncomment to resolve site / warehouse / location / batch
-- LEFT JOIN <catalog>.<schema>.inventdim id ON id.inventdimid = v.inventdimid AND id.dataareaid = v.dataareaid
WHERE
v.dataareaid = '<company>'
ORDER BY v.invoiceid;3 parameters not filled: <catalog>, <schema>, <company>
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 vendinvoicejour.invoiceid = vendinvoicetrans.invoiceidON vendinvoicetrans.itemid = inventtable.itemidON vendinvoicetrans.inventdimid = inventdim.inventdimid