ALAppExtensions icon indicating copy to clipboard operation
ALAppExtensions copied to clipboard

[Event Request] ItemJnlPostLine.Codeunit.al - OnBeforePostOutput

Open andersws opened this issue 5 years ago • 1 comments

Can you please add OnBeforePostOutput to Codeunit 22 "Item Jnl.-Post Line" in procedure PostOutput?

local procedure PostOutput()
    var
        MfgItem: Record Item;
        MfgSKU: Record "Stockkeeping Unit";
        MachCenter: Record "Machine Center";
        WorkCenter: Record "Work Center";
        CapLedgEntry: Record "Capacity Ledger Entry";
        ProdOrder: Record "Production Order";
        ProdOrderLine: Record "Prod. Order Line";
        ProdOrderRtngLine: Record "Prod. Order Routing Line";
        ItemLedgerEntry: Record "Item Ledger Entry";
        DirCostAmt: Decimal;
        IndirCostAmt: Decimal;
        ValuedQty: Decimal;
        MfgUnitCost: Decimal;
        ReTrack: Boolean;
        PostWhseJnlLine: Boolean;
        SkipPost: Boolean;
        ShouldFlushOperation: Boolean;
    begin
        with ItemJnlLine do begin
            // >>>>>>>>>
            OnBeforePostOutput(ItemJnlLine);
            // <<<<<<<<<
            if "Stop Time" <> 0 then begin
                InsertCapLedgEntry(CapLedgEntry, "Stop Time", "Stop Time");
                SkipPost := OnlyStopTime;
                OnPostOutputOnAfterInsertCapLedgEntry(ItemJnlLine, SkipPost);
                if SkipPost then
                    exit;
            end;
[IntegrationEvent(false, false)]
local procedure OnBeforePostOutput(var ItemJournalLine: Record "Item Journal Line")
begin
end;

andersws avatar Jul 27 '21 12:07 andersws

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.

JesperSchulz avatar Jul 30 '21 06:07 JesperSchulz