ALAppExtensions icon indicating copy to clipboard operation
ALAppExtensions copied to clipboard

[Event Change Request] codeunit 7311 "Whse. Worksheet-Create" - event

Open TheoSehrbrock opened this issue 2 years ago • 1 comments

Describe the request

We would like to handle the calculation of the "Qty. to Handle" field.

This event change happens in codeunit 7311 "Whse. Worksheet-Create" in the procedure AdjustQtyToHandle.

Current:

        ...
        if Location.Get(WhseWkshLine."Location Code") then
            if Location."Always Create Pick Line" then
                AvailQtyToPickBase := WhseWkshLine.CalcAvailableQtyBase(); // Set the Qty. to handle to the available quantity for "Always Create Pick Line" when transferring warehouse shipment lines to warehouse worksheet lines

        WhseWkshLine."Qty. to Handle" := TypeHelper.Minimum(AvailQtyToPickBase, WhseWkshLine."Qty. Outstanding");
        WhseWkshLine."Qty. to Handle (Base)" := WhseWkshLine.CalcBaseQty(WhseWkshLine."Qty. to Handle");
        ...
    end;

Requested:

        ...
        if Location.Get(WhseWkshLine."Location Code") then
            if Location."Always Create Pick Line" then
                AvailQtyToPickBase := WhseWkshLine.CalcAvailableQtyBase(); // Set the Qty. to handle to the available quantity for "Always Create Pick Line" when transferring warehouse shipment lines to warehouse worksheet lines

        OnBeforeSetQtyToHandle(WhseWkshLine, AvailQtyToPickBase ,IsHandled);
        if IsHandled then
            exit;

        WhseWkshLine."Qty. to Handle" := TypeHelper.Minimum(AvailQtyToPickBase, WhseWkshLine."Qty. Outstanding");
        WhseWkshLine."Qty. to Handle (Base)" := WhseWkshLine.CalcBaseQty(WhseWkshLine."Qty. to Handle");
        ...

Additional context

We would like to handle the calculation of the "Qty. to Handle" field. Internal work item: AB#524418

TheoSehrbrock avatar Apr 08 '24 12:04 TheoSehrbrock

This is already done. #26103

tomasevicst avatar Apr 10 '24 11:04 tomasevicst