Table "Ledger Entry Matching Buffer"
Temporary buffer table for managing ledger entries during payment application and bank reconciliation matching. This table provides a standardized interface for working with different types of ledger entries (customer, vendor, employee, bank account) during matching algorithms. Enables efficient processing of large datasets by consolidating relevant fields from various ledger entry tables into a single, optimized structure for matching operations. Supports payment discount calculations, tolerance handling, and complex matching scenarios.
Remarks
Key features include multi-ledger-type support, payment discount integration, remaining amount calculations, document reference matching, and optimized data access patterns. The table abstracts differences between customer, vendor, employee, and bank account ledger entries, providing unified matching logic while preserving specific characteristics of each entry type. Enables sophisticated matching algorithms with performance optimization for large transaction volumes and complex application scenarios.
Properties
| Name | Value |
|---|---|
| Caption | Ledger Entry Matching Buffer |
| ReplicateData | False |
| TableType | Temporary |
| DataClassification | CustomerContent |
Fields
| Name | Type | Description |
|---|---|---|
| "Entry No." | Integer | Entry number from the source ledger entry table. Provides unique identification and enables linking back to original ledger records. |
| "Account Type" | Enum Microsoft.Bank.Reconciliation."Matching Ledger Account Type" | Type of account that this ledger entry belongs to. Determines the source table and application logic for matching operations. |
| "Account No." | Code[20] | Account number for the ledger entry. Identifies the specific customer, vendor, employee, or bank account for the transaction. |
| "Bal. Account Type" | Enum Microsoft.Finance.GeneralLedger.Journal."Gen. Journal Account Type" | Balancing account type for the original ledger entry. Used for advanced matching scenarios and application logic validation. |
| "Bal. Account No." | Code[20] | Balancing account number for the original ledger entry. Provides additional context for matching and validation processes. |
| Description | Text[100] | Description text from the original ledger entry. Used for text-based matching and user identification during manual application. |
| "Document Type" | Enum Microsoft.Finance.GeneralLedger.Journal."Gen. Journal Document Type" | Document type from the original ledger entry. Determines application behavior and business logic for different transaction types. |
| "Due Date" | Date | Due date for payment or collection from the original ledger entry. Used for payment discount calculations and aging analysis during matching. |
| "Posting Date" | Date | Original posting date of the ledger entry. Used for date-based matching algorithms and chronological validation. |
| "Document No." | Code[20] | Document number from the original ledger entry. Primary field for document reference matching with bank statement data. |
| "External Document No." | Code[35] | External document number from the original ledger entry. Used for matching with external references in bank statement transactions. |
| "Payment Reference" | Code[50] | Payment reference from the original ledger entry. Used for payment identification and reference-based matching algorithms. |
| "Remaining Amount" | Decimal | Remaining open amount for the ledger entry. Core field for amount-based matching and application calculations. |
| "Remaining Amt. Incl. Discount" | Decimal | Remaining amount including available payment discounts. Used for payment discount calculations and tolerance matching. |
| "Pmt. Discount Due Date" | Date | Due date for payment discount from the original ledger entry. Determines payment discount eligibility during application processes. |
| 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
InsertFromCustomerLedgerEntry
Inserts a customer ledger entry into the matching buffer with appropriate field mapping. Transfers relevant fields from customer ledger entry records into the standardized buffer format, handling currency conversions, payment discount calculations, and remaining amount computations.
procedure InsertFromCustomerLedgerEntry(CustLedgerEntry: Record "Cust. Ledger Entry"; UseLCYAmounts: Boolean; var UsePaymentDiscounts: Boolean)
Parameters
| Name | Type | Description |
|---|---|---|
| CustLedgerEntry | Table Microsoft.Sales.Receivables."Cust. Ledger Entry" |
Customer ledger entry to insert into the matching buffer. |
| UseLCYAmounts | Boolean |
Whether to use local currency amounts for matching calculations. |
| UsePaymentDiscounts | Boolean |
Whether to include payment discounts in remaining amount calculations. |
InsertFromVendorLedgerEntry
procedure InsertFromVendorLedgerEntry(VendorLedgerEntry: Record "Vendor Ledger Entry"; UseLCYAmounts: Boolean; var UsePaymentDiscounts: Boolean)
Parameters
| Name | Type | Description |
|---|---|---|
| VendorLedgerEntry | Table Microsoft.Purchases.Payables."Vendor Ledger Entry" | |
| UseLCYAmounts | Boolean | |
| UsePaymentDiscounts | Boolean |
InsertFromEmployeeLedgerEntry
procedure InsertFromEmployeeLedgerEntry(EmployeeLedgerEntry: Record "Employee Ledger Entry")
Parameters
| Name | Type | Description |
|---|---|---|
| EmployeeLedgerEntry | Table Microsoft.HumanResources.Payables."Employee Ledger Entry" |
InsertFromEmployeeLedgerEntry
procedure InsertFromEmployeeLedgerEntry(EmployeeLedgerEntry: Record "Employee Ledger Entry"; UseLCYAmounts: Boolean)
Parameters
| Name | Type | Description |
|---|---|---|
| EmployeeLedgerEntry | Table Microsoft.HumanResources.Payables."Employee Ledger Entry" | |
| UseLCYAmounts | Boolean |
InsertFromBankAccLedgerEntry
procedure InsertFromBankAccLedgerEntry(BankAccountLedgerEntry: Record "Bank Account Ledger Entry")
Parameters
| Name | Type | Description |
|---|---|---|
| BankAccountLedgerEntry | Table Microsoft.Bank.Ledger."Bank Account Ledger Entry" |
GetApplicableRemainingAmount
procedure GetApplicableRemainingAmount(BankAccReconciliationLine: Record "Bank Acc. Reconciliation Line"; UsePaymentDiscounts: Boolean): Decimal
Parameters
| Name | Type | Description |
|---|---|---|
| BankAccReconciliationLine | Table Microsoft.Bank.Reconciliation."Bank Acc. Reconciliation Line" | |
| UsePaymentDiscounts | Boolean |
Returns
| Type | Description |
|---|---|
| Decimal |
GetNoOfLedgerEntriesWithinRange
procedure GetNoOfLedgerEntriesWithinRange(MinAmount: Decimal; MaxAmount: Decimal; TransactionDate: Date; UsePaymentDiscounts: Boolean): Integer
Parameters
| Name | Type | Description |
|---|---|---|
| MinAmount | Decimal | |
| MaxAmount | Decimal | |
| TransactionDate | Date | |
| UsePaymentDiscounts | Boolean |
Returns
| Type | Description |
|---|---|
| Integer |
GetNoOfLedgerEntriesOutsideRange
procedure GetNoOfLedgerEntriesOutsideRange(MinAmount: Decimal; MaxAmount: Decimal; TransactionDate: Date; UsePaymentDiscounts: Boolean): Integer
Parameters
| Name | Type | Description |
|---|---|---|
| MinAmount | Decimal | |
| MaxAmount | Decimal | |
| TransactionDate | Date | |
| UsePaymentDiscounts | Boolean |
Returns
| Type | Description |
|---|---|
| Integer |
Events
OnBeforeInsertFromCustomerLedgerEntry
[IntegrationEvent(False,False)]
local procedure OnBeforeInsertFromCustomerLedgerEntry(var LedgerEntryMatchingBuffer: Record "Ledger Entry Matching Buffer"; CustLedgerEntry: Record "Cust. Ledger Entry")
Parameters
| Name | Type | Description |
|---|---|---|
| LedgerEntryMatchingBuffer | Table Microsoft.Bank.Reconciliation."Ledger Entry Matching Buffer" | |
| CustLedgerEntry | Table Microsoft.Sales.Receivables."Cust. Ledger Entry" |
OnBeforeInsertFromEmployeeLedgerEntry
[IntegrationEvent(False,False)]
local procedure OnBeforeInsertFromEmployeeLedgerEntry(var LedgerEntryMatchingBuffer: Record "Ledger Entry Matching Buffer"; EmployeeLedgerEntry: Record "Employee Ledger Entry")
Parameters
| Name | Type | Description |
|---|---|---|
| LedgerEntryMatchingBuffer | Table Microsoft.Bank.Reconciliation."Ledger Entry Matching Buffer" | |
| EmployeeLedgerEntry | Table Microsoft.HumanResources.Payables."Employee Ledger Entry" |
OnBeforeInsertFromVendorLedgerEntry
[IntegrationEvent(False,False)]
local procedure OnBeforeInsertFromVendorLedgerEntry(var LedgerEntryMatchingBuffer: Record "Ledger Entry Matching Buffer"; VendorLedgerEntry: Record "Vendor Ledger Entry")
Parameters
| Name | Type | Description |
|---|---|---|
| LedgerEntryMatchingBuffer | Table Microsoft.Bank.Reconciliation."Ledger Entry Matching Buffer" | |
| VendorLedgerEntry | Table Microsoft.Purchases.Payables."Vendor Ledger Entry" |
OnBeforeInsertFromBankAccountLedgerEntry
[IntegrationEvent(False,False)]
local procedure OnBeforeInsertFromBankAccountLedgerEntry(var LedgerEntryMatchingBuffer: Record "Ledger Entry Matching Buffer"; BankAccountLedgerEntry: Record "Bank Account Ledger Entry")
Parameters
| Name | Type | Description |
|---|---|---|
| LedgerEntryMatchingBuffer | Table Microsoft.Bank.Reconciliation."Ledger Entry Matching Buffer" | |
| BankAccountLedgerEntry | Table Microsoft.Bank.Ledger."Bank Account Ledger Entry" |
OnBeforeProcedureInsertFromVendorLedgerEntry
[IntegrationEvent(False,False)]
local procedure OnBeforeProcedureInsertFromVendorLedgerEntry(var VendorLedgerEntry: Record "Vendor Ledger Entry")
Parameters
| Name | Type | Description |
|---|---|---|
| VendorLedgerEntry | Table Microsoft.Purchases.Payables."Vendor Ledger Entry" |
OnBeforeProcedureInsertFromCustomerLedgerEntry
[IntegrationEvent(False,False)]
local procedure OnBeforeProcedureInsertFromCustomerLedgerEntry(var CustLedgerEntry: Record "Cust. Ledger Entry")
Parameters
| Name | Type | Description |
|---|---|---|
| CustLedgerEntry | Table Microsoft.Sales.Receivables."Cust. Ledger Entry" |