microsoft / ALAppExtensions

Repository for collaboration on Microsoft AL application add-on and localization extensions for Microsoft Dynamics 365 Business Central.
MIT License
786 stars 621 forks source link

[Event request] Codeunit 90 "Purch.-Post" - ItemJnlPostLine, IsHandled, OnBeforeCheckItemReservDisruption #24587

Closed AdrijaSipaviciute closed 1 year ago

AdrijaSipaviciute commented 1 year ago

Please add the following Parameters ItemJnlPostLine, IsHandled, Event OnBeforeCheckItemReservDisruption in Codeunit 90 "Purch.-Post"

                        OnAfterPurchInvLineInsert(
                            PurchInvLine, PurchInvHeader, PurchLine, ItemLedgShptEntryNo, WhseShip, WhseReceive, SuppressCommit,
                            PurchHeader, PurchRcptHeader, TempWhseRcptHeader
                            //>><< New parameter
                            , ItemJnlPostLine
                            );
                        OnAfterPurchCrMemoLineInsert(PurchCrMemoLine, PurchCrMemoHeader, PurchLine, SuppressCommit, PurchHeader, GenJnlLineDocNo, RoundingLineInserted
                            //>><< New parameter
                            , ItemJnlPostLine
                            );
   local procedure UpdateAssosOrderPostingNos(PurchaseHeader: Record "Purchase Header") DropShipment: Boolean
<...>
        DropShipment := not TempPurchaseLine.IsEmpty();

        //>> New parameter
        OnBeforeUpdateAssosOrderPostingNos(TempPurchaseLine, PurchaseHeader, DropShipment, IsHandled);
        if IsHandled then
            exit(DropShipment);
        //<< End
        TempPurchaseLine.SetFilter("Qty. to Receive", '<>0');
    local procedure CheckItemReservDisruption(PurchLine: Record "Purchase Line")
    var
        Item: Record Item;
        ConfirmManagement: Codeunit "Confirm Management";
        AvailableQty: Decimal;
        IsHandled: Boolean;
    begin
        //>> New event
        IsHandled := false;
        OnBeforeCheckItemReservDisruption(PurchLine, IsHandled);
        if IsHandled then
            exit;
        //<< End
        with PurchLine do begin
    [IntegrationEvent(false, false)]
    //>> New parameter
    local procedure OnAfterPurchInvLineInsert(var PurchInvLine: Record "Purch. Inv. Line"; PurchInvHeader: Record "Purch. Inv. Header"; PurchLine: Record "Purchase Line"; ItemLedgShptEntryNo: Integer; WhseShip: Boolean; WhseReceive: Boolean; CommitIsSupressed: Boolean; PurchHeader: Record "Purchase Header"; PurchRcptHeader: Record "Purch. Rcpt. Header"; TempWhseRcptHeader: Record "Warehouse Receipt Header"; var ItemJnlPostLine: Codeunit "Item Jnl.-Post Line")
    begin
    end;
    [IntegrationEvent(false, false)]
    //>> New parameter
    local procedure OnAfterPurchCrMemoLineInsert(var PurchCrMemoLine: Record "Purch. Cr. Memo Line"; var PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr."; var PurchLine: Record "Purchase Line"; CommitIsSupressed: Boolean; var PurchaseHeader: Record "Purchase Header"; GenJnlLineDocNo: Code[20]; RoundingLineInserted: Boolean; VAR ItemJnlPostLine: Codeunit "Item Jnl.-Post Line")
    begin
    end;
    [IntegrationEvent(false, false)]
    //>> New parameter
    local procedure OnBeforeUpdateAssosOrderPostingNos(var TempPurchLine: Record "Purchase Line" temporary; var PurchHeader: Record "Purchase Header"; var DropShipment: Boolean; var IsHandled: Boolean)
    begin
    end;
    [IntegrationEvent(false, false)]
    local procedure OnBeforeCheckItemReservDisruption(var PurchLine: Record "Purchase Line"; var IsHandled: Boolean);
    begin
    end;
JesperSchulz commented 1 year ago

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: 13321.