Table of Contents

Table "Applied Payment Entry"

ID 1294
Namespace: Microsoft.Bank.Reconciliation

Records payment applications linking bank statement lines to customer, vendor, and general ledger entries. This table serves as the detailed application registry for payment reconciliation processes, tracking which specific ledger entries have been matched to bank statement transactions and the amounts applied. Supports complex application scenarios including partial payments, payment discounts, and multi-currency applications.

Remarks

Key features include automatic matching confidence scoring, payment discount calculations, tolerance handling, and comprehensive validation of application logic. Integrates with customer, vendor, employee, and G/L ledger entries to provide complete payment application functionality across all account types.

Properties

Name Value
Caption Applied Payment Entry
LookupPageID Page Microsoft.Bank.Reconciliation."Payment Application"
DataClassification CustomerContent

Fields

Name Type Description
"Bank Account No." Code[20]

Bank account number for the payment reconciliation statement. Links the payment application to the specific bank account being reconciled.

"Statement No." Code[20]

Statement number identifying the bank reconciliation or payment application batch. Groups related payment applications under a single processing session.

"Statement Line No." Integer

Line number within the bank statement being applied. References the specific bank transaction line from the imported statement.

"Statement Type" Enum Microsoft.Bank.Reconciliation."Bank Acc. Rec. Stmt. Type"

Type of reconciliation statement being processed. Determines whether this is a bank reconciliation or payment application scenario.

"Account Type" Enum Microsoft.Finance.GeneralLedger.Journal."Gen. Journal Account Type"

Type of account that the payment is being applied to. Determines the ledger entry type for payment application (Customer, Vendor, G/L Account, etc.).

"Account No." Code[20]

Account number for the payment application. Specifies the customer, vendor, G/L account, or other account receiving the payment.

"Applies-to Entry No." Integer

Entry number of the specific ledger entry being applied. Links the payment to a particular customer invoice, vendor bill, or other transaction.

"Applied Amount" Decimal

Amount being applied from the bank statement to the ledger entry. Represents the portion of the bank transaction applied to this specific entry.

"Applied Pmt. Discount" Decimal

Payment discount amount applied with this payment. Calculated based on payment terms and payment timing for early payment discounts.

Quality Integer

Quality score or matching confidence indicator for the payment application. Used internally to track automatic matching quality and validation results.

"Posting Date" Date

Posting date of the applied ledger entry. Inherited from the ledger entry being applied to for reference and validation.

"Document Type" Enum Microsoft.Finance.GeneralLedger.Journal."Gen. Journal Document Type"

Document type of the applied ledger entry. Inherited from the ledger entry being applied (Invoice, Credit Memo, Payment, etc.).

"Document No." Code[20]

Document number of the applied ledger entry. Inherited from the ledger entry being applied for reference and audit purposes.

Description Text[100]

Description of the applied ledger entry. Inherited from the ledger entry being applied for display and identification purposes.

"Currency Code" Code[10]

Currency code of the applied ledger entry. Used for multi-currency payment applications and exchange rate calculations.

"Due Date" Date

Due date of the applied ledger entry. Inherited from the ledger entry being applied for payment timing analysis.

"External Document No." Code[35]

External document number of the applied ledger entry. Inherited from the ledger entry being applied for external reference and audit.

"Match Confidence" Enum Microsoft.Bank.Reconciliation."Bank Rec. Match Confidence"

Confidence level of the automatic matching algorithm for this payment application. Indicates how certain the system is that this application is correct.

SystemId Guid
SystemCreatedAt DateTime
SystemCreatedBy Guid
SystemModifiedAt DateTime
SystemModifiedBy Guid
SystemCreatedByUserName Text[50]
SystemCreatedByFullName Text[80]
SystemModifiedByUserName Text[50]
SystemModifiedByFullName Text[80]
SystemRowVersion BigInteger

Methods

SuggestAmtToApply

Calculates the suggested amount to apply based on remaining amounts and payment application logic. Takes into account amounts already applied to other statement lines, payment discounts, and document type specific rules. For credit memos, applies special logic based on account type and amount direction.

procedure SuggestAmtToApply(): Decimal

Returns

Type Description
Decimal

Decimal value representing the suggested amount to apply for this payment entry.

