Codeunit "Purchase-Post Prepayments"

ID 444
Namespace: Microsoft.Purchases.Posting

Properties

Name Value
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" = rimd
TableNo Table Microsoft.Purchases.Document."Purchase Header"

Methods

SetDocumentType

procedure SetDocumentType(DocumentType: Option)

Parameters

Name Type Description
DocumentType Option

Invoice

procedure Invoice(var PurchHeader: Record "Purchase Header")

Parameters

Name Type Description
PurchHeader Table Microsoft.Purchases.Document."Purchase Header"

CreditMemo

procedure CreditMemo(var PurchHeader: Record "Purchase Header")

Parameters

Name Type Description
PurchHeader Table Microsoft.Purchases.Document."Purchase Header"

CheckPrepmtDoc

procedure CheckPrepmtDoc(PurchHeader: Record "Purchase Header", DocumentType: Option)

Parameters

Name Type Description
PurchHeader Table Microsoft.Purchases.Document."Purchase Header"
DocumentType Option

CheckOpenPrepaymentLines

procedure CheckOpenPrepaymentLines(PurchHeader: Record "Purchase Header", DocumentType: Option): Boolean

Parameters

Name Type Description
PurchHeader Table Microsoft.Purchases.Document."Purchase Header"
DocumentType Option

Returns

Type Description
Boolean

GetCorrBalAccNo

procedure GetCorrBalAccNo(PurchHeader: Record "Purchase Header", PositiveAmount: Boolean): Code[20]

Parameters

Name Type Description
PurchHeader Table Microsoft.Purchases.Document."Purchase Header"
PositiveAmount Boolean

Returns

Type Description
Code[20]

GetInvRoundingAccNo

procedure GetInvRoundingAccNo(VendorPostingGroup: Code[20]): Code[20]

Parameters

Name Type Description
VendorPostingGroup Code[20]

Returns

Type Description
Code[20]

UpdateVATOnLines

procedure UpdateVATOnLines(PurchHeader: Record "Purchase Header", var PurchLine: Record "Purchase Line", var VATAmountLine: Record "VAT Amount Line", DocumentType: Option)

Parameters

Name Type Description
PurchHeader Table Microsoft.Purchases.Document."Purchase Header"
PurchLine Table Microsoft.Purchases.Document."Purchase Line"
VATAmountLine Table Microsoft.Finance.VAT.Calculation."VAT Amount Line"
DocumentType Option

CalcVATAmountLines

procedure CalcVATAmountLines(var PurchHeader: Record "Purchase Header", var PurchLine: Record "Purchase Line", var VATAmountLine: Record "VAT Amount Line", DocumentType: Option)

Parameters

Name Type Description
PurchHeader Table Microsoft.Purchases.Document."Purchase Header"
PurchLine Table Microsoft.Purchases.Document."Purchase Line"
VATAmountLine Table Microsoft.Finance.VAT.Calculation."VAT Amount Line"
DocumentType Option

SumPrepmt

procedure 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])

Parameters

Name Type Description
PurchHeader Table Microsoft.Purchases.Document."Purchase Header"
PurchLine Table Microsoft.Purchases.Document."Purchase Line"
VATAmountLine Table Microsoft.Finance.VAT.Calculation."VAT Amount Line"
TotalAmount Decimal
TotalVATAmount Decimal
VATAmountText Text[30]

GetPurchLines

procedure GetPurchLines(PurchHeader: Record "Purchase Header", DocumentType: Option, var ToPurchLine: Record "Purchase Line")

Parameters

Name Type Description
PurchHeader Table Microsoft.Purchases.Document."Purchase Header"
DocumentType Option
ToPurchLine Table Microsoft.Purchases.Document."Purchase Line"

BuildInvLineBuffer

procedure BuildInvLineBuffer(PurchHeader: Record "Purchase Header", var PurchLine: Record "Purchase Line", DocumentType: Option, var PrepmtInvLineBuf: Record "Prepayment Inv. Line Buffer")

Parameters

Name Type Description
PurchHeader Table Microsoft.Purchases.Document."Purchase Header"
PurchLine Table Microsoft.Purchases.Document."Purchase Line"
DocumentType Option
PrepmtInvLineBuf Table Microsoft.Finance.ReceivablesPayables."Prepayment Inv. Line Buffer"

FillInvLineBuffer

procedure FillInvLineBuffer(PurchHeader: Record "Purchase Header", PurchLine: Record "Purchase Line", var PrepmtInvLineBuf: Record "Prepayment Inv. Line Buffer")

Parameters

Name Type Description
PurchHeader Table Microsoft.Purchases.Document."Purchase Header"
PurchLine Table Microsoft.Purchases.Document."Purchase Line"
PrepmtInvLineBuf Table Microsoft.Finance.ReceivablesPayables."Prepayment Inv. Line Buffer"

PrepmtAmount

procedure PrepmtAmount(PurchLine: Record "Purchase Line", DocumentType: Option): Decimal

Parameters

