ALAppExtensions icon indicating copy to clipboard operation
ALAppExtensions copied to clipboard

[Event Request] table 81 "Gen. Journal Line" - OnAfterCaseTempGenJnlLineAccountType

Open RZ440 opened this issue 2 years ago • 2 comments

Describe the request

Hello, can you please add a new event OnAfterCaseTempGenJnlLineAccountType to table 81 "Gen. Journal Line"?

                        TempGenJnlLine."Account Type"::Employee:
                            begin
                                EmplLedgEntry.SetCurrentKey("Document No.");
                                EmplLedgEntry.SetRange("Document No.", xRec."Applies-to Doc. No.");
                                if not (xRec."Applies-to Doc. Type" = "Document Type"::" ") then
                                    EmplLedgEntry.SetRange("Document Type", xRec."Applies-to Doc. Type");
                                EmplLedgEntry.SetRange("Employee No.", TempGenJnlLine."Account No.");
                                EmplLedgEntry.SetRange(Open, true);
                                OnAppliesToDocNoValidateOnAfterEmplLedgEntrySetFilters(Rec, EmplLedgEntry);
                                if EmplLedgEntry.FindFirst() then begin
                                    if EmplLedgEntry."Amount to Apply" <> 0 then begin
                                        EmplLedgEntry."Amount to Apply" := 0;
                                        CODEUNIT.Run(CODEUNIT::"Empl. Entry-Edit", EmplLedgEntry);
                                    end;
                                    "Exported to Payment File" := EmplLedgEntry."Exported to Payment File";
                                end;
                            end;
                         else
                            OnAfterCaseTempGenJnlLineAccountType(Rec, xRec, TempGenJnlLine);
                    end;
                    OnAppliesToDocNoOnValidateOnAfterUpdAmtToEntries(Rec, TempGenJnlLine);
                end;
    [IntegrationEvent(false, false)]
    local procedure OnAfterCaseTempGenJnlLineAccountType(var GenJournalLine: Record "Gen. Journal Line"; var xGenJournalLine: Record "Gen. Journal Line"; var TempGenJnlLine: Record "Gen. Journal Line")
    begin
    end;

Additional context

We need an else Case for Account Type::???G/L Account??? Internal work item: AB#499106

RZ440 avatar Feb 08 '24 07:02 RZ440

✅ Successfully linked to Azure Boards work item(s):

azure-boards avatar Feb 08 '24 08:02 azure-boards

Thanks for reporting this. We agree, and we’ll publish a fix asap, either in an update for the current version or in the next major release. Please do not reply to this, as we do not monitor closed issues. If you have follow-up questions or requests, please create a new issue where you reference this one.

Build ID: 16151.

JesperSchulz avatar Feb 12 '24 13:02 JesperSchulz