Table of Contents

Codeunit "Payment Tolerance Management"

ID 426
Namespace: Microsoft.Finance.ReceivablesPayables

Manages payment tolerance processing for customer and vendor transactions. Handles payment discrepancies within configured tolerance limits and processes related adjustments.

Remarks

Core engine for payment tolerance validation, calculation, and posting operations. Integrates with payment application processes to handle underpayments and overpayments within tolerance. Supports both payment amount tolerances and payment discount date tolerances with VAT handling. Provides extensibility through integration events for custom tolerance logic.

Properties

Name Value
Permissions TableData Currency = r, TableData "Cust. Ledger Entry" = rim, TableData "Vendor Ledger Entry" = rim, TableData "Gen. Journal Line" = rim, TableData "General Ledger Setup" = r

Methods

PmtTolCust

Validates payment tolerance for customer ledger entries and shows tolerance warning if needed. Calculates tolerance amounts and displays confirmation dialog for tolerance processing.

procedure PmtTolCust(var CustLedgEntry: Record "Cust. Ledger Entry"): Boolean

Parameters

Name Type Description
CustLedgEntry Table Microsoft.Sales.Receivables."Cust. Ledger Entry"

Customer ledger entry to validate for payment tolerance

Returns

Type Description
Boolean

True if tolerance is accepted or not needed, false if tolerance is rejected

PmtTolVend

Validates payment tolerance for vendor ledger entries and shows tolerance warning if needed. Calculates tolerance amounts and displays confirmation dialog for tolerance processing.

procedure PmtTolVend(var VendLedgEntry: Record "Vendor Ledger Entry"): Boolean

Parameters

Name Type Description
VendLedgEntry Table Microsoft.Purchases.Payables."Vendor Ledger Entry"

Vendor ledger entry to validate for payment tolerance

Returns

Type Description
Boolean

True if tolerance is accepted or not needed, false if tolerance is rejected

PmtTolGenJnl

Validates payment tolerance for general journal line payments. Determines if tolerance warnings should be shown for customer and vendor payments.

procedure PmtTolGenJnl(var NewGenJnlLine: Record "Gen. Journal Line"): Boolean

Parameters

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

General journal line to validate for payment tolerance

Returns

Type Description
Boolean

True if tolerance is accepted or not needed, false if tolerance is rejected

PmtTolPmtReconJnl

Processes payment tolerance for bank account reconciliation lines. Determines whether payment tolerance should be applied based on account type.

procedure PmtTolPmtReconJnl(var NewBankAccReconciliationLine: Record "Bank Acc. Reconciliation Line"): Boolean

Parameters

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

Bank reconciliation line to process for payment tolerance

Returns

Type Description
Boolean

True if payment tolerance was successfully processed, false otherwise

CallPmtDiscTolWarning

Displays payment discount tolerance warning dialog and handles user response. Calculates whether payment discount tolerance should be applied based on user choice.

procedure CallPmtDiscTolWarning(PostingDate: Date; No: Code[20]; DocNo: Code[20]; CurrencyCode: Code[10]; Amount: Decimal; AppliedAmount: Decimal; PmtDiscAmount: Decimal; var RemainingAmountTest: Boolean; AccountType: Enum "Payment Tolerance Account Type"): Boolean

Parameters

Name Type Description
PostingDate Date

Posting date for the transaction

No Code[20]

Account number (customer/vendor)

DocNo Code[20]

Document number

CurrencyCode Code[10]

Currency code for the transaction

Amount Decimal

Transaction amount

AppliedAmount Decimal

Amount being applied

PmtDiscAmount Decimal

Payment discount amount

RemainingAmountTest Boolean

Returns whether remaining amount test passed

AccountType Enum Microsoft.Finance.ReceivablesPayables."Payment Tolerance Account Type"

Type of account (customer/vendor)

Returns

Type Description
Boolean

True if payment discount tolerance should be applied, false otherwise

CallPmtTolWarning

Displays payment tolerance warning dialog and processes user response. Allows user to accept or reject payment tolerance amounts for transactions.

procedure CallPmtTolWarning(PostingDate: Date; No: Code[20]; DocNo: Code[20]; CurrencyCode: Code[10]; var Amount: Decimal; AppliedAmount: Decimal; AccountType: Enum "Payment Tolerance Account Type"): Boolean

Parameters

Name Type Description
PostingDate Date

Posting date for the transaction

No Code[20]

Account number (customer/vendor)

DocNo Code[20]

Document number

CurrencyCode Code[10]

Currency code for the transaction

Amount Decimal

Transaction amount (by reference, may be modified)

AppliedAmount Decimal

Amount being applied

AccountType Enum Microsoft.Finance.ReceivablesPayables."Payment Tolerance Account Type"

Type of account (customer/vendor)

Returns

Type Description
Boolean

True if payment tolerance was accepted, false otherwise

CalcGracePeriodCVLedgEntry

Calculates and updates payment tolerance grace period for all open customer and vendor ledger entries. Processes entries that fall within the specified grace period for payment tolerance.

procedure CalcGracePeriodCVLedgEntry(PmtTolGracePeriode: DateFormula)

Parameters

Name Type Description
PmtTolGracePeriode DateFormula

Grace period date formula for payment tolerance calculation

CalcTolCustLedgEntry

Calculates payment tolerance for customer ledger entries. Updates customer ledger entries with payment tolerance amounts based on General Ledger setup and currency configuration.

procedure CalcTolCustLedgEntry(Customer: Record Customer)

Parameters

Name Type Description
Customer Table Microsoft.Sales.Customer.Customer

Customer record to calculate payment tolerance for

DelTolCustLedgEntry

Deletes payment tolerance settings for customer ledger entries. Resets payment tolerance amount and maximum payment tolerance to zero for the specified customer.

procedure DelTolCustLedgEntry(Customer: Record Customer)

Parameters

Name Type Description
Customer Table Microsoft.Sales.Customer.Customer

Customer record to delete payment tolerance for

CalcTolVendLedgEntry

Calculates payment tolerance for vendor ledger entries. Updates vendor ledger entries with payment tolerance amounts based on General Ledger setup and currency configuration.

procedure CalcTolVendLedgEntry(Vendor: Record Vendor)

Parameters

Name Type Description
Vendor Table Microsoft.Purchases.Vendor.Vendor

Vendor record to calculate payment tolerance for

DelTolVendLedgEntry

Deletes payment tolerance settings for vendor ledger entries. Resets payment tolerance amount and maximum payment tolerance to zero for the specified vendor.

procedure DelTolVendLedgEntry(Vendor: Record Vendor)

Parameters

Name Type Description
Vendor Table Microsoft.Purchases.Vendor.Vendor

Vendor record to delete payment tolerance for

DelPmtTolApllnDocNo

Deletes payment tolerance for applications with the specified document number. Removes tolerance settings from customer or vendor ledger entries based on account type in the general journal line.

procedure DelPmtTolApllnDocNo(GenJnlLine: Record "Gen. Journal Line"; DocumentNo: Code[20])

Parameters

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

General journal line containing account type and number

DocumentNo Code[20]

Document number to filter tolerance deletion

ABSMinTol

Returns the decimal value with minimum absolute value considering tolerance. Compares two decimal values and returns the one with the smaller absolute value after applying tolerance.

procedure ABSMinTol(Decimal1: Decimal; Decimal2: Decimal; Decimal1Tolerance: Decimal): Decimal

Parameters

Name Type Description
Decimal1 Decimal

First decimal value for comparison

Decimal2 Decimal

Second decimal value for comparison

Decimal1Tolerance Decimal

Tolerance amount to subtract from first decimal's absolute value

Returns

Type Description
Decimal

The decimal value with smaller absolute value after tolerance adjustment

GetApplicationRoundingPrecisionForAppliesToDoc

Gets application rounding precision for applies-to document currency operations. Determines rounding precision values based on applied entry and application currency codes.

procedure GetApplicationRoundingPrecisionForAppliesToDoc(AppliedEntryCurrencyCode: Code[10]; var ApplnRoundingPrecision: Decimal; var AmountRoundingPrecision: Decimal; ApplnCurrencyCode: Code[20])

Parameters

Name Type Description
AppliedEntryCurrencyCode Code[10]

Currency code of the applied entry

ApplnRoundingPrecision Decimal

Variable to receive application rounding precision

AmountRoundingPrecision Decimal

Variable to receive amount rounding precision

ApplnCurrencyCode Code[20]

Currency code for the application

GetAmountRoundingPrecision

Gets amount rounding precision for multi-currency applications. Determines application and amount rounding precision based on currency and multi-currency settings.

procedure GetAmountRoundingPrecision(var ApplnRoundingPrecision: Decimal; var AmountRoundingPrecision: Decimal; ApplnInMultiCurrency: Boolean; ApplnCurrencyCode: Code[20])

Parameters

Name Type Description
ApplnRoundingPrecision Decimal

Variable to receive application rounding precision

AmountRoundingPrecision Decimal

Variable to receive amount rounding precision

ApplnInMultiCurrency Boolean

Indicates if application involves multiple currencies

ApplnCurrencyCode Code[20]

Currency code for the application

CalcRemainingPmtDisc

Calculates remaining payment discount for CV ledger entry buffers. Updates payment discount amounts and remaining payment discount possible fields based on application scenarios.

procedure CalcRemainingPmtDisc(var NewCVLedgEntryBuf: Record "CV Ledger Entry Buffer"; var OldCVLedgEntryBuf: Record "CV Ledger Entry Buffer"; var OldCVLedgEntryBuf2: Record "CV Ledger Entry Buffer"; GLSetup: Record "General Ledger Setup")

Parameters

Name Type Description
NewCVLedgEntryBuf Table Microsoft.Finance.ReceivablesPayables."CV Ledger Entry Buffer"

New CV ledger entry buffer being applied

OldCVLedgEntryBuf Table Microsoft.Finance.ReceivablesPayables."CV Ledger Entry Buffer"

Existing CV ledger entry buffer being applied to

OldCVLedgEntryBuf2 Table Microsoft.Finance.ReceivablesPayables."CV Ledger Entry Buffer"

Secondary CV ledger entry buffer for calculation

GLSetup Table Microsoft.Finance.GeneralLedger.Setup."General Ledger Setup"

General Ledger Setup for payment discount configuration

CalcMaxPmtTolerance

Calculates maximum payment tolerance for a document. Determines payment tolerance amount based on document type, currency, amount, and General Ledger setup configuration.

procedure CalcMaxPmtTolerance(DocumentType: Enum "Gen. Journal Document Type"; CurrencyCode: Code[10]; Amount: Decimal; AmountLCY: Decimal; Sign: Decimal; var MaxPaymentTolerance: Decimal)

Parameters

Name Type Description
DocumentType Enum Microsoft.Finance.GeneralLedger.Journal."Gen. Journal Document Type"

Type of document for tolerance calculation

CurrencyCode Code[10]

Currency code for tolerance calculation

Amount Decimal

Document amount in original currency

AmountLCY Decimal

Document amount in local currency

Sign Decimal

Sign factor for amount calculation

MaxPaymentTolerance Decimal

Variable to receive calculated maximum payment tolerance

CheckCalcPmtDisc

Checks and calculates payment discount for CV ledger entry buffers. Validates payment discount eligibility and calculates discount amounts based on application parameters.

procedure CheckCalcPmtDisc(var NewCVLedgEntryBuf: Record "CV Ledger Entry Buffer"; var OldCVLedgEntryBuf2: Record "CV Ledger Entry Buffer"; ApplnRoundingPrecision: Decimal; CheckFilter: Boolean; CheckAmount: Boolean): Boolean

Parameters

Name Type Description
NewCVLedgEntryBuf Table Microsoft.Finance.ReceivablesPayables."CV Ledger Entry Buffer"

New CV ledger entry buffer being applied

OldCVLedgEntryBuf2 Table Microsoft.Finance.ReceivablesPayables."CV Ledger Entry Buffer"

Existing CV ledger entry buffer being applied to

ApplnRoundingPrecision Decimal

Application rounding precision for calculations

CheckFilter Boolean

Whether to apply filter validation

CheckAmount Boolean

Whether to validate amount conditions

Returns

Type Description
Boolean

True if payment discount calculation is valid, false otherwise

CheckCalcPmtDiscCVCust

Checks and calculates payment discount for CV ledger entry buffer against customer ledger entry. Validates payment discount eligibility between CV buffer and customer entries.

procedure CheckCalcPmtDiscCVCust(var NewCVLedgEntryBuf: Record "CV Ledger Entry Buffer"; var OldCustLedgEntry2: Record "Cust. Ledger Entry"; ApplnRoundingPrecision: Decimal; CheckFilter: Boolean; CheckAmount: Boolean): Boolean

Parameters

Name Type Description
NewCVLedgEntryBuf Table Microsoft.Finance.ReceivablesPayables."CV Ledger Entry Buffer"

New CV ledger entry buffer being applied

OldCustLedgEntry2 Table Microsoft.Sales.Receivables."Cust. Ledger Entry"

Customer ledger entry being applied to

ApplnRoundingPrecision Decimal

Application rounding precision for calculations

CheckFilter Boolean

Whether to apply filter validation

CheckAmount Boolean

Whether to validate amount conditions

Returns

Type Description
Boolean

True if payment discount calculation is valid, false otherwise

CheckCalcPmtDiscCust

Checks and calculates payment discount between customer ledger entries. Validates payment discount eligibility between new and existing customer ledger entries.

procedure CheckCalcPmtDiscCust(var NewCustLedgEntry: Record "Cust. Ledger Entry"; var OldCustLedgEntry2: Record "Cust. Ledger Entry"; ApplnRoundingPrecision: Decimal; CheckFilter: Boolean; CheckAmount: Boolean): Boolean

Parameters

Name Type Description
NewCustLedgEntry Table Microsoft.Sales.Receivables."Cust. Ledger Entry"