Name Type Description
PurchLine Table Microsoft.Purchases.Document."Purchase Line"
DocumentType Option

Returns

Type Description
Decimal

UpdatePrepmtAmountOnPurchLines

procedure UpdatePrepmtAmountOnPurchLines(PurchHeader: Record "Purchase Header", NewTotalPrepmtAmount: Decimal)

Parameters

Name Type Description
PurchHeader Table Microsoft.Purchases.Document."Purchase Header"
NewTotalPrepmtAmount Decimal

GetPurchLinesToDeduct

procedure GetPurchLinesToDeduct(PurchHeader: Record "Purchase Header", var PurchLines: Record "Purchase Line")

Parameters

Name Type Description
PurchHeader Table Microsoft.Purchases.Document."Purchase Header"
PurchLines Table Microsoft.Purchases.Document."Purchase Line"

GetPreviewMode

procedure GetPreviewMode(): Boolean

Returns

Type Description
Boolean

GetSuppressCommit

procedure GetSuppressCommit(): Boolean

Returns

Type Description
Boolean

SetSuppressCommit

procedure SetSuppressCommit(NewSuppressCommit: Boolean)

Parameters

Name Type Description
NewSuppressCommit Boolean

SetPreviewMode

procedure SetPreviewMode(NewPreviewMode: Boolean)

Parameters

Name Type Description
NewPreviewMode Boolean

Events

OnAfterCreateDimensionsProcedure

[IntegrationEvent(False,False)]
local procedure OnAfterCreateDimensionsProcedure(var PurchaseLine: Record "Purchase Line", DefaultDimSource: List of [Dictionary of [Integer, Code[20]]])

Parameters

Name Type Description
PurchaseLine Table Microsoft.Purchases.Document."Purchase Line"
DefaultDimSource List of [Dictionary of [Integer, Code[20]]]

OnAfterApplyFilter

[IntegrationEvent(False,False)]
local procedure OnAfterApplyFilter(var PurchaseLine: Record "Purchase Line", PurchaseHeader: Record "Purchase Header", DocumentType: Option)

Parameters

Name Type Description
PurchaseLine Table Microsoft.Purchases.Document."Purchase Line"
PurchaseHeader Table Microsoft.Purchases.Document."Purchase Header"
DocumentType Option

OnAfterCalcVATAmountLines

[IntegrationEvent(False,False)]
local procedure OnAfterCalcVATAmountLines(PurchaseHeader: Record "Purchase Header", var PurchaseLine: Record "Purchase Line", var VATAmountLine: Record "VAT Amount Line", DocumentType: Option)

Parameters

Name Type Description
PurchaseHeader Table Microsoft.Purchases.Document."Purchase Header"
PurchaseLine Table Microsoft.Purchases.Document."Purchase Line"
VATAmountLine Table Microsoft.Finance.VAT.Calculation."VAT Amount Line"
DocumentType Option

OnAfterCheckPrepmtDoc

[IntegrationEvent(False,False)]
local procedure OnAfterCheckPrepmtDoc(PurchHeader: Record "Purchase Header", DocumentType: Option, var ErrorMessageMgt: Codeunit "Error Message Management")

Parameters

Name Type Description
PurchHeader Table Microsoft.Purchases.Document."Purchase Header"
DocumentType Option
ErrorMessageMgt Codeunit System.Utilities."Error Message Management"

OnAfterCreateLinesOnBeforeGLPosting

[IntegrationEvent(False,False)]
local procedure 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)

Parameters

Name Type Description
PurchaseHeader Table Microsoft.Purchases.Document."Purchase Header"
PurchInvHeader Table Microsoft.Purchases.History."Purch. Inv. Header"
PurchCrMemoHeader Table Microsoft.Purchases.History."Purch. Cr. Memo Hdr."
TempPrepmtInvLineBuffer Table Microsoft.Finance.ReceivablesPayables."Prepayment Inv. Line Buffer"
DocumentType Option
LastLineNo Integer

OnAfterFillInvLineBuffer

[IntegrationEvent(False,False)]
local procedure OnAfterFillInvLineBuffer(var PrepmtInvLineBuf: Record "Prepayment Inv. Line Buffer", PurchLine: Record "Purchase Line", CommitIsSuppressed: Boolean, PurchaseHeader: Record "Purchase Header")

Parameters

Name Type Description
PrepmtInvLineBuf Table Microsoft.Finance.ReceivablesPayables."Prepayment Inv. Line Buffer"
PurchLine Table Microsoft.Purchases.Document."Purchase Line"
CommitIsSuppressed Boolean
PurchaseHeader Table Microsoft.Purchases.Document."Purchase Header"

OnAfterInsertInvoiceRounding

[IntegrationEvent(False,False)]
local procedure OnAfterInsertInvoiceRounding(PurchaseHeader: Record "Purchase Header", var PrepmtInvLineBuffer: Record "Prepayment Inv. Line Buffer", var TotalPrepmtInvLineBuf: Record "Prepayment Inv. Line Buffer", var PrevLineNo: Integer)

