Skip to content

[Event Request] Codeunit 370 "Bank Acc. Reconciliation Post".HandlePaymentApplicationTransfer #27939

Open
@fridrichovsky

Description

Describe the request

Please add new event

local procedure HandlePaymentApplicationTransfer(BankAccRecon: Record "Bank Acc. Reconciliation"; PrePostingOutstdPayments: Decimal; PrePostingOutstdBankTransactions: Decimal; PrePostingGLBalance: Decimal; PrePostingTotalPositiveDifference: Decimal; PrePostingTotalNegativeDifference: Decimal)
    var
        IsHandled: Boolean;
    begin
        IsHandled := false;
        OnBeforeHandlePaymentApplicationTransfer(BankAccRecon, IsHandled);
        if IsHandled then
            exit;

        TransferToPostPmtAppln(BankAccRecon);
        //------------------------------------------------------OnHandlePaymentApplicationTransferOnBeforeTransferToBankStmt:BEGIN
        IsHandled := false;
        OnHandlePaymentApplicationTransferOnBeforeTransferToBankStmt(BankAccRecon, IsHandled);
        if not IsHandled then
            //------------------------------------------------------OnHandlePaymentApplicationTransferOnBeforeTransferToBankStmt:END
            if not BankAccRecon."Post Payments Only" then
                TransferToBankStmt(BankAccRecon, PrePostingOutstdPayments, PrePostingOutstdBankTransactions, PrePostingGLBalance, PrePostingTotalPositiveDifference, PrePostingTotalNegativeDifference);
    end;

    //------------------------------------------------------OnHandlePaymentApplicationTransferOnBeforeTransferToBankStmt:BEGIN
    [IntegrationEvent(true, false)]
    local procedure OnHandlePaymentApplicationTransferOnBeforeTransferToBankStmt(var BankAccRecon: Record "Bank Acc. Reconciliation"; var IsHandled: Boolean)
    begin
    end;
    //------------------------------------------------------OnHandlePaymentApplicationTransferOnBeforeTransferToBankStmt:END

Additional context

we need add event to skip TransferToBankStmt.

Or TransferToPostPmtAppln and TransferToBankStmt have to be global function and event "OnBeforeHandlePaymentApplicationTransfer" have to have these parameters: PrePostingOutstdPayments, PrePostingOutstdBankTransactions, PrePostingGLBalance, PrePostingTotalPositiveDifference, PrePostingTotalNegativeDifference.
Internal work item: AB#562601

Metadata

Assignees

No one assigned

    Labels

    FinanceGitHub request for Finance areaevent-requestRequest for adding an event

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions