ALAppExtensions icon indicating copy to clipboard operation
ALAppExtensions copied to clipboard

[Event Request] PAGE 234 "Apply Employee Entries" OnFindFindApplyingEntryOnAfterEmplLedgEntrySetFilters

Open aobsgit opened this issue 6 years ago • 1 comments

local procedure FindApplyingEntry()
begin
    if CalcType = CalcType::Direct then begin
        EmplEntryApplID := UserId;
        if EmplEntryApplID = '' then
            EmplEntryApplID := '***';

        EmplLedgEntry.SetCurrentKey("Employee No.", "Applies-to ID", Open);
        EmplLedgEntry.SetRange("Employee No.", "Employee No.");
        if AppliesToID = '' then
            EmplLedgEntry.SetRange("Applies-to ID", EmplEntryApplID)
        else
            EmplLedgEntry.SetRange("Applies-to ID", AppliesToID);
        EmplLedgEntry.SetRange(Open, true);
        EmplLedgEntry.SetRange("Applying Entry", true);

OnFindFindApplyingEntryOnAfterEmplLedgEntrySetFilters(Rec, EmplLedgEntry);

        if EmplLedgEntry.FindFirst then begin
            EmplLedgEntry.CalcFields(Amount, "Remaining Amount");
            TempApplyingEmplLedgEntry := EmplLedgEntry;
            SetFilter("Entry No.", '<>%1', EmplLedgEntry."Entry No.");
            ApplyingAmount := EmplLedgEntry."Remaining Amount";
            ApplnDate := EmplLedgEntry."Posting Date";
            ApplnCurrencyCode := EmplLedgEntry."Currency Code";
        end;
        CalcApplnAmount;
    end;
end;

[IntegrationEvent(false, false)] local procedure OnFindFindApplyingEntryOnAfterEmplLedgEntrySetFilters(ApplyingEmplLedgerEntry: Record "Employee Ledger Entry"; var EmplLedgerEntry: Record "Employee Ledger Entry") begin end;

aobsgit avatar Sep 30 '20 12:09 aobsgit

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. We will update this issue with information about availability.

bc-ghost avatar Oct 02 '20 06:10 bc-ghost