Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Event Request] Codeunit 367 - "CheckManagement".FinancialVoidCheck - OnBeforeConfirmFinancialVoid #27828

Open
GiangLNT56 opened this issue Dec 18, 2024 · 0 comments
Labels
event-request Request for adding an event Finance GitHub request for Finance area

Comments

@GiangLNT56
Copy link

GiangLNT56 commented Dec 18, 2024

Describe the request

Dear team,
Could we get the event OnBeforeConfirmFinancialVoid on Codeunit 367 - "CheckManagement"

procedure FinancialVoidCheck(var CheckLedgEntry: Record "Check Ledger Entry")
var
    ConfirmFinancialVoid: Page "Confirm Financial Void";
    AmountToVoid: Decimal;
    CheckAmountLCY: Decimal;
    BalanceAmountLCY: Decimal;
    IsHandled: Boolean;
begin
    IsHandled := false;
    OnBeforeFinancialVoidCheck(CheckLedgEntry, IsHandled);
    if IsHandled then
        exit;

    FinancialVoidCheckPreValidation(CheckLedgEntry);

    Clear(ConfirmFinancialVoid);

    //
    **_IsHandled := false;
    OnBeforeConfirmFinancialVoid(CheckLedgEntry, IsHandled);
    If not Handled then begin**
        ConfirmFinancialVoid.SetCheckLedgerEntry(CheckLedgEntry);
        if ConfirmFinancialVoid.RunModal() <> ACTION::Yes then
            exit;
    **end;_**
    //

    AmountToVoid := CalcAmountToVoid(CheckLedgEntry);

    InitGenJnlLine(
      GenJnlLine2, CheckLedgEntry."Document Type", CheckLedgEntry."Document No.", ConfirmFinancialVoid.GetVoidDate(),
      GenJnlLine2."Account Type"::"Bank Account", CheckLedgEntry."Bank Account No.",
      StrSubstNo(VoidingCheckMsg, CheckLedgEntry."Check No."));
...
end;
[IntegrationEvent(false, false)]
local procedure OnBeforeConfirmFinancialVoid(var CheckLedgEntry: reccord "Check Ledger Entry"; var IsHandled: Boolean);
begin
end;

Thank you in advance!

Additional context

I'd like to have logic to handle confirmation page.
Internal work item: AB#561109

@haoranpb haoranpb added event-request Request for adding an event Finance GitHub request for Finance area labels Dec 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
event-request Request for adding an event Finance GitHub request for Finance area
Projects
None yet
Development

No branches or pull requests

2 participants