microsoft / ALAppExtensions

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

[Event Change Request] Codeunit 7312 "Create Pick" - OnCalcAvailableQtyOnAfterCalcReservQtyOnPicksShips #27031

Closed 1languste closed 1 month ago

1languste commented 1 month ago

Describe the request

I want to document the LineReservedQty in a custom logistics log. Therefore, I request to add LineReservedQty as a new Parameter to the OnCalcAvailableQtyOnAfterCalcReservQtyOnPicksShips event:

local procedure CalcAvailableQty(ItemNo: Code[20]; VariantCode: Code[10]): Decimal
var
    AvailableQtyBase: Decimal;
    LineReservedQty: Decimal;
    QtyReservedOnPickShip: Decimal;
    QtyOnDedicatedBins: Decimal;
    WhseSource2: Option;
begin
        // ...
        CreatePickParameters."Whse. Document"::Job:
            LineReservedQty :=
              WarehouseAvailabilityMgt.CalcLineReservedQtyOnInvt(
                Database::Job, Enum::"Job Planning Line Status"::Order.AsInteger(), CurrJobPlanningLine."Job No.",
                CurrJobPlanningLine."Job Contract Entry No.",
                CurrJobPlanningLine."Line No.", true, TempWarehouseActivityLine);
    end;

    QtyReservedOnPickShip := WarehouseAvailabilityMgt.CalcReservQtyOnPicksShips(CurrLocation.Code, ItemNo, VariantCode, TempWarehouseActivityLine);
    // NEW BEGIN
    OnCalcAvailableQtyOnAfterCalcReservQtyOnPicksShips(QtyReservedOnPickShip, LineReservedQty, CurrLocation.Code, ItemNo, VariantCode, TempWarehouseActivityLine);
    // NEW END
    QtyOnDedicatedBins := WarehouseAvailabilityMgt.CalcQtyOnDedicatedBins(CurrLocation.Code, ItemNo, VariantCode);

    exit(AvailableQtyBase + LineReservedQty + QtyReservedOnPickShip - QtyOnDedicatedBins);
end;

[IntegrationEvent(false, false)]
local procedure OnCalcAvailableQtyOnAfterCalcReservQtyOnPicksShips(var QtyReservedOnPickShip: Decimal; var LineReservedQty: Decimal; LocationCode: Code[10]; ItemNo: Code[20]; VariantCode: Code[10]; var WarehouseActivityLine: Record "Warehouse Activity Line")
begin
end;

Additional context

I want to document the LineReservedQty in a custom logistics log. Internal work item: AB#544585

JesperSchulz commented 1 month 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: 23054.