---
id: object/codeunit/444
type: object
title: Codeunit 444 "Purchase-Post Prepayments"
summary: Codeunit 444 "Purchase-Post Prepayments" in Base Application (Microsoft.Purchases.Posting). 20 public procedures, 64 events. Present since at least BC23, still in BC30, changed in BC24, BC26, BC28-30.
tier: official
language: en
tags:
  - codeunit
  - base application
versions:
  introduced: null
  last_changed: "30"
  deprecated: null
review:
  state: derived
  by: null
  at: null
  flags: []
generated:
  at: "2026-10-11T00:31:51.816Z"
  pipeline: 0.2.0
  prompts: {}
  input_hash: 4f1ddbdf6b419c2c6ac6c237001694245efafdb29bf30878895bfb1999bb3795
evidence:
  - kind: code
    url: https://github.com/microsoft/BCApps/blob/ea08af5ef2d6a9b5c5af4a029288abbe2c883220/src/Layers/W1/BaseApp/Purchases/Posting/PurchasePostPrepayments.Codeunit.al
    title: src/Layers/W1/BaseApp/Purchases/Posting/PurchasePostPrepayments.Codeunit.al (releases/29.x)
    date: null
    commit: ea08af5ef2d6a9b5c5af4a029288abbe2c883220
    t: null
    quote: null
links:
  learn: []
  objects: []
  features: []
  topics: []
  localizations:
    - localization/au
    - localization/ca
    - localization/it
    - localization/mx
    - localization/nz
    - localization/us
  videos: []
  posts: []
  guidelines: []
  changes:
    - change/bcapps/10898
    - change/bcapps/10172
    - change/bcapps/10124
object_type: codeunit
object_id: 444
name: Purchase-Post Prepayments
namespace: Microsoft.Purchases.Posting
app: Base Application
extends: null
first_version: "23"
last_version: "30"
present_in:
  - "23"
  - "24"
  - "25"
  - "26"
  - "27"
  - "28"
  - "29"
  - "30"
changed_in:
  - "24"
  - "26"
  - "28"
  - "29"
  - "30"
source_major: "29"
obsolete: null
countries:
  - au
  - ca
  - it
  - mx
  - nz
  - us
ms_search_form_ids: []
counts:
  fields: 0
  procedures: 125
  events: 64
  subscribers: 0
relations:
  out: 1
  referenced_by: 0
  pages: 0
  extended_by: 0
  event_subscribers: 8
  calls: 13
  called_by: 5
  implements: 0
---

# Codeunit 444 "Purchase-Post Prepayments"

> Codeunit 444 "Purchase-Post Prepayments" in Base Application (Microsoft.Purchases.Posting). 20 public procedures, 64 events. Present since at least BC23, still in BC30, changed in BC24, BC26, BC28-30.

