Skip to content

[Event Request] Codeunit 5813 OnAfterCopyItemJnlLineFromPurchRcpt New Parameters #29690

@LidaLidaLidaLidaLida

Description

@LidaLidaLidaLidaLida

Why do you need this change?

In our module additional entries will be created while posting subcontracting. It should be possible to access the variables "TempApplyToEntryList" and "ItemRcptEntryNoFilled" while cancelling the receipt.

Describe the request

Please add two more parameters "TempApplyToEntryList" and "ItemRcptEntryNoFilled" as var to the publisher OnAfterCopyItemJnlLineFromRurchRcpt in codeunit 5813:

local procedure PostItemJnlLine(PurchRcptLine: Record "Purch. Rcpt. Line"; var DocLineNo: Integer): Integer
var
    ...
begin
    ...
        ItemRcptEntryNoFilled := PurchRcptLine."Item Rcpt. Entry No." <> 0;
        if PurchRcptLine."Prod. Order No." <> '' then
            UpdateItemJnlLineProdOrderSubcontracting(ItemJnlLine, PurchRcptLine, TempApplyToEntryList, ItemRcptEntryNoFilled);

        OnAfterCopyItemJnlLineFromPurchRcpt(ItemJnlLine, PurchRcptHeader, PurchRcptLine, WhseUndoQty, ItemLedgEntryNo, NextLineNo, TempWhseJnlLine, TempGlobalItemLedgEntry, TempGlobalItemEntryRelation, TempApplyToEntryList, ItemRcptEntryNoFilled, IsHandled);
end;
    [IntegrationEvent(false, false)]
    local procedure OnAfterCopyItemJnlLineFromPurchRcpt(var ItemJournalLine: Record "Item Journal Line"; PurchRcptHeader: Record "Purch. Rcpt. Header"; var PurchRcptLine: Record "Purch. Rcpt. Line"; var WhseUndoQty: Codeunit "Whse. Undo Quantity"; var ItemLedgEntryNo: Integer; var NextLineNo: Integer; var TempWhseJnlLine: Record "Warehouse Journal Line" temporary; var TempGlobalItemLedgerEntry: Record "Item Ledger Entry" temporary; var TempGlobalItemEntryRelation: Record "Item Entry Relation" temporary; var TempApplyToEntryList: Record "Item Ledger Entry" temporary; var ItemRcptEntryNoFilled: Boolean; var IsHandled: Boolean)
    begin
    end;

Alternatively please add at the end of the function UpdateItemJnlLineProdOrderSubcontracting a new publisher with the same parameters as the function itself.

    local procedure UpdateItemJnlLineProdOrderSubcontracting(var ItemJnlLine: Record "Item Journal Line"; var PurchRcptLine: Record "Purch. Rcpt. Line"; var TempOutputItemLedgerEntry: Record "Item Ledger Entry" temporary; var OneLinePostingUndo: Boolean)
    begin
        ...
        OnAfterUpdateItemJnlLineProdOrderSubcontracting(ItemJnlLine, PurchRcptLine, TempOutputItemLedgerEntry, OneLinePostingUndo);
    end;
    [IntegrationEvent(false, false)]
    local procedure OnAfterUpdateItemJnlLineProdOrderSubcontracting(var ItemJnlLine: Record "Item Journal Line"; var PurchRcptLine: Record "Purch. Rcpt. Line"; var TempOutputItemLedgerEntry: Record "Item Ledger Entry" temporary; var OneLinePostingUndo: Boolean)
    begin
    end;

Metadata

Metadata

Assignees

No one assigned

    Labels

    missing-infoThe issue misses information that prevents it from completion.

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions