Codeunit 816 "Purch. Post Invoice"
Base Application · Microsoft.Purchases.Posting
Across versions
- BC23present
- BC241 procedures added, 1 procedures removed
- BC253 procedures added
- BC262 procedures added, 1 procedures changed
- BC275 procedures added
- BC281 procedures added, 1 events added
- BC292 procedures added
- BC301 procedures changed
Neighbourhood 8 connected objects and pages
Base Application · Microsoft.Purchases.Posting · BC23-30 · source at 4e6a307c · facts from BC29
Properties
| Property | Value |
|---|---|
| Permissions | TableData “Invoice Posting Buffer” = rimd |
Events published
OnSplitFAOnBeforeRunGenJnlPostLine(var GenJournalLine: Record "Gen. Journal Line"; var GenJournalLine2: Record "Gen. Journal Line"; var TotalGenJournalLine: Record "Gen. Journal Line"; IterationCounter: Integer; SplitNo: Integer)+ BC28 (integration)
Procedures
Check(TableID: Integer)SetPreviewMode(NewPreviewMode: Boolean)SetSuppressCommit(NewSuppressCommit: Boolean)SetHideProgressWindow(NewHideProgressWindow: Boolean)SetParameters(NewInvoicePostingParameters: Record "Invoice Posting Parameters")SetTotalLines(TotalDocumentLine: Variant; TotalDocumentLineLCY: Variant)ClearBuffers()PrepareLine(DocumentHeaderVar: Variant; DocumentLineVar: Variant; DocumentLineACYVar: Variant)PrepareInvoicePostingBuffer(var PurchLine: Record "Purchase Line"; var InvoicePostingBuffer: Record "Invoice Posting Buffer")+ BC25 Δ BC26SetSalesTax(var PurchaseLine: Record "Purchase Line"; var InvoicePostingBuffer: Record "Invoice Posting Buffer")+ BC25PostLines(DocumentHeaderVar: Variant; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line"; var Window: Dialog; var TotalAmount: Decimal)PrepareJobLine(DocumentHeaderVar: Variant; DocumentLineVar: Variant; DocumentLineACYVar: Variant)CheckCreditLine(PurchHeaderVar: Variant; PurchLineVar: Variant)PostLedgerEntry(PurchHeaderVar: Variant; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line")PostBalancingEntry(PurchHeaderVar: Variant; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line")CalcDeferralAmounts(PurchHeaderVar: Variant; PurchLineVar: Variant; OriginalDeferralAmount: Decimal)CreatePostedDeferralSchedule(PurchLineVar: Variant; NewDocumentType: Integer; NewDocumentNo: Code[20]; NewLineNo: Integer; PostingDate: Date)CreateTempFA(GenJnlLine: Record "Gen. Journal Line"; SplitNo: Integer; var TempFA: Record "Fixed Asset" temporary): Boolean+ BC27
Plus 28 local procedures.
Calls
From the extracted call graph of BC29 (graphify-al on the snapshot checkout): calls whose target is known from a declared type or an Object::"Name" argument. Interface dispatch and calls through events are not counted, so the list is not complete.
- Codeunit 826 “Purch. Post Invoice Events” (63 calls:
CalcDeferralAmounts → RunOnBeforeTempDeferralLineInsert,CalcDeferralAmounts → RunOnCalcDeferralAmountsOnBeforeTempDeferralHeaderInsert,CalcInvoiceDiscountPosting → RunOnAfterCalcInvoiceDiscountPosting, …) - Codeunit 6200 “Non-Deductible VAT” (7 calls:
CalculateVATAmounts → Update,InitTotalAmounts → Init,PrepareInvoicePostingBuffer → ClearNonDeductibleVAT, …) - Codeunit 1001 “Job Post-Line” (4 calls:
CheckCreditLine → CheckItemQuantityPurchCredit,PostDeferredJobLines → PostJobPurchaseLines,PostJobLine → PostJobPurchaseLines, …) - Codeunit 1720 “Deferral Utilities” (4 calls:
CalcDeferralAmounts → FilterDeferralLines,CreatePostedDeferralSchedule → FilterDeferralLines,PrepareDeferralLine → FilterDeferralLines, …) - Codeunit 12 “Gen. Jnl.-Post Line” (3 calls:
PostBalancingEntry → RunWithCheck,PostLedgerEntry → RunWithCheck,RunGenJnlPostLine → RunWithCheck) - Codeunit 444 “Purchase-Post Prepayments” (2 calls:
PrepareLine → GetCorrBalAccNo,PrepareLine → GetInvRoundingAccNo) - Codeunit 398 “Sales Tax Calculate” (1 call:
CalculateVATAmounts → CalculateTax) - Codeunit 408 “DimensionManagement” (1 call:
PrepareInvoicePostingBuffer → UpdateGlobalDimFromDimSetID)
Implements
Recent changes
- 2026-11-24 #13613 [main] Incorrect Additional Currency Base and Additional Currency Amount calculation in VAT/GST Entries when Line Discount is applied on Sales Invoice in the Australian version (main, BC30, fix)
- 2026-10-16 #12816 [29.x]- Project Planning Lines are created in reverse order when purchase line descriptions are copied (releases/29.x, BC29, fix)
- 2026-10-09 #12003 [Main]- Project Planning Lines are created in reverse order when purchase line descriptions are copied (main, BC30, fix)
- 2026-09-09 #11160 Ruleset hardening: promote three mechanical rules to Error (main, BC30, refactor)
- 2026-07-31 #8959 Deliverable 638799: Spend Requests in Base App (main, BC30, feature)
Countries that replace it
Possibly related
No source states these links: they share an object, a model read them, or a person found the same subject.
- Check amounts on purchase invoices and credit memos — possibly related: Purchase invoice posting validates invoice amounts before posting, matching check amounts on invoices documentation. (model-linked)
Source: AL metadata extracted from the code (names, ids, signatures, properties); no code bodies (D10).
Ask your agent
Procedure bodies are not stored here (D10). The call sections above are our own, per object, from the BC29 call graph. For a procedure body or the calls of one procedure, ask bc-code-atlas (external, by Stefan Maron, MIT; default corpus w1-28), which the bc-observatory plugin connects: bcatlas_resolve_node(object_type: "codeunit", object_name: "Purch. Post Invoice"), then bcatlas_get_procedure_body or bcatlas_get_neighbors on the returned id.