Parameters

Name Type Description
PurchaseHeader Table Microsoft.Purchases.Document."Purchase Header"
PrepmtInvLineBuffer Table Microsoft.Finance.ReceivablesPayables."Prepayment Inv. Line Buffer"
TotalPrepmtInvLineBuf Table Microsoft.Finance.ReceivablesPayables."Prepayment Inv. Line Buffer"
PrevLineNo Integer

OnAfterPostPrepayments

[IntegrationEvent(False,False)]
local procedure OnAfterPostPrepayments(var PurchHeader: Record "Purchase Header", DocumentType: Option, CommitIsSuppressed: Boolean, var PurchInvHeader: Record "Purch. Inv. Header", var PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr.")

Parameters

Name Type Description
PurchHeader Table Microsoft.Purchases.Document."Purchase Header"
DocumentType Option
CommitIsSuppressed Boolean
PurchInvHeader Table Microsoft.Purchases.History."Purch. Inv. Header"
PurchCrMemoHdr Table Microsoft.Purchases.History."Purch. Cr. Memo Hdr."

OnAfterPostBalancingEntry

[IntegrationEvent(False,False)]
local procedure 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)

Parameters

Name Type Description
GenJnlLine Table Microsoft.Finance.GeneralLedger.Journal."Gen. Journal Line"
VendLedgEntry Table Microsoft.Purchases.Payables."Vendor Ledger Entry"
TotalPrepmtInvLineBuffer Table Microsoft.Finance.ReceivablesPayables."Prepayment Inv. Line Buffer"
TotalPrepmtInvLineBufferLCY Table Microsoft.Finance.ReceivablesPayables."Prepayment Inv. Line Buffer"
CommitIsSupressed Boolean

OnAfterPostVendorEntry

[IntegrationEvent(False,False)]
local procedure OnAfterPostVendorEntry(var GenJnlLine: Record "Gen. Journal Line", TotalPrepmtInvLineBuffer: Record "Prepayment Inv. Line Buffer", TotalPrepmtInvLineBufferLCY: Record "Prepayment Inv. Line Buffer", CommitIsSupressed: Boolean)

Parameters

Name Type Description
GenJnlLine Table Microsoft.Finance.GeneralLedger.Journal."Gen. Journal Line"
TotalPrepmtInvLineBuffer Table Microsoft.Finance.ReceivablesPayables."Prepayment Inv. Line Buffer"
TotalPrepmtInvLineBufferLCY Table Microsoft.Finance.ReceivablesPayables."Prepayment Inv. Line Buffer"
CommitIsSupressed Boolean

OnAfterPostPrepmtInvLineBuffer

[IntegrationEvent(False,False)]
local procedure OnAfterPostPrepmtInvLineBuffer(var GenJnlLine: Record "Gen. Journal Line", PrepmtInvLineBuffer: Record "Prepayment Inv. Line Buffer", CommitIsSuppressed: Boolean, var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line")

Parameters

Name Type Description
GenJnlLine Table Microsoft.Finance.GeneralLedger.Journal."Gen. Journal Line"
PrepmtInvLineBuffer Table Microsoft.Finance.ReceivablesPayables."Prepayment Inv. Line Buffer"
CommitIsSuppressed Boolean
GenJnlPostLine Codeunit Microsoft.Finance.GeneralLedger.Posting."Gen. Jnl.-Post Line"

OnAfterPurchInvHeaderInsert

[IntegrationEvent(False,False)]
local procedure OnAfterPurchInvHeaderInsert(var PurchInvHeader: Record "Purch. Inv. Header", PurchHeader: Record "Purchase Header", CommitIsSupressed: Boolean)

Parameters

Name Type Description
PurchInvHeader Table Microsoft.Purchases.History."Purch. Inv. Header"
PurchHeader Table Microsoft.Purchases.Document."Purchase Header"
CommitIsSupressed Boolean

OnAfterPurchInvLineInsert

[IntegrationEvent(False,False)]
local procedure OnAfterPurchInvLineInsert(var PurchInvLine: Record "Purch. Inv. Line", PurchInvHeader: Record "Purch. Inv. Header", PrepmtInvLineBuffer: Record "Prepayment Inv. Line Buffer", CommitIsSupressed: Boolean)

Parameters

Name Type Description
PurchInvLine Table Microsoft.Purchases.History."Purch. Inv. Line"
PurchInvHeader Table Microsoft.Purchases.History."Purch. Inv. Header"
PrepmtInvLineBuffer Table Microsoft.Finance.ReceivablesPayables."Prepayment Inv. Line Buffer"
CommitIsSupressed Boolean

OnAfterPurchCrMemoHeaderInsert

[IntegrationEvent(False,False)]
local procedure OnAfterPurchCrMemoHeaderInsert(var PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr.", PurchHeader: Record "Purchase Header", CommitIsSupressed: Boolean)

Parameters

Name Type Description
PurchCrMemoHdr Table Microsoft.Purchases.History."Purch. Cr. Memo Hdr."
PurchHeader Table Microsoft.Purchases.Document."Purchase Header"
CommitIsSupressed Boolean

OnAfterPurchCrMemoLineInsert

[IntegrationEvent(False,False)]
local procedure OnAfterPurchCrMemoLineInsert(var PurchCrMemoLine: Record "Purch. Cr. Memo Line", PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr.", PrepmtInvLineBuffer: Record "Prepayment Inv. Line Buffer", CommitIsSupressed: Boolean)

Parameters

Name Type Description
PurchCrMemoLine Table Microsoft.Purchases.History."Purch. Cr. Memo Line"
PurchCrMemoHdr Table Microsoft.Purchases.History."Purch. Cr. Memo Hdr."
PrepmtInvLineBuffer Table Microsoft.Finance.ReceivablesPayables."Prepayment Inv. Line Buffer"
CommitIsSupressed Boolean

OnAfterRoundAmounts

[IntegrationEvent(False,False)]
local procedure 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")

Parameters

Name Type Description
PurchaseHeader Table Microsoft.Purchases.Document."Purchase Header"
PrepmtInvLineBuffer Table Microsoft.Finance.ReceivablesPayables."Prepayment Inv. Line Buffer"
TotalPrepmtInvLineBuf Table Microsoft.Finance.ReceivablesPayables."Prepayment Inv. Line Buffer"
TotalPrepmtInvLineBufLCY Table Microsoft.Finance.ReceivablesPayables."Prepayment Inv. Line Buffer"

OnAfterUpdatePostedPurchDocument

[IntegrationEvent(False,False)]
local procedure OnAfterUpdatePostedPurchDocument(DocumentType: Option, DocumentNo: Code[20], CommitIsSuppressed: Boolean)

Parameters

Name Type Description
DocumentType Option
DocumentNo Code[20]
CommitIsSuppressed Boolean

OnAfterUpdateVATOnLines

[IntegrationEvent(False,False)]
local procedure OnAfterUpdateVATOnLines(PurchaseHeader: Record "Purchase Header", var PurchaseLine: Record "Purchase Line", VATAmountLine: Record "VAT Amount Line", DocumentType: Option)

Parameters

Name Type Description
PurchaseHeader Table Microsoft.Purchases.Document."Purchase Header"
PurchaseLine Table Microsoft.Purchases.Document."Purchase Line"
VATAmountLine Table Microsoft.Finance.VAT.Calculation."VAT Amount Line"
DocumentType Option

OnBeforeCheckPrepmtDoc

[IntegrationEvent(False,False)]
local procedure OnBeforeCheckPrepmtDoc(PurchHeader: Record "Purchase Header", DocumentType: Option)

Parameters

Name Type Description
PurchHeader Table Microsoft.Purchases.Document."Purchase Header"
DocumentType Option

OnBeforeInvoice

[IntegrationEvent(True,False)]
local procedure OnBeforeInvoice(var PurchaseHeader: Record "Purchase Header", var Handled: Boolean)

Parameters

Name Type Description
PurchaseHeader Table Microsoft.Purchases.Document."Purchase Header"
Handled Boolean

OnBeforeCreditMemo

[IntegrationEvent(True,False)]
local procedure OnBeforeCreditMemo(var PurchaseHeader: Record "Purchase Header", var Handled: Boolean)

Parameters

Name Type Description
PurchaseHeader Table Microsoft.Purchases.Document."Purchase Header"
Handled Boolean

OnBeforeCreateLinesFromBuffer

[IntegrationEvent(False,False)]
local procedure 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)

Parameters

Name Type Description
PurchHeader Table Microsoft.Purchases.Document."Purchase Header"
TempGlobalPrepmtInvLineBuf Table Microsoft.Finance.ReceivablesPayables."Prepayment Inv. Line Buffer"
LineCount Integer
Window Dialog
PurchInvHeader Table Microsoft.Purchases.History."Purch. Inv. Header"
PurchCrMemoHeader Table Microsoft.Purchases.History."Purch. Cr. Memo Hdr."
PostedDocTabNo Integer
IsHandled Boolean
DocumentType Option
LastLineNo Integer

OnBeforePostPrepayments

[IntegrationEvent(False,False)]
local procedure OnBeforePostPrepayments(var PurchHeader: Record "Purchase Header", DocumentType: Option, CommitIsSuppressed: Boolean)

Parameters

Name Type Description
PurchHeader Table Microsoft.Purchases.Document."Purchase Header"
DocumentType Option
CommitIsSuppressed Boolean

OnBeforePostVendorEntryProcedure

[IntegrationEvent(False,False)]
local procedure OnBeforePostVendorEntryProcedure(var PurchHeader: Record "Purchase Header", TotalPrepmtInvLineBuffer: Record "Prepayment Inv. Line Buffer" temporary, TotalPrepmtInvLineBufferLCY: Record "Prepayment Inv. Line Buffer", DocumentType: Option, 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)

Parameters

Name Type Description
PurchHeader Table Microsoft.Purchases.Document."Purchase Header"
TotalPrepmtInvLineBuffer Table Microsoft.Finance.ReceivablesPayables."Prepayment Inv. Line Buffer"
TotalPrepmtInvLineBufferLCY Table Microsoft.Finance.ReceivablesPayables."Prepayment Inv. Line Buffer"
DocumentType Option
PostingDescription Text[100]
DocType Enum Microsoft.Finance.GeneralLedger.Journal."Gen. Journal Document Type"
DocNo Code[20]
ExtDocNo Text[35]
SrcCode Code[10]
PostingNoSeriesCode Code[20]
CalcPmtDisc Boolean
GenJnlPostLine Codeunit Microsoft.Finance.GeneralLedger.Posting."Gen. Jnl.-Post Line"
IsHandled Boolean

OnBeforePurchaseAssertPrepmtAmountNotMoreThanDocAmount

[IntegrationEvent(False,False)]
local procedure OnBeforePurchaseAssertPrepmtAmountNotMoreThanDocAmount(var VendLedgEntry: Record "Vendor Ledger Entry", PurchHeader: Record "Purchase Header", PurchLine: Record "Purchase Line", var IsHandled: Boolean)

Parameters

Name Type Description
VendLedgEntry Table Microsoft.Purchases.Payables."Vendor Ledger Entry"
PurchHeader Table Microsoft.Purchases.Document."Purchase Header"
PurchLine Table Microsoft.Purchases.Document."Purchase Line"
IsHandled Boolean

OnBeforePurchInvHeaderInsert

[IntegrationEvent(False,False)]
local procedure OnBeforePurchInvHeaderInsert(var PurchInvHeader: Record "Purch. Inv. Header", PurchHeader: Record "Purchase Header", CommitIsSupressed: Boolean)

Parameters

Name Type Description
PurchInvHeader Table Microsoft.Purchases.History."Purch. Inv. Header"
PurchHeader Table Microsoft.Purchases.Document."Purchase Header"
CommitIsSupressed Boolean

OnBeforePurchInvLineInsert

[IntegrationEvent(False,False)]
local procedure OnBeforePurchInvLineInsert(var PurchInvLine: Record "Purch. Inv. Line", PurchInvHeader: Record "Purch. Inv. Header", PrepmtInvLineBuffer: Record "Prepayment Inv. Line Buffer", CommitIsSupressed: Boolean)

Parameters

Name Type Description
PurchInvLine Table Microsoft.Purchases.History."Purch. Inv. Line"
PurchInvHeader Table Microsoft.Purchases.History."Purch. Inv. Header"
PrepmtInvLineBuffer Table Microsoft.Finance.ReceivablesPayables."Prepayment Inv. Line Buffer"
CommitIsSupressed Boolean

OnBeforePurchCrMemoHeaderInsert

[IntegrationEvent(False,False)]
local procedure OnBeforePurchCrMemoHeaderInsert(var PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr.", PurchHeader: Record "Purchase Header", CommitIsSupressed: Boolean)

Parameters

Name Type Description
PurchCrMemoHdr Table Microsoft.Purchases.History."Purch. Cr. Memo Hdr."
PurchHeader Table Microsoft.Purchases.Document."Purchase Header"
CommitIsSupressed Boolean

OnBeforePurchCrMemoLineInsert

[IntegrationEvent(False,False)]
local procedure OnBeforePurchCrMemoLineInsert(var PurchCrMemoLine: Record "Purch. Cr. Memo Line", PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr.", PrepmtInvLineBuffer: Record "Prepayment Inv. Line Buffer", CommitIsSupressed: Boolean)

Parameters

Name Type Description
PurchCrMemoLine Table Microsoft.Purchases.History."Purch. Cr. Memo Line"
PurchCrMemoHdr Table Microsoft.Purchases.History."Purch. Cr. Memo Hdr."
PrepmtInvLineBuffer Table Microsoft.Finance.ReceivablesPayables."Prepayment Inv. Line Buffer"
CommitIsSupressed Boolean

OnBeforePostBalancingEntry

[IntegrationEvent(False,False)]
local procedure 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)

Parameters

Name Type Description
GenJnlLine Table Microsoft.Finance.GeneralLedger.Journal."Gen. Journal Line"
VendLedgEntry Table Microsoft.Purchases.Payables."Vendor Ledger Entry"
TotalPrepmtInvLineBuffer Table Microsoft.Finance.ReceivablesPayables."Prepayment Inv. Line Buffer"
TotalPrepmtInvLineBufferLCY Table Microsoft.Finance.ReceivablesPayables."Prepayment Inv. Line Buffer"
CommitIsSupressed Boolean

OnBeforePostVendorEntry

[IntegrationEvent(False,False)]
local procedure 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)

Parameters

Name Type Description
GenJnlLine Table Microsoft.Finance.GeneralLedger.Journal."Gen. Journal Line"
TotalPrepmtInvLineBuffer Table Microsoft.Finance.ReceivablesPayables."Prepayment Inv. Line Buffer"
TotalPrepmtInvLineBufferLCY Table Microsoft.Finance.ReceivablesPayables."Prepayment Inv. Line Buffer"
CommitIsSupressed Boolean
PurchaseHeader Table Microsoft.Purchases.Document."Purchase Header"
DocumentType Option

OnBeforePostPrepmtInvLineBuffer

[IntegrationEvent(False,False)]
local procedure OnBeforePostPrepmtInvLineBuffer(var GenJnlLine: Record "Gen. Journal Line", PrepmtInvLineBuffer: Record "Prepayment Inv. Line Buffer", CommitIsSupressed: Boolean)

Parameters

Name Type Description
GenJnlLine Table Microsoft.Finance.GeneralLedger.Journal."Gen. Journal Line"
PrepmtInvLineBuffer Table Microsoft.Finance.ReceivablesPayables."Prepayment Inv. Line Buffer"
CommitIsSupressed Boolean

OnBeforeRunGenJnlPostLine

[IntegrationEvent(False,False)]
local procedure OnBeforeRunGenJnlPostLine(var GenJnlLine: Record "Gen. Journal Line")

Parameters

Name Type Description
GenJnlLine Table Microsoft.Finance.GeneralLedger.Journal."Gen. Journal Line"

OnBeforeSetStatusPendingPrepayment

[IntegrationEvent(False,False)]
local procedure OnBeforeSetStatusPendingPrepayment(var PurchaseHeader: Record "Purchase Header", var IsHandled: Boolean)

Parameters

Name Type Description
PurchaseHeader Table Microsoft.Purchases.Document."Purchase Header"
IsHandled Boolean

OnBeforeUpdateDocNos

[IntegrationEvent(False,False)]
local procedure OnBeforeUpdateDocNos(var PurchaseHeader: Record "Purchase Header", DocumentType: Option, var DocNo: Code[20], var NoSeriesCode: Code[20], var ModifyHeader: Boolean, var PreviewMode: Boolean, var IsHandled: Boolean)

Parameters

Name Type Description
PurchaseHeader Table Microsoft.Purchases.Document."Purchase Header"
DocumentType Option
DocNo Code[20]
NoSeriesCode Code[20]
ModifyHeader Boolean
PreviewMode Boolean
IsHandled Boolean

OnBeforeUpdatePostedPurchaseDocument

[IntegrationEvent(False,False)]
local procedure OnBeforeUpdatePostedPurchaseDocument(var VendorLedgerEntry: Record "Vendor Ledger Entry", var PurchInvHeader: Record "Purch. Inv. Header", var PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr.", DocumentType: Option, var IsHandled: Boolean, DocumentNo: Code[20])

Parameters

Name Type Description
VendorLedgerEntry Table Microsoft.Purchases.Payables."Vendor Ledger Entry"
PurchInvHeader Table Microsoft.Purchases.History."Purch. Inv. Header"
PurchCrMemoHdr Table Microsoft.Purchases.History."Purch. Cr. Memo Hdr."
DocumentType Option
IsHandled Boolean
DocumentNo Code[20]

OnCodeOnBeforePostBalancingEntry

[IntegrationEvent(False,False)]
local procedure OnCodeOnBeforePostBalancingEntry(var PurchaseHeader: Record "Purchase Header", var TempPrepaymentInvLineBuffer: Record "Prepayment Inv. Line Buffer" temporary)

Parameters

Name Type Description
PurchaseHeader Table Microsoft.Purchases.Document."Purchase Header"
TempPrepaymentInvLineBuffer Table Microsoft.Finance.ReceivablesPayables."Prepayment Inv. Line Buffer"

OnCodeOnBeforePostVendorEntry

[IntegrationEvent(False,False)]
local procedure OnCodeOnBeforePostVendorEntry(var PurchaseHeader: Record "Purchase Header", var TempPrepaymentInvLineBuffer: Record "Prepayment Inv. Line Buffer" temporary)

Parameters

Name Type Description
PurchaseHeader Table Microsoft.Purchases.Document."Purchase Header"
TempPrepaymentInvLineBuffer Table Microsoft.Finance.ReceivablesPayables."Prepayment Inv. Line Buffer"

OnPostVendorEntryOnAfterInitNewLine

[IntegrationEvent(False,False)]
local procedure OnPostVendorEntryOnAfterInitNewLine(var GenJnlLine: Record "Gen. Journal Line", PurchHeader: Record "Purchase Header")

Parameters

Name Type Description
GenJnlLine Table Microsoft.Finance.GeneralLedger.Journal."Gen. Journal Line"
PurchHeader Table Microsoft.Purchases.Document."Purchase Header"

OnRoundAmountsOnBeforeIncrAmoutns

[IntegrationEvent(False,False)]
local procedure 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")

Parameters

Name Type Description
PurchaseHeader Table Microsoft.Purchases.Document."Purchase Header"
PrepmtInvLineBuf Table Microsoft.Finance.ReceivablesPayables."Prepayment Inv. Line Buffer"
TotalPrepmtInvLineBuf Table Microsoft.Finance.ReceivablesPayables."Prepayment Inv. Line Buffer"
TotalPrepmtInvLineBufLCY Table Microsoft.Finance.ReceivablesPayables."Prepayment Inv. Line Buffer"

OnUpdatePurchaseDocumentOnBeforeModifyCrMemoPurchLine

[IntegrationEvent(False,False)]
local procedure OnUpdatePurchaseDocumentOnBeforeModifyCrMemoPurchLine(var PurchaseLine: Record "Purchase Line")

Parameters

Name Type Description
PurchaseLine Table Microsoft.Purchases.Document."Purchase Line"

OnUpdatePurchaseDocumentOnBeforeModifyInvoicePurchLine

[IntegrationEvent(False,False)]
local procedure OnUpdatePurchaseDocumentOnBeforeModifyInvoicePurchLine(var PurchaseLine: Record "Purchase Line")

Parameters

Name Type Description
PurchaseLine Table Microsoft.Purchases.Document."Purchase Line"

OnUpdateVATOnLinesOnAfterGetRemainder

[IntegrationEvent(False,False)]
local procedure OnUpdateVATOnLinesOnAfterGetRemainder(var VATAmountLineRemainder: Record "VAT Amount Line", var RemainderExists: Boolean)

Parameters

Name Type Description
VATAmountLineRemainder Table Microsoft.Finance.VAT.Calculation."VAT Amount Line"
RemainderExists Boolean

OnUpdateVATOnLinesOnAfterVATAmountLineGet

[IntegrationEvent(False,False)]
local procedure OnUpdateVATOnLinesOnAfterVATAmountLineGet(var VATAmountLine: Record "VAT Amount Line")

Parameters

Name Type Description
VATAmountLine Table Microsoft.Finance.VAT.Calculation."VAT Amount Line"

OnUpdateVATOnLinesOnBeforePurchLineModify

[IntegrationEvent(False,False)]
local procedure OnUpdateVATOnLinesOnBeforePurchLineModify(PurchaseHeader: Record "Purchase Header", var PurchaseLine: Record "Purchase Line", var TempVATAmountLineRemainder: Record "VAT Amount Line", NewAmount: Decimal, NewAmountIncludingVAT: Decimal, NewVATBaseAmount: Decimal)

Parameters

Name Type Description
PurchaseHeader Table Microsoft.Purchases.Document."Purchase Header"
PurchaseLine Table Microsoft.Purchases.Document."Purchase Line"
TempVATAmountLineRemainder Table Microsoft.Finance.VAT.Calculation."VAT Amount Line"
NewAmount Decimal
NewAmountIncludingVAT Decimal
NewVATBaseAmount Decimal

OnCodeOnBeforeWindowOpen

[IntegrationEvent(False,False)]
local procedure OnCodeOnBeforeWindowOpen(var PurchaseHeader: Record "Purchase Header", DocumentType: Option)

Parameters

Name Type Description
PurchaseHeader Table Microsoft.Purchases.Document."Purchase Header"
DocumentType Option

OnFillInvLineBufferOnAfterInit

[IntegrationEvent(False,False)]
local procedure OnFillInvLineBufferOnAfterInit(var PrepaymentInvLineBuffer: Record "Prepayment Inv. Line Buffer", PurchaseHeader: Record "Purchase Header", PurchaseLine: Record "Purchase Line")

Parameters

Name Type Description
PrepaymentInvLineBuffer Table Microsoft.Finance.ReceivablesPayables."Prepayment Inv. Line Buffer"
PurchaseHeader Table Microsoft.Purchases.Document."Purchase Header"
PurchaseLine Table Microsoft.Purchases.Document."Purchase Line"

OnCodeOnAfterUpdateHeaderAndLines

[IntegrationEvent(False,False)]
local procedure 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", PreviewMode: Boolean)

Parameters

Name Type Description
PurchaseHeader Table Microsoft.Purchases.Document."Purchase Header"
PurchInvHeader Table Microsoft.Purchases.History."Purch. Inv. Header"
PurchCrMemoHdr Table Microsoft.Purchases.History."Purch. Cr. Memo Hdr."
GenJnlPostLine Codeunit Microsoft.Finance.GeneralLedger.Posting."Gen. Jnl.-Post Line"
PreviewMode Boolean

OnBeforeUpdatePrepmtAmountOnPurchLines

[IntegrationEvent(False,False)]
local procedure OnBeforeUpdatePrepmtAmountOnPurchLines(PurchaseHeader: Record "Purchase Header", NewTotalPrepmtAmount: Decimal, var IsHandled: Boolean)

Parameters

Name Type Description
PurchaseHeader Table Microsoft.Purchases.Document."Purchase Header"
NewTotalPrepmtAmount Decimal
IsHandled Boolean

OnBeforeUpdateCrMemoDocNos

[IntegrationEvent(False,False)]
local procedure OnBeforeUpdateCrMemoDocNos(var PurchaseHeader: Record "Purchase Header")

Parameters

Name Type Description
PurchaseHeader Table Microsoft.Purchases.Document."Purchase Header"

OnAfterUpdateCrMemoDocNos

[IntegrationEvent(False,False)]
local procedure OnAfterUpdateCrMemoDocNos(var PurchaseHeader: Record "Purchase Header")

Parameters

Name Type Description
PurchaseHeader Table Microsoft.Purchases.Document."Purchase Header"

OnBeforeInsertExtendedText

[IntegrationEvent(False,False)]
local procedure OnBeforeInsertExtendedText(TabNo: Integer, DocNo: Code[20], GLAccNo: Code[20], DocDate: Date, LanguageCode: Code[10], var PrevLineNo: Integer, var IsHandled: Boolean)

Parameters

Name Type Description
TabNo Integer
DocNo Code[20]
GLAccNo Code[20]
DocDate Date
LanguageCode Code[10]
PrevLineNo Integer
IsHandled Boolean

OnBeforeGetPurchLines

[IntegrationEvent(False,False)]
local procedure OnBeforeGetPurchLines(PurchaseHeader: Record "Purchase Header", DocumentType: Option, var ToPurchaseLine: Record "Purchase Line", var IsHandled: Boolean)

Parameters

Name Type Description
PurchaseHeader Table Microsoft.Purchases.Document."Purchase Header"
DocumentType Option
ToPurchaseLine Table Microsoft.Purchases.Document."Purchase Line"
IsHandled Boolean

OnBeforeCheckOpenPrepaymentLines

[IntegrationEvent(False,False)]
local procedure OnBeforeCheckOpenPrepaymentLines(var PurchaseHeader: Record "Purchase Header", DocumentType: Option)

Parameters

Name Type Description
PurchaseHeader Table Microsoft.Purchases.Document."Purchase Header"
DocumentType Option

OnAfterCheckOpenPrepaymentLines

[IntegrationEvent(False,False)]
local procedure OnAfterCheckOpenPrepaymentLines(var PurchaseHeader: Record "Purchase Header", DocumentType: Option, var Found: Boolean)

Parameters

Name Type Description
PurchaseHeader Table Microsoft.Purchases.Document."Purchase Header"
DocumentType Option
Found Boolean

OnInsertVATAmountOnBeforeInsert

[IntegrationEvent(False,False)]
local procedure OnInsertVATAmountOnBeforeInsert(var PurchaseLine: Record "Purchase Line", var VATAmountLine: Record "VAT Amount Line")

Parameters

Name Type Description
PurchaseLine Table Microsoft.Purchases.Document."Purchase Line"
VATAmountLine Table Microsoft.Finance.VAT.Calculation."VAT Amount Line"

OnFindVATAmountLineOnAfterSetFilters

[IntegrationEvent(False,False)]
local procedure OnFindVATAmountLineOnAfterSetFilters(var PurchaseLine: Record "Purchase Line", var VATAmountLine: Record "VAT Amount Line")

Parameters

Name Type Description
PurchaseLine Table Microsoft.Purchases.Document."Purchase Line"
VATAmountLine Table Microsoft.Finance.VAT.Calculation."VAT Amount Line"

OnBuildInvLineBufferOnPrepmtAmountZero

[IntegrationEvent(False,False)]
local procedure 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)

Parameters

Name Type Description
PurchaseHeader Table Microsoft.Purchases.Document."Purchase Header"
PurchaseLine Table Microsoft.Purchases.Document."Purchase Line"
PrepaymentInvLineBuffer2 Table Microsoft.Finance.ReceivablesPayables."Prepayment Inv. Line Buffer"
PrepaymentInvLineBuffer Table Microsoft.Finance.ReceivablesPayables."Prepayment Inv. Line Buffer"
TempPurchaseLineSource Table Microsoft.Purchases.Document."Purchase Line"

OnCreateDimensionsOnAfterAddDimSources

[IntegrationEvent(False,False)]
local procedure OnCreateDimensionsOnAfterAddDimSources(var PurchaseLine: Record "Purchase Line", DefaultDimSource: List of [Dictionary of [Integer, Code[20]]])

Parameters

Name Type Description
PurchaseLine Table Microsoft.Purchases.Document."Purchase Line"
DefaultDimSource List of [Dictionary of [Integer, Code[20]]]

OnAfterGetPrepmtAccNo

[IntegrationEvent(False,False)]
local procedure OnAfterGetPrepmtAccNo(GenPostingSetup: Record "General Posting Setup", var PrepmtAccNo: Code[20])

Parameters

Name Type Description
GenPostingSetup Table Microsoft.Finance.GeneralLedger.Setup."General Posting Setup"
PrepmtAccNo Code[20]

See also