New customer ledger entry being applied

OldCustLedgEntry2 Table Microsoft.Sales.Receivables."Cust. Ledger Entry"

Existing customer ledger entry being applied to

ApplnRoundingPrecision Decimal

Application rounding precision for calculations

CheckFilter Boolean

Whether to apply filter validation

CheckAmount Boolean

Whether to validate amount conditions

Returns

Type Description
Boolean

True if payment discount calculation is valid, false otherwise

CheckCalcPmtDiscGenJnlCust

Checks and calculates payment discount for general journal line against customer ledger entry. Validates payment discount eligibility between journal line and customer entry.

procedure CheckCalcPmtDiscGenJnlCust(GenJnlLine: Record "Gen. Journal Line"; OldCustLedgEntry2: Record "Cust. Ledger Entry"; ApplnRoundingPrecision: Decimal; CheckAmount: Boolean): Boolean

Parameters

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

General journal line being processed

OldCustLedgEntry2 Table Microsoft.Sales.Receivables."Cust. Ledger Entry"

Customer ledger entry being applied to

ApplnRoundingPrecision Decimal

Application rounding precision for calculations

CheckAmount Boolean

Whether to validate amount conditions

Returns

Type Description
Boolean

True if payment discount calculation is valid, false otherwise

CheckCalcPmtDiscCVVend

Checks and calculates payment discount for CV ledger entry buffer against vendor ledger entry. Validates payment discount eligibility between CV buffer and vendor entries.

procedure CheckCalcPmtDiscCVVend(var NewCVLedgEntryBuf: Record "CV Ledger Entry Buffer"; var OldVendLedgEntry2: Record "Vendor Ledger Entry"; ApplnRoundingPrecision: Decimal; CheckFilter: Boolean; CheckAmount: Boolean): Boolean

Parameters

Name Type Description
NewCVLedgEntryBuf Table Microsoft.Finance.ReceivablesPayables."CV Ledger Entry Buffer"

New CV ledger entry buffer being applied

OldVendLedgEntry2 Table Microsoft.Purchases.Payables."Vendor Ledger Entry"

Vendor ledger entry being applied to

ApplnRoundingPrecision Decimal

Application rounding precision for calculations

CheckFilter Boolean

Whether to apply filter validation

CheckAmount Boolean

Whether to validate amount conditions

Returns

Type Description
Boolean

True if payment discount calculation is valid, false otherwise

CheckCalcPmtDiscVend

Checks and calculates payment discount between vendor ledger entries. Validates payment discount eligibility between new and existing vendor ledger entries.

procedure CheckCalcPmtDiscVend(var NewVendLedgEntry: Record "Vendor Ledger Entry"; var OldVendLedgEntry2: Record "Vendor Ledger Entry"; ApplnRoundingPrecision: Decimal; CheckFilter: Boolean; CheckAmount: Boolean): Boolean

Parameters

Name Type Description
NewVendLedgEntry Table Microsoft.Purchases.Payables."Vendor Ledger Entry"

New vendor ledger entry being applied

OldVendLedgEntry2 Table Microsoft.Purchases.Payables."Vendor Ledger Entry"

Existing vendor ledger entry being applied to

ApplnRoundingPrecision Decimal

Application rounding precision for calculations

CheckFilter Boolean

Whether to apply filter validation

CheckAmount Boolean

Whether to validate amount conditions

Returns

Type Description
Boolean

True if payment discount calculation is valid, false otherwise

CheckCalcPmtDiscGenJnlVend

Checks and calculates payment discount for general journal line against vendor ledger entry. Validates payment discount eligibility between journal line and vendor entry.

procedure CheckCalcPmtDiscGenJnlVend(GenJnlLine: Record "Gen. Journal Line"; OldVendLedgEntry2: Record "Vendor Ledger Entry"; ApplnRoundingPrecision: Decimal; CheckAmount: Boolean): Boolean

Parameters

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

General journal line being processed

OldVendLedgEntry2 Table Microsoft.Purchases.Payables."Vendor Ledger Entry"

Vendor ledger entry being applied to

ApplnRoundingPrecision Decimal

Application rounding precision for calculations

CheckAmount Boolean

Whether to validate amount conditions

Returns

Type Description
Boolean

True if payment discount calculation is valid, false otherwise

SetSuppressCommit

Sets whether database commit operations should be suppressed during payment tolerance processing. Used to control transaction behavior in batch processing scenarios.

procedure SetSuppressCommit(NewSuppressCommit: Boolean)

Parameters

Name Type Description
NewSuppressCommit Boolean

True to suppress commit operations, false to allow commits

SetSuppressWarning

Sets whether warning dialogs should be suppressed during payment tolerance processing. Used to control user interaction during automated processing scenarios.

procedure SetSuppressWarning(NewSuppressWarning: Boolean)

Parameters

Name Type Description
NewSuppressWarning Boolean

True to suppress warning dialogs, false to show warnings

CheckAccountType

Validates that the specified account type matches the account type or balance account type in the general journal line. Ensures proper account type validation for payment tolerance operations.

procedure CheckAccountType(GenJnlLine: Record "Gen. Journal Line"; AccountType: Enum "Gen. Journal Account Type")

Parameters

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

General journal line to validate

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

Expected account type to validate against

GetAppliesToID

Gets the applies-to ID from the general journal line for payment application. Returns the applies-to ID if no specific document number is specified.

procedure GetAppliesToID(GenJnlLine: Record "Gen. Journal Line"): Code[50]

Parameters

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

General journal line to extract applies-to ID from

Returns

Type Description
Code[50]

Applies-to ID if available and no document number specified, otherwise empty

Events

OnAfterCalcMaxPmtTolerance

Integration event raised after calculating maximum payment tolerance amount. Enables custom calculation of maximum tolerance amounts based on business rules.

[IntegrationEvent(False,False)]
local procedure OnAfterCalcMaxPmtTolerance(DocumentType: Option; CurrencyCode: Code[10]; Amount: Decimal; AmountLCY: Decimal; Sign: Decimal; var MaxPaymentTolerance: Decimal)

Parameters

Name Type Description
DocumentType Option

Document type determining tolerance rules

CurrencyCode Code[10]

Currency code for tolerance calculation

Amount Decimal

Document amount for tolerance calculation

AmountLCY Decimal

Document amount in local currency

Sign Decimal

Sign factor for tolerance calculation

MaxPaymentTolerance Decimal

Maximum payment tolerance amount calculated

OnAfterDelPmtTolApllnDocNo

Integration event raised after deleting payment tolerance application document number. Enables custom cleanup operations following tolerance application removal.

[IntegrationEvent(False,False)]
local procedure OnAfterDelPmtTolApllnDocNo(var GenJournalLine: Record "Gen. Journal Line"; DocumentNo: Code[20]; SuppressCommit: Boolean)

Parameters

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

General journal line being processed

DocumentNo Code[20]

Document number for tolerance application

SuppressCommit Boolean

Whether database commit should be suppressed

OnAfterPmtTolGenJnl

Integration event raised after processing payment tolerance for general journal lines. Enables custom post-processing logic following tolerance calculations.

[IntegrationEvent(False,False)]
local procedure OnAfterPmtTolGenJnl(GenJournalLine: Record "Gen. Journal Line"; SuppressCommit: Boolean; var Result: Boolean)

Parameters

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

General journal line processed for tolerance

SuppressCommit Boolean

Whether database commit should be suppressed

Result Boolean

Result of payment tolerance processing

OnAfterPmtTolPmtReconJnl

Integration event raised after processing payment tolerance for payment reconciliation journal. Enables custom processing for bank reconciliation tolerance scenarios.

[IntegrationEvent(False,False)]
local procedure OnAfterPmtTolPmtReconJnl(var BankAccReconciliationLine: Record "Bank Acc. Reconciliation Line"; SuppressCommit: Boolean; var Result: Boolean)

Parameters

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

Bank reconciliation line being processed

SuppressCommit Boolean

Whether database commit should be suppressed

Result Boolean

Result of payment tolerance processing for reconciliation

OnBeforeCalcMaxPmtTolerance

Integration event raised before calculating maximum payment tolerance amount. Enables custom tolerance calculation logic to override standard processing.

[IntegrationEvent(False,False)]
local procedure OnBeforeCalcMaxPmtTolerance(DocumentType: Option; CurrencyCode: Code[10]; Amount: Decimal; AmountLCY: Decimal; Sign: Decimal; var MaxPaymentTolerance: Decimal; var IsHandled: Boolean)

Parameters

Name Type Description
DocumentType Option

Document type determining tolerance rules

CurrencyCode Code[10]

Currency code for tolerance calculation

Amount Decimal

Document amount for tolerance calculation

AmountLCY Decimal

Document amount in local currency

Sign Decimal

Sign factor for tolerance calculation

MaxPaymentTolerance Decimal

Maximum payment tolerance amount to be calculated

IsHandled Boolean

Set to true to skip standard tolerance calculation

OnBeforeCalcRemainingPmtDisc

Integration event raised before calculating remaining payment discount for CV ledger entries. Enables custom payment discount calculation logic in tolerance scenarios.

[IntegrationEvent(False,False)]
local procedure OnBeforeCalcRemainingPmtDisc(var NewCVLedgEntryBuf: Record "CV Ledger Entry Buffer"; var OldCVLedgEntryBuf: Record "CV Ledger Entry Buffer"; var OldCVLedgEntryBuf2: Record "CV Ledger Entry Buffer"; GLSetup: Record "General Ledger Setup"; var Handled: Boolean)

Parameters

Name Type Description
NewCVLedgEntryBuf Table Microsoft.Finance.ReceivablesPayables."CV Ledger Entry Buffer"

New CV ledger entry buffer for discount calculation

OldCVLedgEntryBuf Table Microsoft.Finance.ReceivablesPayables."CV Ledger Entry Buffer"

Original CV ledger entry buffer for comparison

OldCVLedgEntryBuf2 Table Microsoft.Finance.ReceivablesPayables."CV Ledger Entry Buffer"

Second original CV ledger entry buffer for comparison

GLSetup Table Microsoft.Finance.GeneralLedger.Setup."General Ledger Setup"

General Ledger Setup for discount parameters

Handled Boolean

Set to true to skip standard discount calculation

OnBeforeCallPmtDiscTolWarning

Integration event raised before displaying payment discount tolerance warning dialog. Enables custom validation logic before showing tolerance warnings to users.

[IntegrationEvent(False,False)]
local procedure OnBeforeCallPmtDiscTolWarning(PostingDate: Date; No: Code[20]; DocNo: Code[20]; CurrencyCode: Code[10]; Amount: Decimal; AppliedAmount: Decimal; PmtDiscAmount: Decimal; var RemainingAmountTest: Boolean; AccountType: Option; var ActionType: Integer; var Result: Boolean; var IsHandled: Boolean; SuppressCommit: Boolean)

Parameters

Name Type Description
PostingDate Date

Posting date for tolerance validation

No Code[20]

Account number for tolerance processing

DocNo Code[20]

Document number for tolerance application

CurrencyCode Code[10]

Currency code for tolerance calculation

Amount Decimal

Document amount for tolerance validation

AppliedAmount Decimal

Applied amount for tolerance calculation

PmtDiscAmount Decimal

Payment discount amount involved

RemainingAmountTest Boolean

Remaining amount test result

AccountType Option

Account type (Customer or Vendor)

ActionType Integer

Action type for warning dialog

Result Boolean

Result of warning call

IsHandled Boolean

Set to true to skip standard warning display

SuppressCommit Boolean

Whether database commit should be suppressed

OnBeforeCheckCalcPmtDisc

Integration event raised before calculating and checking payment discount for CV ledger entries. Enables custom discount validation logic before standard processing.

[IntegrationEvent(False,False)]
local procedure OnBeforeCheckCalcPmtDisc(var NewCVLedgEntryBuf: Record "CV Ledger Entry Buffer"; var OldCVLedgEntryBuf2: Record "CV Ledger Entry Buffer"; ApplnRoundingPrecision: Decimal; CheckFilter: Boolean; CheckAmount: Boolean; var Handled: Boolean; var Result: Boolean)

Parameters

Name Type Description
NewCVLedgEntryBuf Table Microsoft.Finance.ReceivablesPayables."CV Ledger Entry Buffer"

New CV ledger entry buffer for discount calculation

OldCVLedgEntryBuf2 Table Microsoft.Finance.ReceivablesPayables."CV Ledger Entry Buffer"

Original CV ledger entry buffer for comparison

ApplnRoundingPrecision Decimal

Application rounding precision for calculations

CheckFilter Boolean

Whether filter validation should be performed

CheckAmount Boolean

Whether amount validation should be performed

Handled Boolean

Set to true to skip standard discount checking

Result Boolean

Result of discount check operation

OnBeforeCheckPmtDiscTolCust

Integration event raised before checking payment discount tolerance for customer ledger entries. Enables custom validation logic for customer-specific tolerance scenarios.

[IntegrationEvent(False,False)]
local procedure OnBeforeCheckPmtDiscTolCust(NewPostingdate: Date; NewDocType: Enum "Gen. Journal Document Type"; NewAmount: Decimal; OldCustLedgEntry: Record "Cust. Ledger Entry"; ApplnRoundingPrecision: Decimal; MaxPmtTolAmount: Decimal; var IsHandled: Boolean; var Result: Boolean)

Parameters

Name Type Description
NewPostingdate Date

New posting date for tolerance validation

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

New document type for tolerance checking

NewAmount Decimal

New amount for tolerance calculation

OldCustLedgEntry Table Microsoft.Sales.Receivables."Cust. Ledger Entry"

Original customer ledger entry for comparison

ApplnRoundingPrecision Decimal

Application rounding precision

MaxPmtTolAmount Decimal

Maximum payment tolerance amount allowed

IsHandled Boolean

Set to true to skip standard tolerance checking

Result Boolean

Result of tolerance check operation

OnBeforeCheckPmtDiscTolVend

Integration event raised before checking payment discount tolerance for vendor ledger entries. Enables custom validation logic for vendor-specific tolerance scenarios.

[IntegrationEvent(False,False)]
local procedure OnBeforeCheckPmtDiscTolVend(NewPostingdate: Date; NewDocType: Enum "Gen. Journal Document Type"; NewAmount: Decimal; OldVendLedgEntry: Record "Vendor Ledger Entry"; ApplnRoundingPrecision: Decimal; MaxPmtTolAmount: Decimal; var IsHandled: Boolean; var Result: Boolean)

Parameters

Name Type Description
NewPostingdate Date

New posting date for tolerance validation

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

New document type for tolerance checking

NewAmount Decimal

New amount for tolerance calculation

OldVendLedgEntry Table Microsoft.Purchases.Payables."Vendor Ledger Entry"

Original vendor ledger entry for comparison

ApplnRoundingPrecision Decimal

Application rounding precision

MaxPmtTolAmount Decimal

Maximum payment tolerance amount allowed

IsHandled Boolean

Set to true to skip standard tolerance checking

Result Boolean

Result of tolerance check operation

OnBeforeDelPmtTolApllnDocNo

Integration event raised before deleting payment tolerance application document number. Enables custom validation before tolerance application removal.

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

Parameters

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

General journal line being processed

OnBeforeRunModalPmtTolWarningCallPmtTolWarning

Integration event raised before showing modal payment tolerance warning dialog. Enables custom logic before displaying tolerance warnings to users.

[IntegrationEvent(False,False)]
local procedure OnBeforeRunModalPmtTolWarningCallPmtTolWarning(PostingDate: Date; No: Code[20]; DocNo: Code[20]; CurrencyCode: Code[10]; var Amount: Decimal; AppliedAmount: Decimal; AccountType: Option; var ActionType: Integer; var IsHandled: Boolean)

Parameters

Name Type Description
PostingDate Date

Posting date for tolerance validation

No Code[20]

Account number for tolerance processing

DocNo Code[20]

Document number for tolerance application

CurrencyCode Code[10]

Currency code for tolerance calculation

Amount Decimal

Document amount for tolerance validation

AppliedAmount Decimal

Applied amount for tolerance calculation

AccountType Option

Account type (Customer or Vendor)

ActionType Integer

Action type for warning dialog

IsHandled Boolean

Set to true to skip standard warning display

OnCalcCustApplnAmountOnBeforeUpdateCustAmountsForApplication

Integration event raised before updating customer amounts for application in tolerance scenarios. Enables custom modification of customer application amounts.

[IntegrationEvent(False,False)]
local procedure OnCalcCustApplnAmountOnBeforeUpdateCustAmountsForApplication(var AppliedCustLedgerEntry: Record "Cust. Ledger Entry"; var CustLedgerEntry: Record "Cust. Ledger Entry"; var AppliedCustLedgerEntryTemp: Record "Cust. Ledger Entry" temporary)

Parameters

Name Type Description
AppliedCustLedgerEntry Table Microsoft.Sales.Receivables."Cust. Ledger Entry"

Applied customer ledger entry for amount update

CustLedgerEntry Table Microsoft.Sales.Receivables."Cust. Ledger Entry"

Customer ledger entry being applied

AppliedCustLedgerEntryTemp Table Microsoft.Sales.Receivables."Cust. Ledger Entry"

Temporary applied customer ledger entry

OnCalcCustApplnAmountOnAfterAppliedCustLedgEntryLoop

Integration event raised after looping through applied customer ledger entries. Enables custom processing after customer application amount calculations.

[IntegrationEvent(False,False)]
local procedure OnCalcCustApplnAmountOnAfterAppliedCustLedgEntryLoop(var AppliedCustLedgerEntry: Record "Cust. Ledger Entry")

Parameters

Name Type Description
AppliedCustLedgerEntry Table Microsoft.Sales.Receivables."Cust. Ledger Entry"

Applied customer ledger entry processed

OnCalcVendApplnAmountOnBeforeUpdateVendAmountsForApplication

Integration event raised before updating vendor amounts for application in tolerance scenarios. Enables custom modification of vendor application amounts.

[IntegrationEvent(False,False)]
local procedure OnCalcVendApplnAmountOnBeforeUpdateVendAmountsForApplication(var AppliedVendorLedgerEntry: Record "Vendor Ledger Entry"; var VendoerLedgerEntry: Record "Vendor Ledger Entry"; var AppliedVendorLedgerEntryTemp: Record "Vendor Ledger Entry" temporary)

Parameters

Name Type Description
AppliedVendorLedgerEntry Table Microsoft.Purchases.Payables."Vendor Ledger Entry"

Applied vendor ledger entry for amount update

VendoerLedgerEntry Table Microsoft.Purchases.Payables."Vendor Ledger Entry"

Vendor ledger entry being applied

AppliedVendorLedgerEntryTemp Table Microsoft.Purchases.Payables."Vendor Ledger Entry"

Temporary applied vendor ledger entry

OnCalcVendApplnAmountOnAfterAppliedVendLedgEntryLoop

Integration event raised after looping through applied vendor ledger entries. Enables custom processing after vendor application amount calculations.

[IntegrationEvent(False,False)]
local procedure OnCalcVendApplnAmountOnAfterAppliedVendLedgEntryLoop(var AppliedVendorLedgerEntry: Record "Vendor Ledger Entry")

Parameters

Name Type Description
AppliedVendorLedgerEntry Table Microsoft.Purchases.Payables."Vendor Ledger Entry"

Applied vendor ledger entry processed

OnCalcTolCustLedgEntryOnBeforeModify

Integration event raised before modifying customer ledger entry during tolerance calculations. Enables custom validation or modification before tolerance updates.

[IntegrationEvent(False,False)]
local procedure OnCalcTolCustLedgEntryOnBeforeModify(var CustLedgerEntry: Record "Cust. Ledger Entry")

Parameters

Name Type Description
CustLedgerEntry Table Microsoft.Sales.Receivables."Cust. Ledger Entry"

Customer ledger entry being modified

OnCalcTolVendLedgEntryOnBeforeModify

Integration event raised before modifying vendor ledger entry during tolerance calculations. Enables custom validation or modification before tolerance updates.

[IntegrationEvent(False,False)]
local procedure OnCalcTolVendLedgEntryOnBeforeModify(var VendorLedgerEntry: Record "Vendor Ledger Entry")

Parameters

Name Type Description
VendorLedgerEntry Table Microsoft.Purchases.Payables."Vendor Ledger Entry"

Vendor ledger entry being modified

OnCalcTolCustLedgEntryOnCustLedgEntryLoopIterationStart

Integration event raised at start of customer ledger entry loop iteration during tolerance calculation. Enables custom processing or skipping of specific customer entries.

[IntegrationEvent(False,False)]
local procedure OnCalcTolCustLedgEntryOnCustLedgEntryLoopIterationStart(CustLedgerEntry: Record "Cust. Ledger Entry"; GeneralLedgerSetup: Record "General Ledger Setup"; var IsHandled: Boolean)

Parameters

Name Type Description
CustLedgerEntry Table Microsoft.Sales.Receivables."Cust. Ledger Entry"

Customer ledger entry being processed

GeneralLedgerSetup Table Microsoft.Finance.GeneralLedger.Setup."General Ledger Setup"

General Ledger Setup for tolerance parameters

IsHandled Boolean

Set to true to skip standard processing for this entry

OnGetAccountNameOnCaseElse

Integration event raised for custom account name resolution in tolerance scenarios. Enables custom account name determination for payment tolerance account types.

[IntegrationEvent(False,False)]
local procedure OnGetAccountNameOnCaseElse(AccountType: Enum "Payment Tolerance Account Type"; AccountNo: Code[20]; var Result: Text)

Parameters

Name Type Description
AccountType Enum Microsoft.Finance.ReceivablesPayables."Payment Tolerance Account Type"

Payment tolerance account type

AccountNo Code[20]

Account number for name resolution

Result Text

Custom account name result

OnPmtTolCustOnAfterSetCustEntryApplId

Integration event raised after setting customer entry application ID for payment tolerance. Enables custom handling of customer application identifiers.

[IntegrationEvent(False,False)]
local procedure OnPmtTolCustOnAfterSetCustEntryApplId(var CustLedgerEntry: Record "Cust. Ledger Entry"; var CustEntryApplId: Code[50])

Parameters

Name Type Description
CustLedgerEntry Table Microsoft.Sales.Receivables."Cust. Ledger Entry"

Customer ledger entry with application ID

CustEntryApplId Code[50]

Customer entry application identifier

OnPmtTolVendOnAfterSetVendEntryApplId

Integration event raised after setting vendor entry application ID for payment tolerance. Enables custom handling of vendor application identifiers.

[IntegrationEvent(False,False)]
local procedure OnPmtTolVendOnAfterSetVendEntryApplId(var VendorLedgerEntry: Record "Vendor Ledger Entry"; var VendEntryApplId: Code[50])

Parameters

Name Type Description
VendorLedgerEntry Table Microsoft.Purchases.Payables."Vendor Ledger Entry"

Vendor ledger entry with application ID

VendEntryApplId Code[50]

Vendor entry application identifier

OnPutCustPmtTolAmountOnAfterAppliedCustLedgEntrySetFilters

Integration event raised after setting filters on applied customer ledger entries for tolerance amounts. Enables custom filter modification for customer payment tolerance calculations.

[IntegrationEvent(False,False)]
local procedure OnPutCustPmtTolAmountOnAfterAppliedCustLedgEntrySetFilters(var AppliedCustLedgerEntry: Record "Cust. Ledger Entry"; CustLedgerEntry: Record "Cust. Ledger Entry")

Parameters

Name Type Description
AppliedCustLedgerEntry Table Microsoft.Sales.Receivables."Cust. Ledger Entry"

Applied customer ledger entry with filters

CustLedgerEntry Table Microsoft.Sales.Receivables."Cust. Ledger Entry"

Original customer ledger entry for comparison

OnPutVendPmtTolAmountOnAfterVendLedgEntrySetFilters

Integration event raised after setting filters on vendor ledger entries for tolerance amounts. Enables custom filter modification for vendor payment tolerance calculations.

[IntegrationEvent(False,False)]
local procedure OnPutVendPmtTolAmountOnAfterVendLedgEntrySetFilters(var AppliedVendorLedgerEntry: Record "Vendor Ledger Entry"; VendorLedgerEntry: Record "Vendor Ledger Entry")

Parameters

Name Type Description
AppliedVendorLedgerEntry Table Microsoft.Purchases.Payables."Vendor Ledger Entry"

Applied vendor ledger entry with filters

VendorLedgerEntry Table Microsoft.Purchases.Payables."Vendor Ledger Entry"

Original vendor ledger entry for comparison

OnCalcGracePeriodCVLedgEntryOnBeforeCustLedgEntryModify

Integration event raised before modifying customer ledger entry during grace period calculations. Enables custom validation before grace period tolerance updates.

[IntegrationEvent(False,False)]
local procedure OnCalcGracePeriodCVLedgEntryOnBeforeCustLedgEntryModify(var CustLedgerEntry: Record "Cust. Ledger Entry"; PmtTolGracePeriode: DateFormula)

Parameters

Name Type Description
CustLedgerEntry Table Microsoft.Sales.Receivables."Cust. Ledger Entry"

Customer ledger entry being modified

PmtTolGracePeriode DateFormula

Payment tolerance grace period formula

OnCalcGracePeriodCVLedgEntryOnBeforeVendLedgEntryModify

Integration event raised before modifying vendor ledger entry during grace period calculations. Enables custom validation before grace period tolerance updates.

[IntegrationEvent(False,False)]
local procedure OnCalcGracePeriodCVLedgEntryOnBeforeVendLedgEntryModify(var VendorLedgerEntry: Record "Vendor Ledger Entry"; PmtTolGracePeriode: DateFormula)

Parameters

Name Type Description
VendorLedgerEntry Table Microsoft.Purchases.Payables."Vendor Ledger Entry"

Vendor ledger entry being modified

PmtTolGracePeriode DateFormula

Payment tolerance grace period formula

OnDelTolCustLedgEntryOnBeforeModify

Integration event raised before modifying customer ledger entry during tolerance deletion. Enables custom validation before removing customer tolerance entries.

[IntegrationEvent(False,False)]
local procedure OnDelTolCustLedgEntryOnBeforeModify(var CustLedgerEntry: Record "Cust. Ledger Entry")

Parameters

Name Type Description
CustLedgerEntry Table Microsoft.Sales.Receivables."Cust. Ledger Entry"

Customer ledger entry being modified

OnDelTolVendLedgEntryOnBeforeModify

Integration event raised before modifying vendor ledger entry during tolerance deletion. Enables custom validation before removing vendor tolerance entries.

[IntegrationEvent(False,False)]
local procedure OnDelTolVendLedgEntryOnBeforeModify(var VendorLedgerEntry: Record "Vendor Ledger Entry")

Parameters

Name Type Description
VendorLedgerEntry Table Microsoft.Purchases.Payables."Vendor Ledger Entry"

Vendor ledger entry being modified

OnPmtTolGenJnlOnAfterCheckConditions

Integration event raised after checking conditions for payment tolerance in general journal processing. Enables custom post-validation logic following tolerance condition checks.

[IntegrationEvent(False,False)]
local procedure OnPmtTolGenJnlOnAfterCheckConditions(GenJournalLine: Record "Gen. Journal Line"; var SuppressCommit: Boolean; var Result: Boolean)

Parameters

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

General journal line being processed

SuppressCommit Boolean

Whether database commit should be suppressed

Result Boolean

Result of tolerance condition checking

OnCalcCustApplnAmountAfterCalcRemainingAmount

Integration event raised after calculating remaining amount in customer application scenarios. Enables custom processing following customer application amount calculations.

[IntegrationEvent(False,False)]
local procedure OnCalcCustApplnAmountAfterCalcRemainingAmount(var CustLedgerEntry: Record "Cust. Ledger Entry")

Parameters

Name Type Description
CustLedgerEntry Table Microsoft.Sales.Receivables."Cust. Ledger Entry"

Customer ledger entry with calculated remaining amount

OnCalcVendApplnAmountAfterCalcRemainingAmount

Integration event raised after calculating remaining amount in vendor application scenarios. Enables custom processing following vendor application amount calculations.

[IntegrationEvent(False,False)]
local procedure OnCalcVendApplnAmountAfterCalcRemainingAmount(var VendorLedgerEntry: Record "Vendor Ledger Entry")

Parameters

Name Type Description
VendorLedgerEntry Table Microsoft.Purchases.Payables."Vendor Ledger Entry"

Vendor ledger entry with calculated remaining amount

OnManagePaymentDiscToleranceWarningCustomerAfterCalcRemainingAmount

Integration event raised after calculating remaining amount for customer payment discount tolerance warnings. Enables custom processing following customer discount tolerance calculations.

[IntegrationEvent(False,False)]
local procedure OnManagePaymentDiscToleranceWarningCustomerAfterCalcRemainingAmount(var CustLedgerEntry: Record "Cust. Ledger Entry")

Parameters

Name Type Description
CustLedgerEntry Table Microsoft.Sales.Receivables."Cust. Ledger Entry"

Customer ledger entry with calculated remaining amount

OnManagePaymentDiscToleranceWarningVendorAfterCalcRemainingAmount

Integration event raised after calculating remaining amount for vendor payment discount tolerance warnings. Enables custom processing following vendor discount tolerance calculations.

[IntegrationEvent(False,False)]
local procedure OnManagePaymentDiscToleranceWarningVendorAfterCalcRemainingAmount(var VendorLedgerEntry: Record "Vendor Ledger Entry")

Parameters

Name Type Description
VendorLedgerEntry Table Microsoft.Purchases.Payables."Vendor Ledger Entry"

Vendor ledger entry with calculated remaining amount

OnPmtTolCustBeforeCalcCustApplnAmount

Integration event raised before calculating customer application amount in payment tolerance scenarios. Enables custom pre-processing of customer tolerance calculations.

[IntegrationEvent(False,False)]
local procedure OnPmtTolCustBeforeCalcCustApplnAmount(var CustLedgerEntry: Record "Cust. Ledger Entry")

Parameters

Name Type Description
CustLedgerEntry Table Microsoft.Sales.Receivables."Cust. Ledger Entry"

Customer ledger entry for application amount calculation

OnPmtTolVendBeforeCalcVendApplnAmount

Integration event raised before calculating vendor application amount in payment tolerance scenarios. Enables custom pre-processing of vendor tolerance calculations.

[IntegrationEvent(False,False)]
local procedure OnPmtTolVendBeforeCalcVendApplnAmount(var VendorLedgerEntry: Record "Vendor Ledger Entry")

Parameters

Name Type Description
VendorLedgerEntry Table Microsoft.Purchases.Payables."Vendor Ledger Entry"

Vendor ledger entry for application amount calculation

OnPutCustPmtTolAmountAfterCalcAmount

Integration event raised after calculating customer payment tolerance amount. Enables custom post-processing following customer tolerance amount calculations.

[IntegrationEvent(False,False)]
local procedure OnPutCustPmtTolAmountAfterCalcAmount(var CustLedgerEntry: Record "Cust. Ledger Entry")

Parameters

Name Type Description
CustLedgerEntry Table Microsoft.Sales.Receivables."Cust. Ledger Entry"

Customer ledger entry with calculated tolerance amount

OnPutVendPmtTolAmountAfterCalcAmount

Integration event raised after calculating vendor payment tolerance amount. Enables custom post-processing following vendor tolerance amount calculations.

[IntegrationEvent(False,False)]
local procedure OnPutVendPmtTolAmountAfterCalcAmount(var VendorLedgerEntry: Record "Vendor Ledger Entry")

Parameters

Name Type Description
VendorLedgerEntry Table Microsoft.Purchases.Payables."Vendor Ledger Entry"

Vendor ledger entry with calculated tolerance amount

OnUpdateCustAmountsForApplicationAfterCalcRemainingAmount

Integration event raised after calculating remaining amount for customer application updates. Enables custom processing following customer amount updates for application.

[IntegrationEvent(False,False)]
local procedure OnUpdateCustAmountsForApplicationAfterCalcRemainingAmount(var CustLedgerEntry: Record "Cust. Ledger Entry")

Parameters

Name Type Description
CustLedgerEntry Table Microsoft.Sales.Receivables."Cust. Ledger Entry"

Customer ledger entry with updated amounts for application

OnUpdateVendAmountsForApplicationAfterCalcRemainingAmount

Integration event raised after calculating remaining amount for vendor application updates. Enables custom processing following vendor amount updates for application.

[IntegrationEvent(False,False)]
local procedure OnUpdateVendAmountsForApplicationAfterCalcRemainingAmount(var VendorLedgerEntry: Record "Vendor Ledger Entry")

Parameters

Name Type Description
VendorLedgerEntry Table Microsoft.Purchases.Payables."Vendor Ledger Entry"

Vendor ledger entry with updated amounts for application

OnPmtTolCustLedgEntryOnBeforeWarning

Integration event raised before showing warning for customer payment tolerance ledger entries. Enables custom validation and modification before displaying tolerance warnings.

[IntegrationEvent(False,False)]
local procedure OnPmtTolCustLedgEntryOnBeforeWarning(var CustledgEntry: Record "Cust. Ledger Entry"; GLSetup: Record "General Ledger Setup"; var AppliedAmount: Decimal; var ApplyingAmount: Decimal; var AmounttoApply: Decimal; var PmtDiscAmount: Decimal; var MaxPmtTolAmount: Decimal; CustEntryApplID: Code[50]; var ApplnRoundingPrecision: Decimal; var IsHandled: Boolean; var Result: Boolean)

Parameters

Name Type Description
CustledgEntry Table Microsoft.Sales.Receivables."Cust. Ledger Entry"

Customer ledger entry for tolerance warning

GLSetup Table Microsoft.Finance.GeneralLedger.Setup."General Ledger Setup"

General Ledger Setup for tolerance parameters

AppliedAmount Decimal

Applied amount for tolerance calculation

ApplyingAmount Decimal

Applying amount for tolerance calculation

AmounttoApply Decimal

Amount to apply for tolerance validation

PmtDiscAmount Decimal

Payment discount amount involved

MaxPmtTolAmount Decimal

Maximum payment tolerance amount allowed

CustEntryApplID Code[50]

Customer entry application identifier

ApplnRoundingPrecision Decimal

Application rounding precision

IsHandled Boolean

Set to true to skip standard warning display

Result Boolean

Result of warning operation

OnPmtTolVendLedgEntryOnBeforeWarning

Integration event raised before showing warning for vendor payment tolerance ledger entries. Enables custom validation and modification before displaying vendor tolerance warnings.

[IntegrationEvent(False,False)]
local procedure OnPmtTolVendLedgEntryOnBeforeWarning(var VendledgEntry: Record "Vendor Ledger Entry"; GLSetup: Record "General Ledger Setup"; var AppliedAmount: Decimal; var ApplyingAmount: Decimal; var AmounttoApply: Decimal; var PmtDiscAmount: Decimal; var MaxPmtTolAmount: Decimal; VendEntryApplID: Code[50]; var ApplnRoundingPrecision: Decimal; var IsHandled: Boolean; var Result: Boolean)

Parameters

Name Type Description
VendledgEntry Table Microsoft.Purchases.Payables."Vendor Ledger Entry"

Vendor ledger entry for tolerance warning

GLSetup Table Microsoft.Finance.GeneralLedger.Setup."General Ledger Setup"

General Ledger Setup for tolerance parameters

AppliedAmount Decimal

Applied amount for tolerance calculation

ApplyingAmount Decimal

Applying amount for tolerance calculation

AmounttoApply Decimal

Amount to apply for tolerance validation

PmtDiscAmount Decimal

Payment discount amount involved

MaxPmtTolAmount Decimal

Maximum payment tolerance amount allowed

VendEntryApplID Code[50]

Vendor entry application identifier

ApplnRoundingPrecision Decimal

Application rounding precision

IsHandled Boolean

Set to true to skip standard warning display

Result Boolean

Result of warning operation

OnBeforeCheckPmtTolCust

Integration event raised before checking customer payment tolerance scenarios. Enables custom validation logic before standard customer tolerance checking.

[IntegrationEvent(False,False)]
local procedure OnBeforeCheckPmtTolCust(var NewDocType: Enum "Gen. Journal Document Type"; var OldCustLedgEntry: Record "Cust. Ledger Entry"; var IsHandled: Boolean; var Result: Boolean)

Parameters

Name Type Description
NewDocType Enum Microsoft.Finance.GeneralLedger.Journal."Gen. Journal Document Type"

New document type for tolerance checking

OldCustLedgEntry Table Microsoft.Sales.Receivables."Cust. Ledger Entry"

Original customer ledger entry for comparison

IsHandled Boolean

Set to true to skip standard tolerance checking

Result Boolean

Result of tolerance check operation

OnBeforeDelCustPmtTolAcc2

Integration event raised before deleting customer payment tolerance account entries. Enables custom validation before customer tolerance account deletion.

[IntegrationEvent(False,False)]
local procedure OnBeforeDelCustPmtTolAcc2(CustledgEntry: Record "Cust. Ledger Entry"; CustEntryApplID: Code[50]; var IsHandled: Boolean)

Parameters

Name Type Description
CustledgEntry Table Microsoft.Sales.Receivables."Cust. Ledger Entry"

Customer ledger entry for tolerance account deletion

CustEntryApplID Code[50]

Customer entry application identifier

IsHandled Boolean

Set to true to skip standard deletion process

OnBeforeGetCustPositiveFilter

Integration event raised before determining customer positive filter for payment tolerance. Enables custom logic for customer positive amount filtering.

[IntegrationEvent(False,False)]
local procedure OnBeforeGetCustPositiveFilter(DocumentType: Enum "Gen. Journal Document Type"; TempAmount: Decimal; var IsHandled: Boolean; var PositiveFilter: Boolean)

Parameters

Name Type Description
DocumentType Enum Microsoft.Finance.GeneralLedger.Journal."Gen. Journal Document Type"

Document type for filter determination

TempAmount Decimal

Temporary amount for filter calculation

IsHandled Boolean

Set to true to skip standard filter logic

PositiveFilter Boolean

Positive filter result

OnCalcGracePeriodCVLedgEntryOnAfterCustLedgEntrySetFilters

Integration event raised after setting filters on customer ledger entries during grace period calculations. Enables custom filter modification for customer grace period processing.

[IntegrationEvent(False,False)]
local procedure OnCalcGracePeriodCVLedgEntryOnAfterCustLedgEntrySetFilters(var CustLedgEntry: Record "Cust. Ledger Entry")

Parameters

Name Type Description
CustLedgEntry Table Microsoft.Sales.Receivables."Cust. Ledger Entry"

Customer ledger entry with grace period filters

OnPmtTolCustOnAfterSetPaymentTolWarning

Integration event raised after setting payment tolerance warning flag in customer scenarios. Enables custom handling of payment tolerance warnings for customers.

[IntegrationEvent(False,False)]
local procedure OnPmtTolCustOnAfterSetPaymentTolWarning(GLSetup: Record "General Ledger Setup"; var PaymentTolWarning: Boolean)

Parameters

Name Type Description
GLSetup Table Microsoft.Finance.GeneralLedger.Setup."General Ledger Setup"

General Ledger Setup for tolerance parameters

PaymentTolWarning Boolean

Payment tolerance warning flag

OnPmtTolVendOnAfterSetPaymentTolWarning

Integration event raised after setting payment tolerance warning flag in vendor scenarios. Enables custom handling of payment tolerance warnings for vendors.

[IntegrationEvent(False,False)]
local procedure OnPmtTolVendOnAfterSetPaymentTolWarning(GLSetup: Record "General Ledger Setup"; var PaymentTolWarning: Boolean)

Parameters

Name Type Description
GLSetup Table Microsoft.Finance.GeneralLedger.Setup."General Ledger Setup"

General Ledger Setup for tolerance parameters

PaymentTolWarning Boolean

Payment tolerance warning flag

OnPmtTolCustLedgEntryOnAfterSetPaymentTolWarning

Integration event raised after setting payment tolerance warning flag in customer ledger entry processing. Enables custom handling of payment tolerance warnings for customer ledger entries.

[IntegrationEvent(False,False)]
local procedure OnPmtTolCustLedgEntryOnAfterSetPaymentTolWarning(GLSetup: Record "General Ledger Setup"; var PaymentTolWarning: Boolean)

Parameters

Name Type Description
GLSetup Table Microsoft.Finance.GeneralLedger.Setup."General Ledger Setup"

General Ledger Setup for tolerance parameters

PaymentTolWarning Boolean

Payment tolerance warning flag

OnPmtTolVendLedgEntryOnAfterSetPaymentTolWarning

Integration event raised after setting payment tolerance warning flag in vendor ledger entry processing. Enables custom handling of payment tolerance warnings for vendor ledger entries.

[IntegrationEvent(False,False)]
local procedure OnPmtTolVendLedgEntryOnAfterSetPaymentTolWarning(GLSetup: Record "General Ledger Setup"; var PaymentTolWarning: Boolean)

Parameters

Name Type Description
GLSetup Table Microsoft.Finance.GeneralLedger.Setup."General Ledger Setup"

General Ledger Setup for tolerance parameters

PaymentTolWarning Boolean

Payment tolerance warning flag

See also