Skip to content
D365 Reference

VendInvoiceJour

transaction

Posted vendor invoice header — one row per posted AP invoice, carrying totals, due date, cash-discount terms, and the ledger voucher

Module: Procurement & SourcingCompany-partitioned (DataAreaId)

Header & line

VendInvoiceJour is the header for its lines in VendInvoiceTrans.

Fields

19 fields · 3 key

KeyFieldEDTDescriptionTypeLengthFlags
KeyInvoiceAccountVendAccountVendor account the invoice is settled against — part of the natural keystring20
KeyInvoiceIdInvoiceIdThe vendor's invoice number — unique only together with the account and invoice datestring20
KeyInvoiceDateInvoice date — the primary analysis date, and part of the natural keydate
OrderAccountVendAccountVendor account the goods were ordered from, when it differs from the invoice accountstring20
PurchIdPurchIdPurchase order the invoice was posted against; empty for non-PO invoicesstring20
InternalInvoiceIdInternal invoice number assigned by the company's number sequencestring20
LedgerVoucherLedger voucher the invoice posted understring20
InvoiceAmountInvoice total in the invoice currencyreal
InvoiceAmountMSTInvoice total restated in the accounting (company) currencyreal
SalesBalanceNet goods value of the invoice lines, before tax and chargesreal
SumTaxTotal sales tax on the invoicereal
CashDiscCash discount amount offered on the invoicereal
CashDiscDateLast date the cash discount can be taken; unset rows carry the 1900-01-01 sentineldate
DueDatePayment due date per the invoice's termsdate
DocumentDateThe vendor's document date; unset rows carry the 1900-01-01 sentineldate
PaymIdPayment identifier used to match the settling paymentstring20
PostingProfileVendor posting profile the invoice posted withstring10
CurrencyCodeInvoice currencystring3
QtyTotal quantity across the invoice linesreal

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.

Query parameters
-- ============================================================
-- 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

  • VendInvoiceJourVendInvoiceTransheader line · 1:N
    ON vendinvoicejour.invoiceid = vendinvoicetrans.invoiceid
  • VendInvoiceJourPurchTableforeign key · N:1
    ON vendinvoicejour.purchid = purchtable.purchid

Data Entities That Expose This Table

The standard VendorInvoiceHeader entity exposes pending invoices (VendInvoiceInfoTable), not this posted journal — land the raw table for posted-invoice analytics.