Base Application · Microsoft.Purchases.Posting · BC23-30 · [source at ea08af5e](https://github.com/microsoft/BCApps/blob/ea08af5ef2d6a9b5c5af4a029288abbe2c883220/src/Layers/W1/BaseApp/Purchases/Posting/PurchasePostPrepayments.Codeunit.al) · facts from BC29

## Properties

| Property | Value |
|---|---|
| TableNo | Purchase Header |
| Permissions | TableData "Purchase Line" = rimd, TableData "G/L Register" = rimd, TableData "Vendor Posting Group" = rimd, TableData "Inventory Posting Group" = rimd, TableData "Purch. Inv. Header" = rimd, TableData "Purch. Inv. Line" = rimd, TableData "Purch. Cr. Memo Hdr." = rimd, TableData "Purch. Cr. Memo Line... |

## Events published

- `OnAfterCreateDimensionsProcedure(var PurchaseLine: Record "Purchase Line"; DefaultDimSource: List of [Dictionary of [Integer, Code[20]]])` (integration)
- `OnAfterApplyFilter(var PurchaseLine: Record "Purchase Line"; PurchaseHeader: Record "Purchase Header"; DocumentType: Option)` (integration)
- `OnAfterCalcVATAmountLines(PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; var VATAmountLine: Record "VAT Amount Line"; DocumentType: Option Invoice,"Credit Memo",Statistic)` (integration)
- `OnAfterCheckPrepmtDoc(PurchHeader: Record "Purchase Header"; DocumentType: Option Invoice,"Credit Memo"; var ErrorMessageMgt: Codeunit "Error Message Management")` (integration)
  - subscribers: [Codeunit 5579 "Digital Voucher Impl."](../codeunit/5579.md) OnAfterCheckPurchPrepmtDoc
- `OnAfterCreateLinesOnBeforeGLPosting(var PurchaseHeader: Record "Purchase Header"; PurchInvHeader: Record "Purch. Inv. Header"; PurchCrMemoHeader: Record "Purch. Cr. Memo Hdr."; var TempPrepmtInvLineBuffer: Record "Prepayment Inv. Line Buffer" temporary; DocumentType: Option; var LastLineNo: Integer)` (integration)
  - subscribers: [Codeunit 6784 "Wthldg Tax Purch. Subscribers"](../codeunit/6784.md) VendorPrepaymentInvoiceWithholdingTax
- `OnAfterFillInvLineBuffer(var PrepmtInvLineBuf: Record "Prepayment Inv. Line Buffer"; PurchLine: Record "Purchase Line"; CommitIsSuppressed: Boolean; PurchaseHeader: Record "Purchase Header")` (integration)
- `OnAfterInsertInvoiceRounding(PurchaseHeader: Record "Purchase Header"; var PrepmtInvLineBuffer: Record "Prepayment Inv. Line Buffer"; var TotalPrepmtInvLineBuf: Record "Prepayment Inv. Line Buffer"; var PrevLineNo: Integer)` (integration)
- `OnAfterPostPrepayments(var PurchHeader: Record "Purchase Header"; DocumentType: Option Invoice,"Credit Memo"; CommitIsSuppressed: Boolean; var PurchInvHeader: Record "Purch. Inv. Header"; var PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr.")` (integration)
  - subscribers: [Codeunit 5579 "Digital Voucher Impl."](../codeunit/5579.md) CheckPurchVoucherOnAfterPostPrepayments
- `OnAfterPostBalancingEntry(var GenJnlLine: Record "Gen. Journal Line"; VendLedgEntry: Record "Vendor Ledger Entry"; TotalPrepmtInvLineBuffer: Record "Prepayment Inv. Line Buffer"; TotalPrepmtInvLineBufferLCY: Record "Prepayment Inv. Line Buffer"; CommitIsSupressed: Boolean)` (integration)
- `OnAfterPostVendorEntry(var GenJnlLine: Record "Gen. Journal Line"; TotalPrepmtInvLineBuffer: Record "Prepayment Inv. Line Buffer"; TotalPrepmtInvLineBufferLCY: Record "Prepayment Inv. Line Buffer"; CommitIsSupressed: Boolean)` (integration)
- `OnAfterPostPrepmtInvLineBuffer(var GenJnlLine: Record "Gen. Journal Line"; PrepmtInvLineBuffer: Record "Prepayment Inv. Line Buffer"; CommitIsSuppressed: Boolean; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line")` (integration)
- `OnAfterPurchInvHeaderInsert(var PurchInvHeader: Record "Purch. Inv. Header"; PurchHeader: Record "Purchase Header"; CommitIsSupressed: Boolean)` (integration)
- `OnAfterPurchInvLineInsert(var PurchInvLine: Record "Purch. Inv. Line"; PurchInvHeader: Record "Purch. Inv. Header"; PrepmtInvLineBuffer: Record "Prepayment Inv. Line Buffer"; CommitIsSupressed: Boolean)` (integration)
- `OnAfterPurchCrMemoHeaderInsert(var PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr."; PurchHeader: Record "Purchase Header"; CommitIsSupressed: Boolean)` (integration)
- `OnAfterPurchCrMemoLineInsert(var PurchCrMemoLine: Record "Purch. Cr. Memo Line"; PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr."; PrepmtInvLineBuffer: Record "Prepayment Inv. Line Buffer"; CommitIsSupressed: Boolean)` (integration)
- `OnAfterRoundAmounts(PurchaseHeader: Record "Purchase Header"; var PrepmtInvLineBuffer: Record "Prepayment Inv. Line Buffer"; var TotalPrepmtInvLineBuf: Record "Prepayment Inv. Line Buffer"; var TotalPrepmtInvLineBufLCY: Record "Prepayment Inv. Line Buffer")` (integration)
- `OnAfterUpdatePostedPurchDocument(DocumentType: Option Invoice,"Credit Memo"; DocumentNo: Code[20]; CommitIsSuppressed: Boolean)` (integration)
- `OnAfterUpdateVATOnLines(PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; VATAmountLine: Record "VAT Amount Line"; DocumentType: Option Invoice,"Credit Memo",Statistic)` (integration)
- `OnBeforeCheckPrepmtDoc(PurchHeader: Record "Purchase Header"; DocumentType: Option Invoice,"Credit Memo")` (integration)
- `OnBeforeInvoice(var PurchaseHeader: Record "Purchase Header"; var Handled: Boolean)` (integration)
- `OnBeforeCreditMemo(var PurchaseHeader: Record "Purchase Header"; var Handled: Boolean)` (integration)
- `OnBeforeCreateLinesFromBuffer(var PurchHeader: Record "Purchase Header"; var TempGlobalPrepmtInvLineBuf: Record "Prepayment Inv. Line Buffer" temporary; var LineCount: Integer; var Window: Dialog; var PurchInvHeader: Record "Purch. Inv. Header"; var PurchCrMemoHeader: Record "Purch. Cr. Memo Hdr."; var PostedDocTabNo: Integer; var IsHandled: Boolean; DocumentType: Option; var LastLineNo: Integer)` (integration)
- `OnBeforePostPrepayments(var PurchHeader: Record "Purchase Header"; DocumentType: Option Invoice,"Credit Memo"; CommitIsSuppressed: Boolean)` (integration)
- `OnBeforePostVendorEntryProcedure(var PurchHeader: Record "Purchase Header"; TotalPrepmtInvLineBuffer: Record "Prepayment Inv. Line Buffer" temporary; TotalPrepmtInvLineBufferLCY: Record "Prepayment Inv. Line Buffer"; DocumentType: Option Invoice,"Credit Memo"; PostingDescription: Text[100]; DocType: Enum "Gen. Journal Document Type"; DocNo: Code[20]; ExtDocNo: Text[35]; SrcCode: Code[10]; PostingNoSeriesCode: Code[20]; CalcPmtDisc: Boolean; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line"; var IsHandled: Boolean)` (integration)
- `OnBeforePurchaseAssertPrepmtAmountNotMoreThanDocAmount(var VendLedgEntry: Record "Vendor Ledger Entry"; PurchHeader: Record "Purchase Header"; PurchLine: Record "Purchase Line"; var IsHandled: Boolean)` (integration)
- `OnBeforePurchInvHeaderInsert(var PurchInvHeader: Record "Purch. Inv. Header"; PurchHeader: Record "Purchase Header"; CommitIsSupressed: Boolean)` (integration)
- `OnBeforePurchInvLineInsert(var PurchInvLine: Record "Purch. Inv. Line"; PurchInvHeader: Record "Purch. Inv. Header"; PrepmtInvLineBuffer: Record "Prepayment Inv. Line Buffer"; CommitIsSupressed: Boolean)` (integration)
- `OnBeforePurchCrMemoHeaderInsert(var PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr."; PurchHeader: Record "Purchase Header"; CommitIsSupressed: Boolean)` (integration)
- `OnBeforePurchCrMemoLineInsert(var PurchCrMemoLine: Record "Purch. Cr. Memo Line"; PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr."; PrepmtInvLineBuffer: Record "Prepayment Inv. Line Buffer"; CommitIsSupressed: Boolean)` (integration)
- `OnBeforePostBalancingEntry(var GenJnlLine: Record "Gen. Journal Line"; VendLedgEntry: Record "Vendor Ledger Entry"; TotalPrepmtInvLineBuffer: Record "Prepayment Inv. Line Buffer"; TotalPrepmtInvLineBufferLCY: Record "Prepayment Inv. Line Buffer"; CommitIsSupressed: Boolean)` (integration)
  - subscribers: [Codeunit 6784 "Wthldg Tax Purch. Subscribers"](../codeunit/6784.md) OnBeforePostBalancingEntry
- `OnBeforePostVendorEntry(var GenJnlLine: Record "Gen. Journal Line"; TotalPrepmtInvLineBuffer: Record "Prepayment Inv. Line Buffer"; TotalPrepmtInvLineBufferLCY: Record "Prepayment Inv. Line Buffer"; CommitIsSupressed: Boolean; PurchaseHeader: Record "Purchase Header"; DocumentType: Option)` (integration)
  - subscribers: [Codeunit 6784 "Wthldg Tax Purch. Subscribers"](../codeunit/6784.md) OnBeforePostVendorEntry
- `OnBeforePostPrepmtInvLineBuffer(var GenJnlLine: Record "Gen. Journal Line"; PrepmtInvLineBuffer: Record "Prepayment Inv. Line Buffer"; CommitIsSupressed: Boolean)` (integration)
  - subscribers: [Codeunit 6784 "Wthldg Tax Purch. Subscribers"](../codeunit/6784.md) PostPrepmtInvLineBuffer
- `OnBeforeRunGenJnlPostLine(var GenJnlLine: Record "Gen. Journal Line")` (integration)
- `OnBeforeSetStatusPendingPrepayment(var PurchaseHeader: Record "Purchase Header"; var IsHandled: Boolean)` (integration)
- `OnBeforeUpdateDocNos(var PurchaseHeader: Record "Purchase Header"; DocumentType: Option Invoice,"Credit Memo"; var DocNo: Code[20]; var NoSeriesCode: Code[20]; var ModifyHeader: Boolean; var PreviewMode: Boolean; var IsHandled: Boolean)` (integration)
- `OnBeforeUpdatePostedPurchaseDocument(var VendorLedgerEntry: Record "Vendor Ledger Entry"; var PurchInvHeader: Record "Purch. Inv. Header"; var PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr."; DocumentType: Option Invoice,"Credit Memo"; var IsHandled: Boolean; DocumentNo: Code[20])` (integration)
- `OnCodeOnBeforePostBalancingEntry(var PurchaseHeader: Record "Purchase Header"; var TempPrepaymentInvLineBuffer: Record "Prepayment Inv. Line Buffer" temporary)` (integration)
- `OnCodeOnBeforePostVendorEntry(var PurchaseHeader: Record "Purchase Header"; var TempPrepaymentInvLineBuffer: Record "Prepayment Inv. Line Buffer" temporary)` (integration)
- `OnPostVendorEntryOnAfterInitNewLine(var GenJnlLine: Record "Gen. Journal Line"; PurchHeader: Record "Purchase Header")` (integration)
- `OnRoundAmountsOnBeforeIncrAmoutns(PurchaseHeader: Record "Purchase Header"; var PrepmtInvLineBuf: Record "Prepayment Inv. Line Buffer"; var TotalPrepmtInvLineBuf: Record "Prepayment Inv. Line Buffer"; var TotalPrepmtInvLineBufLCY: Record "Prepayment Inv. Line Buffer")` (integration)
- `OnUpdatePurchaseDocumentOnBeforeFindSetCrMemoPurchLine(PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line")` (integration)
- `OnUpdatePurchaseDocumentOnBeforeModifyCrMemoPurchLine(var PurchaseLine: Record "Purchase Line")` (integration)
- `OnUpdatePurchaseDocumentOnBeforeModifyInvoicePurchLine(var PurchaseLine: Record "Purchase Line")` (integration)
- `OnUpdateVATOnLinesOnAfterGetRemainder(var VATAmountLineRemainder: Record "VAT Amount Line"; var RemainderExists: Boolean)` (integration)
- `OnUpdateVATOnLinesOnAfterVATAmountLineGet(var VATAmountLine: Record "VAT Amount Line")` (integration)
- `OnUpdateVATOnLinesOnBeforePurchLineModify(PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; var TempVATAmountLineRemainder: Record "VAT Amount Line"; NewAmount: Decimal; NewAmountIncludingVAT: Decimal; NewVATBaseAmount: Decimal)` (integration)
- `OnCodeOnBeforeWindowOpen(var PurchaseHeader: Record "Purchase Header"; DocumentType: Option Invoice,"Credit Memo")` (integration)
- `OnFillInvLineBufferOnAfterInit(var PrepaymentInvLineBuffer: Record "Prepayment Inv. Line Buffer"; PurchaseHeader: Record "Purchase Header"; PurchaseLine: Record "Purchase Line")` (integration)
- `OnCodeOnAfterUpdateHeaderAndLines(var PurchaseHeader: Record "Purchase Header"; var PurchInvHeader: Record "Purch. Inv. Header"; var PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr."; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line"; DocumentType: Option Invoice,"Credit Memo"; PreviewMode: Boolean)` (integration)
  - subscribers: [Codeunit 6784 "Wthldg Tax Purch. Subscribers"](../codeunit/6784.md) VendorPrepaymentCrMemoWithholdingTax
- `OnBeforeUpdatePrepmtAmountOnPurchLines(PurchaseHeader: Record "Purchase Header"; NewTotalPrepmtAmount: Decimal; var IsHandled: Boolean)` (integration)
- `OnUpdatePrepmtAmountOnPurchLinesOnAfterSetFilters(var PurchaseLine: Record "Purchase Line"; PurchaseHeader: Record "Purchase Header"; var NewTotalPrepaymentAmount: Decimal)` (integration)
- `OnUpdatePrepmtAmountOnPurchLinesOnBeforeErrorIfLinesNotFound(var PurchaseLine: Record "Purchase Line"; PurchaseHeader: Record "Purchase Header"; var RaiseError: Boolean)` (integration)
- `OnUpdatePrepmtAmountOnPurchLinesOnBeforeModify(var PurchaseLine: Record "Purchase Line"; PurchaseHeader: Record "Purchase Header"; var NewTotalPrepaymentAmount: Decimal; var TotalPrepaymentAmount: Decimal)` (integration)
- `OnBeforeUpdateCrMemoDocNos(var PurchaseHeader: Record "Purchase Header")` (integration)
- `OnAfterUpdateCrMemoDocNos(var PurchaseHeader: Record "Purchase Header")` (integration)
- `OnBeforeInsertExtendedText(TabNo: Integer; DocNo: Code[20]; GLAccNo: Code[20]; DocDate: Date; LanguageCode: Code[10]; var PrevLineNo: Integer; var IsHandled: Boolean)` (integration)
- `OnBeforeGetPurchLines(PurchaseHeader: Record "Purchase Header"; DocumentType: Option Invoice,"Credit Memo",Statistic; var ToPurchaseLine: Record "Purchase Line"; var IsHandled: Boolean)` (integration)
- `OnBeforeCheckOpenPrepaymentLines(var PurchaseHeader: Record "Purchase Header"; DocumentType: Option)` (integration)
- `OnAfterCheckOpenPrepaymentLines(var PurchaseHeader: Record "Purchase Header"; DocumentType: Option; var Found: Boolean)` (integration)
- `OnInsertVATAmountOnBeforeInsert(var PurchaseLine: Record "Purchase Line"; var VATAmountLine: Record "VAT Amount Line")` (integration)
- `OnFindVATAmountLineOnAfterSetFilters(var PurchaseLine: Record "Purchase Line"; var VATAmountLine: Record "VAT Amount Line")` (integration)
- `OnBuildInvLineBufferOnPrepmtAmountZero(PurchaseHeader: Record "Purchase Header"; PurchaseLine: Record "Purchase Line"; var PrepaymentInvLineBuffer2: Record "Prepayment Inv. Line Buffer"; var PrepaymentInvLineBuffer: Record "Prepayment Inv. Line Buffer"; var TempPurchaseLineSource: Record "Purchase Line" temporary)` (integration)
- `OnCreateDimensionsOnAfterAddDimSources(var PurchaseLine: Record "Purchase Line"; DefaultDimSource: List of [Dictionary of [Integer, Code[20]]])` (integration)
  - subscribers: [Codeunit 99000789 "Mfg. Purchase Document Mgt."](../codeunit/99000789.md) OnCreateDimensionsOnAfterAddDimSources
- `OnAfterGetPrepmtAccNo(GenPostingSetup: Record "General Posting Setup"; var PrepmtAccNo: Code[20])` (integration)

## Procedures

- `SetDocumentType(DocumentType: Option ,,Invoice,"Credit Memo")`
- `Invoice(var PurchHeader: Record "Purchase Header")`
- `CreditMemo(var PurchHeader: Record "Purchase Header")`
- `CheckPrepmtDoc(PurchHeader: Record "Purchase Header"; DocumentType: Option Invoice,"Credit Memo")`
- `CheckOpenPrepaymentLines(PurchHeader: Record "Purchase Header"; DocumentType: Option): Boolean`
- `GetCorrBalAccNo(PurchHeader: Record "Purchase Header"; PositiveAmount: Boolean): Code[20]`
- `GetInvRoundingAccNo(VendorPostingGroup: Code[20]): Code[20]`
- `UpdateVATOnLines(PurchHeader: Record "Purchase Header"; var PurchLine: Record "Purchase Line"; var VATAmountLine: Record "VAT Amount Line"; DocumentType: Option Invoice,"Credit Memo",Statistic)`
- `CalcVATAmountLines(var PurchHeader: Record "Purchase Header"; var PurchLine: Record "Purchase Line"; var VATAmountLine: Record "VAT Amount Line"; DocumentType: Option Invoice,"Credit Memo",Statistic)`
- `SumPrepmt(PurchHeader: Record "Purchase Header"; var PurchLine: Record "Purchase Line"; var VATAmountLine: Record "VAT Amount Line"; var TotalAmount: Decimal; var TotalVATAmount: Decimal; var VATAmountText: Text[30])`
- `GetPurchLines(PurchHeader: Record "Purchase Header"; DocumentType: Option Invoice,"Credit Memo",Statistic; var ToPurchLine: Record "Purchase Line")`
- `BuildInvLineBuffer(PurchHeader: Record "Purchase Header"; var PurchLine: Record "Purchase Line"; DocumentType: Option Invoice,"Credit Memo",Statistic; var PrepmtInvLineBuf: Record "Prepayment Inv. Line Buffer")`
- `FillInvLineBuffer(PurchHeader: Record "Purchase Header"; PurchLine: Record "Purchase Line"; var PrepmtInvLineBuf: Record "Prepayment Inv. Line Buffer")`
- `PrepmtAmount(PurchLine: Record "Purchase Line"; DocumentType: Option Invoice,"Credit Memo",Statistic): Decimal`
- `UpdatePrepmtAmountOnPurchLines(PurchHeader: Record "Purchase Header"; NewTotalPrepmtAmount: Decimal)`
- `GetPurchLinesToDeduct(PurchHeader: Record "Purchase Header"; var PurchLines: Record "Purchase Line")`
- `GetPreviewMode(): Boolean`
- `GetSuppressCommit(): Boolean`
- `SetSuppressCommit(NewSuppressCommit: Boolean)`
- `SetPreviewMode(NewPreviewMode: Boolean)`

Plus 41 local procedures.

## Triggers

OnRun

## Relations

- runs on [Table 38 "Purchase Header"](../table/38.md)

## 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 28 "Error Message Management"](../codeunit/28.md) (11 calls: `BuildInvLineBuffer → FinishTopContext`, `CheckPrepmtDoc → Finish`, `CheckPrepmtDoc → GetFieldNo`, …)
- [Codeunit 12 "Gen. Jnl.-Post Line"](../codeunit/12.md) (3 calls: `PostBalancingEntry → RunWithCheck`, `PostVendorEntry → RunWithCheck`, `RunGenJnlPostLine → RunWithCheck`)
- [Codeunit 408 "DimensionManagement"](../codeunit/408.md) (2 calls: `CreateDimensions → AddDimSource`, `CreateDimensions → GetRecDefaultDimID`)
- [Codeunit 8703 "Feature Telemetry"](../codeunit/8703.md) (2 calls: `Code → LogUptake`, `Code → LogUsage`)
- [Page 456 "No. Series"](../page/456.md) (2 calls: `UpdateCrMemoDocNos → (object)`, `UpdateInvoiceDocNos → (object)`)
- [Codeunit 11 "Gen. Jnl.-Check Line"](../codeunit/11.md) (1 call: `CheckPrepmtDoc → DateNotAllowed`)
- [Codeunit 1431 "Forward Link Mgt."](../codeunit/1431.md) (1 call: `CheckPrepmtDoc → GetHelpCodeForAllowedPostingDate`)
- [Codeunit 19 "Gen. Jnl.-Post Preview"](../codeunit/19.md) (1 call: `Code → ThrowError`)
- [Codeunit 378 "Transfer Extended Text"](../codeunit/378.md) (1 call: `InsertExtendedText → PrepmtGetAnyExtText`)
- [Codeunit 441 "Prepayment Mgt."](../codeunit/441.md) (1 call: `PurchaseAssertPrepmtAmountNotMoreThanDocAmount → AssertPrepmtAmountNotMoreThanDocAmount`)
- [Codeunit 481 "Check Dimensions"](../codeunit/481.md) (1 call: `CheckPrepmtDoc → CheckPurchPrepmtDim`)
- [Codeunit 9070 "Document Errors Mgt."](../codeunit/9070.md) (1 call: `CheckPrepmtDoc → GetNothingToPostErrorMsg`)
- [Codeunit 9500 "Sequence No. Mgt."](../codeunit/9500.md) (1 call: `OnRun → SetPreviewMode`)

## Called by

- [Codeunit 445 "Purch.-Post Prepmt. (Yes/No)"](../codeunit/445.md) (5 calls: `OnRunPreview → (object)`, `OnRunPreview → SetDocumentType`, `OnRunPreview → SetPreviewMode`, …)
- [Page 403 "Purchase Order Statistics"](../page/403.md) (5 calls: `RefreshOnAfterGetRecord → GetPurchLines`, `RefreshOnAfterGetRecord → SumPrepmt`, `UpdatePrepmtAmount → GetPurchLines`, …)
- [Codeunit 816 "Purch. Post Invoice"](../codeunit/816.md) (2 calls: `PrepareLine → GetCorrBalAccNo`, `PrepareLine → GetInvRoundingAccNo`)
- [Codeunit 6785 "Withholding Tax Mgmt."](../codeunit/6785.md) (1 call: `InsertVendPrepaymentInvoiceWithholding → PrepmtAmount`)
- [Table 39 "Purchase Line"](../table/39.md) (1 call: `GetLineAmountToHandleInclPrepmt → PrepmtAmount`)

## Recent changes

- 2026-09-17 [#10898 [Extensibility Request] issue 30434: add purchase prepayment amount event](../../changes/bcapps/10898.md) (main, BC30, feature)
- 2026-08-27 [#10172 [Extensibility Request] issue 30111: add purchase prepayment update events](../../changes/bcapps/10172.md) (main, BC30, feature)
- 2026-08-12 [#10124 [Extensibility Request] issue 30400: add credit memo line filter event](../../changes/bcapps/10124.md) (main, BC30, feature)

## Across versions

- Present in: BC23-30
- Changed (declaration) in: BC24, BC26, BC28-30

## Countries that replace it

[AU](../../localizations/au.md), [CA](../../localizations/ca.md), [IT](../../localizations/it.md), [MX](../../localizations/mx.md), [NZ](../../localizations/nz.md), [US](../../localizations/us.md)

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: "Purchase-Post Prepayments")`, then `bcatlas_get_procedure_body` or `bcatlas_get_neighbors` on the returned id.