SuggestDiscToApply

Calculates the suggested payment discount amount to apply based on discount terms and timing. Evaluates payment discount eligibility using due dates, tolerance periods, and applied amounts.

procedure SuggestDiscToApply(UseAppliedAmt: Boolean): Decimal

Parameters

Name Type Description
UseAppliedAmt Boolean

If true, uses the applied amount for discount calculation; otherwise uses suggested amount.

Returns

Type Description
Decimal

Decimal value representing the suggested payment discount amount to apply.

GetDiscInfo

Retrieves payment discount information including due dates and remaining discount amounts. Populates payment discount details from customer or vendor ledger entries based on account type.

procedure GetDiscInfo(var PmtDiscDueDate: Date; var PmtDiscToleranceDate: Date; var RemPmtDiscPossible: Decimal)

Parameters

Name Type Description
PmtDiscDueDate Date

Payment discount due date when discount expires.

PmtDiscToleranceDate Date

Payment discount tolerance date for extended discount period.

RemPmtDiscPossible Decimal

Remaining payment discount amount available for application.

GetRemAmt

Calculates the remaining amount available for application from the target ledger entry. Returns different amounts based on account type (Customer, Vendor, Employee, Bank Account) and entry status. For unassigned entries, returns the statement line remaining amount.

procedure GetRemAmt(): Decimal

Returns

Type Description
Decimal

Decimal value representing the remaining amount available for application.

GetStmtLineRemAmtToApply

Calculates the remaining amount available on the statement line for payment application. Considers the difference amount on the bank reconciliation line and any previously applied amounts. Returns zero if the line difference is already fully allocated.

procedure GetStmtLineRemAmtToApply(): Decimal

Returns

Type Description
Decimal

Decimal value representing the remaining amount available for application on the statement line.

GetLedgEntryInfo

Retrieves and populates ledger entry information based on the applied entry number and account type. Loads relevant details from customer, vendor, employee, or bank account ledger entries into the current applied payment entry record fields.

procedure GetLedgEntryInfo()

GetAmtAppliedToOtherStmtLines

procedure GetAmtAppliedToOtherStmtLines(): Decimal

Returns

Type Description
Decimal

FilterEntryAppliedToOtherStmtLines

procedure FilterEntryAppliedToOtherStmtLines()

FilterAppliedPmtEntry

Sets filters on the applied payment entry table to match a specific bank reconciliation line. Filters by statement type, bank account number, statement number, and statement line number to retrieve all payment applications for the specified reconciliation line.

procedure FilterAppliedPmtEntry(BankAccReconLine: Record "Bank Acc. Reconciliation Line")

Parameters

Name Type Description
BankAccReconLine Table Microsoft.Bank.Reconciliation."Bank Acc. Reconciliation Line"

Bank reconciliation line record to filter applied payment entries for.

AppliedPmtEntryLinesExist

Checks if applied payment entry lines exist for a specific bank reconciliation line. Uses FilterAppliedPmtEntry to set appropriate filters and then checks for record existence.

procedure AppliedPmtEntryLinesExist(BankAccReconLine: Record "Bank Acc. Reconciliation Line"): Boolean

Parameters

Name Type Description
BankAccReconLine Table Microsoft.Bank.Reconciliation."Bank Acc. Reconciliation Line"

Bank reconciliation line record to check for applied payment entries.

Returns

Type Description
Boolean

True if applied payment entries exist for the specified reconciliation line; false otherwise.

TransferFromBankAccReconLine

Transfers key identification fields from a bank reconciliation line to this applied payment entry. Copies statement type, bank account number, statement number, and statement line number to establish the relationship between the payment entry and its source reconciliation line.

procedure TransferFromBankAccReconLine(BankAccReconLine: Record "Bank Acc. Reconciliation Line")

Parameters

Name Type Description
BankAccReconLine Table Microsoft.Bank.Reconciliation."Bank Acc. Reconciliation Line"

Bank reconciliation line record to transfer identification fields from.

ApplyFromBankStmtMatchingBuf

Creates an applied payment entry from bank statement matching buffer results and text mapper amounts. Initializes a new payment application based on automatic matching results, including account details, applied amounts, and quality scoring. Handles both regular matching and text-to-account mapping scenarios.

procedure ApplyFromBankStmtMatchingBuf(BankAccReconLine: Record "Bank Acc. Reconciliation Line"; BankStmtMatchingBuffer: Record "Bank Statement Matching Buffer"; TextMapperAmount: Decimal; EntryNo: Integer)

Parameters

Name Type Description
BankAccReconLine Table Microsoft.Bank.Reconciliation."Bank Acc. Reconciliation Line"

Bank reconciliation line that the payment is being applied to.

BankStmtMatchingBuffer Table Microsoft.Bank.Reconciliation."Bank Statement Matching Buffer"

Matching buffer containing the identified payment candidate details.

TextMapperAmount Decimal

Amount determined by text-to-account mapping rules; zero if not applicable.

EntryNo Integer

Entry number of the target ledger entry for application.

GetTotalAppliedAmountInclPmtDisc

procedure GetTotalAppliedAmountInclPmtDisc(IsDelete: Boolean): Decimal

Parameters

Name Type Description
IsDelete Boolean

Returns

Type Description
Decimal

UpdatePaymentDiscount

procedure UpdatePaymentDiscount(PaymentDiscountAmount: Decimal)

Parameters

Name Type Description
PaymentDiscountAmount Decimal

SetPaymentDiscount

procedure SetPaymentDiscount(PaymentDiscountAmount: Decimal; DifferentLineThanCurrent: Boolean)

Parameters

Name Type Description
PaymentDiscountAmount Decimal
DifferentLineThanCurrent Boolean

RemovePaymentDiscount

procedure RemovePaymentDiscount()

CalcAmountToApply

procedure CalcAmountToApply(PostingDate: Date): Decimal

Parameters

Name Type Description
PostingDate Date

Returns

Type Description
Decimal

Events

OnAfterCheckCurrencyCombination

Event raised after checking the currency combination for applied payment entries.

[IntegrationEvent(False,False)]
local procedure OnAfterCheckCurrencyCombination(var AppliedPaymentEntry: Record "Applied Payment Entry")

Parameters

Name Type Description
AppliedPaymentEntry Table Microsoft.Bank.Reconciliation."Applied Payment Entry"

The applied payment entry record being validated.

OnAfterAppliedPaymentEntryFilterOnGetTotalAppliedAmountInclPmtDisc

Event raised after filtering applied payment entries when getting the total applied amount including payment discount.

[IntegrationEvent(False,False)]
local procedure OnAfterAppliedPaymentEntryFilterOnGetTotalAppliedAmountInclPmtDisc(var AppliedPaymentEntry: Record "Applied Payment Entry"; AppliedPaymentEntryRec: Record "Applied Payment Entry")

Parameters

Name Type Description
AppliedPaymentEntry Table Microsoft.Bank.Reconciliation."Applied Payment Entry"

The applied payment entry record being filtered.

AppliedPaymentEntryRec Table Microsoft.Bank.Reconciliation."Applied Payment Entry"

The reference applied payment entry record.

OnAfterFilterEntryAppliedToOtherStmtLines

Event raised after filtering entries that are applied to other statement lines.

[IntegrationEvent(False,False)]
local procedure OnAfterFilterEntryAppliedToOtherStmtLines(var AppliedPaymentEntry: Record "Applied Payment Entry")

Parameters

Name Type Description
AppliedPaymentEntry Table Microsoft.Bank.Reconciliation."Applied Payment Entry"

The applied payment entry record being filtered.

OnAfterGetDiscInfo

Event raised after getting discount information for an applied payment entry.

[IntegrationEvent(False,False)]
local procedure OnAfterGetDiscInfo(var AppliedPaymentEntry: Record "Applied Payment Entry"; var PmtDiscDueDate: Date; var PmtDiscToleranceDate: Date; var RemPmtDiscPossible: Decimal)

Parameters

Name Type Description
AppliedPaymentEntry Table Microsoft.Bank.Reconciliation."Applied Payment Entry"

The applied payment entry record.

PmtDiscDueDate Date

The payment discount due date.

PmtDiscToleranceDate Date

The payment discount tolerance date.

RemPmtDiscPossible Decimal

The remaining payment discount possible amount.

OnBeforeCheckCurrentMatchesExistingAppln

