VendInvoiceJour
transactionPosted vendor invoice header — one row per posted AP invoice, carrying totals, due date, cash-discount terms, and the ledger voucher
Header & line
VendInvoiceJour is the header for its lines in VendInvoiceTrans.
Fields
19 fields · 3 key
| Key | Field | EDT | Description | Type | Length | Flags |
|---|---|---|---|---|---|---|
| Key | InvoiceAccount | VendAccount | Vendor account the invoice is settled against — part of the natural key | string | 20 | |
| Key | InvoiceId | InvoiceId | The vendor's invoice number — unique only together with the account and invoice date | string | 20 | |
| Key | InvoiceDate | Invoice date — the primary analysis date, and part of the natural key | date | |||
| OrderAccount | VendAccount | Vendor account the goods were ordered from, when it differs from the invoice account | string | 20 | ||
| PurchId | PurchId | Purchase order the invoice was posted against; empty for non-PO invoices | string | 20 | ||
| InternalInvoiceId | Internal invoice number assigned by the company's number sequence | string | 20 | |||
| LedgerVoucher | Ledger voucher the invoice posted under | string | 20 | |||
| InvoiceAmount | Invoice total in the invoice currency | real | ||||
| InvoiceAmountMST | Invoice total restated in the accounting (company) currency | real | ||||
| SalesBalance | Net goods value of the invoice lines, before tax and charges | real | ||||
| SumTax | Total sales tax on the invoice | real | ||||
| CashDisc | Cash discount amount offered on the invoice | real | ||||
| CashDiscDate | Last date the cash discount can be taken; unset rows carry the 1900-01-01 sentinel | date | ||||
| DueDate | Payment due date per the invoice's terms | date | ||||
| DocumentDate | The vendor's document date; unset rows carry the 1900-01-01 sentinel | date | ||||
| PaymId | Payment identifier used to match the settling payment | string | 20 | |||
| PostingProfile | Vendor posting profile the invoice posted with | string | 10 | |||
| CurrencyCode | Invoice currency | string | 3 | |||
| Qty | Total quantity across the invoice lines | real |
Field provenance: hand-curated.
Boilerplate SQL
Starting point for reading VendInvoiceJouron 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 : VendInvoiceJour Posted vendor invoice header — one row per posted AP invoice, carrying totals, due date, cash-discount terms, and the ledger voucher
-- Purpose: Column-selected read of VendInvoiceJour — auto-generated from field metadata
-- Grain : One row per company (dataareaid) + InvoiceAccount + InvoiceId + InvoiceDate
-- 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.invoiceaccount AS "Vendor account the invoice is settled against — part of the natural key",
v.invoiceid AS "The vendor's invoice number — unique only together with the account and invoice date",
v.invoicedate AS "Invoice date — the primary analysis date, and part of the natural key",
v.orderaccount AS "Vendor account the goods were ordered from, when it differs from the invoice account",
v.purchid AS "Purchase order the invoice was posted against; empty for non-PO invoices",
v.internalinvoiceid AS "Internal invoice number assigned by the company's number sequence",
v.ledgervoucher AS "Ledger voucher the invoice posted under",
v.invoiceamount AS "Invoice total in the invoice currency",
v.invoiceamountmst AS "Invoice total restated in the accounting (company) currency",
v.salesbalance AS "Net goods value of the invoice lines, before tax and charges",
v.sumtax AS "Total sales tax on the invoice",
v.cashdisc AS "Cash discount amount offered on the invoice",
CASE WHEN CAST(v.cashdiscdate AS DATE) = DATE '1900-01-01' THEN NULL ELSE CAST(v.cashdiscdate AS DATE) END AS "Last date the cash discount can be taken; unset rows carry the 1900-01-01 sentinel", -- 1900-01-01 sentinel → NULL
v.duedate AS "Payment due date per the invoice's terms",
CASE WHEN CAST(v.documentdate AS DATE) = DATE '1900-01-01' THEN NULL ELSE CAST(v.documentdate AS DATE) END AS "The vendor's document date; unset rows carry the 1900-01-01 sentinel", -- 1900-01-01 sentinel → NULL
v.paymid AS "Payment identifier used to match the settling payment",
v.postingprofile AS "Vendor posting profile the invoice posted with",
v.currencycode AS "Invoice currency",
v.qty AS "Total quantity across the invoice lines"
FROM <catalog>.<schema>.vendinvoicejour v
WHERE
v.dataareaid = '<company>'
-- AND v.invoiceaccount = '<VendAccount>'
-- AND v.invoicedate >= '<DATE_FROM>' -- yyyy-MM-dd (UTC)
-- AND v.invoicedate <= '<DATE_TO>' -- yyyy-MM-dd (UTC)
ORDER BY v.invoiceaccount;6 parameters not filled: <catalog>, <schema>, <company>, <VendAccount>, <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 vendinvoicejour.invoiceid = vendinvoicetrans.invoiceidON vendinvoicejour.purchid = purchtable.purchid