Event raised before checking if the current match exists for an existing application.

[IntegrationEvent(False,False)]
local procedure OnBeforeCheckCurrentMatchesExistingAppln(ExistingAppliedPmtEntry: Record "Applied Payment Entry"; var IsHandled: Boolean)

Parameters

Name Type Description
ExistingAppliedPmtEntry Table Microsoft.Bank.Reconciliation."Applied Payment Entry"

The existing applied payment entry record.

IsHandled Boolean

Indicates whether the event has been handled.

OnAfterAppliedPaymentEntryFiltersGetNoOfAppliedEntries

Event raised after applying filters on applied payment entries to get the number of applied entries.

[IntegrationEvent(False,False)]
local procedure OnAfterAppliedPaymentEntryFiltersGetNoOfAppliedEntries(var AppliedPaymentEntry: Record "Applied Payment Entry"; AppliedPaymentEntryRec: Record "Applied Payment Entry")

Parameters

Name Type Description
AppliedPaymentEntry Table Microsoft.Bank.Reconciliation."Applied Payment Entry"

The applied payment entry record being filtered.

AppliedPaymentEntryRec Table Microsoft.Bank.Reconciliation."Applied Payment Entry"

The reference applied payment entry record.

OnAfterGetAcceptedPmtTolerance

Event raised after getting the accepted payment tolerance for an applied payment entry.

[IntegrationEvent(False,False)]
local procedure OnAfterGetAcceptedPmtTolerance(AppliedPaymentEntry: Record "Applied Payment Entry"; var Result: Decimal)

Parameters

Name Type Description
AppliedPaymentEntry Table Microsoft.Bank.Reconciliation."Applied Payment Entry"

The applied payment entry record.

Result Decimal

The calculated payment tolerance result.

OnAfterIsAcceptedPmtDiscTolerance

Event raised after checking if the payment discount tolerance is accepted for an applied payment entry.

[IntegrationEvent(False,False)]
local procedure OnAfterIsAcceptedPmtDiscTolerance(AppliedPaymentEntry: Record "Applied Payment Entry"; var Result: Boolean)

Parameters

Name Type Description
AppliedPaymentEntry Table Microsoft.Bank.Reconciliation."Applied Payment Entry"

The applied payment entry record.

Result Boolean

Indicates whether the payment discount tolerance is accepted.

OnAfterLookupAppliesToEntryNo

Event raised after looking up the applies-to entry number for an applied payment entry.

[IntegrationEvent(False,False)]
local procedure OnAfterLookupAppliesToEntryNo(var AppliedPaymentEntry: Record "Applied Payment Entry")

Parameters

Name Type Description
AppliedPaymentEntry Table Microsoft.Bank.Reconciliation."Applied Payment Entry"

The applied payment entry record being updated.

OnAfterGetLedgEntryInfo

Event raised after getting ledger entry information for an applied payment entry.

[IntegrationEvent(False,False)]
local procedure OnAfterGetLedgEntryInfo(var AppliedPaymentEntry: Record "Applied Payment Entry")

Parameters

Name Type Description
AppliedPaymentEntry Table Microsoft.Bank.Reconciliation."Applied Payment Entry"

The applied payment entry record being updated.

OnAfterGetRemAmt

Event raised after getting the remaining amount for an applied payment entry.

[IntegrationEvent(False,False)]
local procedure OnAfterGetRemAmt(AppliedPaymentEntry: Record "Applied Payment Entry"; var Result: Decimal)

Parameters

Name Type Description
AppliedPaymentEntry Table Microsoft.Bank.Reconciliation."Applied Payment Entry"

The applied payment entry record.

Result Decimal

The calculated remaining amount.

OnBeforeCalcAmountToApply

Event raised before calculating the amount to apply for an applied payment entry.

[IntegrationEvent(False,False)]
local procedure OnBeforeCalcAmountToApply(var AppliedPaymentEntry: Record "Applied Payment Entry"; PostingDate: Date; var AmountToApply: Decimal; var IsHandled: Boolean)

Parameters

Name Type Description
AppliedPaymentEntry Table Microsoft.Bank.Reconciliation."Applied Payment Entry"

The applied payment entry record.

PostingDate Date

The posting date for the calculation.

AmountToApply Decimal

The calculated amount to apply.

IsHandled Boolean

Indicates whether the event has been handled.

OnUpdateParentBankAccReconLineOnBeforeBankAccReconLineModify

Event raised when updating the parent bank account reconciliation line before modifying the bank account reconciliation line record.

[IntegrationEvent(False,False)]
local procedure OnUpdateParentBankAccReconLineOnBeforeBankAccReconLineModify(var AppliedPaymentEntry: Record "Applied Payment Entry"; var BankAccReconciliationLine: Record "Bank Acc. Reconciliation Line"; IsDelete: Boolean)

Parameters

Name Type Description
AppliedPaymentEntry Table Microsoft.Bank.Reconciliation."Applied Payment Entry"

The applied payment entry record.

BankAccReconciliationLine Table Microsoft.Bank.Reconciliation."Bank Acc. Reconciliation Line"

The bank account reconciliation line record being modified.

IsDelete Boolean

Indicates whether this is a delete operation.

OnApplyFromBankStmtMatchingBufOnBeforeInsert

Event raised when applying from bank statement matching buffer before inserting the applied payment entry.

[IntegrationEvent(False,False)]
local procedure OnApplyFromBankStmtMatchingBufOnBeforeInsert(BankAccReconLine: Record "Bank Acc. Reconciliation Line"; BankStmtMatchingBuffer: Record "Bank Statement Matching Buffer"; TextMapperAmount: Decimal; EntryNo: Integer; var AppliedPaymentEntry: Record "Applied Payment Entry")

Parameters

Name Type Description
BankAccReconLine Table Microsoft.Bank.Reconciliation."Bank Acc. Reconciliation Line"

The bank account reconciliation line record.

BankStmtMatchingBuffer Table Microsoft.Bank.Reconciliation."Bank Statement Matching Buffer"

The bank statement matching buffer record.

TextMapperAmount Decimal

The text mapper amount.

EntryNo Integer

The entry number.

AppliedPaymentEntry Table Microsoft.Bank.Reconciliation."Applied Payment Entry"

The applied payment entry record being inserted.

OnGetCustLedgEntryRemAmtOnBeforeCalcFields

Event raised when getting customer ledger entry remaining amount before calculating fields.

[IntegrationEvent(False,False)]
local procedure OnGetCustLedgEntryRemAmtOnBeforeCalcFields(AppliedPaymentEntry: Record "Applied Payment Entry"; var IsHandled: Boolean; var Result: Decimal)

Parameters

Name Type Description
AppliedPaymentEntry Table Microsoft.Bank.Reconciliation."Applied Payment Entry"

The applied payment entry record.

IsHandled Boolean

Indicates whether the event has been handled.

Result Decimal

The remaining amount result if handled.

OnGetVendLedgEntryRemAmtOnBeforeCalcFields

Event raised when getting vendor ledger entry remaining amount before calculating fields.

[IntegrationEvent(False,False)]
local procedure OnGetVendLedgEntryRemAmtOnBeforeCalcFields(AppliedPaymentEntry: Record "Applied Payment Entry"; var IsHandled: Boolean; var Result: Decimal)

Parameters

Name Type Description
AppliedPaymentEntry Table Microsoft.Bank.Reconciliation."Applied Payment Entry"

The applied payment entry record.

IsHandled Boolean

Indicates whether the event has been handled.

Result Decimal

The remaining amount result if handled.

OnBeforeSuggestAmtToApply

[IntegrationEvent(False,False)]
local procedure OnBeforeSuggestAmtToApply(var AppliedPaymentEntry: Record "Applied Payment Entry"; var IsHandled: Boolean; var Result: Decimal)

Parameters

Name Type Description
AppliedPaymentEntry Table Microsoft.Bank.Reconciliation."Applied Payment Entry"
IsHandled Boolean
Result Decimal

OnBeforeAppliesToEntryNoLookup

[IntegrationEvent(False,False)]
local procedure OnBeforeAppliesToEntryNoLookup(var AppliedPaymentEntry: Record "Applied Payment Entry"; var IsHandled: Boolean)

Parameters

Name Type Description
AppliedPaymentEntry Table Microsoft.Bank.Reconciliation."Applied Payment Entry"
IsHandled Boolean

See also