microsoft / ALAppExtensions

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

[Event Change Request] Codeunit 7312 "Create Pick" - OnCreateTempLineOnAfterCreateTempLineWithItemTracking #27028

Closed 1languste closed 2 months ago

1languste commented 2 months ago

Describe the request

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

procedure CreateTempLine(LocationCode: Code[10]; ItemNo: Code[20]; VariantCode: Code[10]; UnitofMeasureCode: Code[10]; FromBinCode: Code[20]; ToBinCode: Code[20]; QtyPerUnitofMeasure: Decimal; QtyRoundingPrecision: Decimal; QtyRoundingPrecisionBase: Decimal; var TotalQtytoPick: Decimal; var TotalQtytoPickBase: Decimal)
    var
        WhseItemTrackingSetup: Record "Item Tracking Setup";
        QtyToPick: Decimal;
        RemTrackedQtyToPick: Decimal;
        i: Integer;
        RemTrackedQtyToPickBase: Decimal;
        QtyToPickBase: Decimal;
        QtyToTrackBase: Decimal;
        TotalItemTrackedQtyToPick: Decimal;
        TotalItemTrackedQtyToPickBase: Decimal;
        NewQtyToHandle: Decimal;
        IsHandled: Boolean;
    begin
                // ...
                SaveTempItemTrkgLines();
                Clear(TempWhseItemTrackingLine);
                WhseItemTrkgExists := false;
            end;

            IsHandled := false;
            // NEW BEGIN
            OnCreateTempLineOnAfterCreateTempLineWithItemTracking(TotalQtytoPickBase, TotalItemTrackedQtyToPickBase, HasExpiredItems, LocationCode, ItemNo, VariantCode, UnitofMeasureCode, FromBinCode, ToBinCode, QtyPerUnitofMeasure, TempWarehouseActivityLine, TempLineNo, IsHandled);
            // NEW END
            if not IsHandled then
                if TotalQtytoPickBase <> 0 then //TotalQtytoPickBase can be less than 0 if the item has been reserved for more than the available qty in the warehouse
                    if not HasExpiredItems then
                        // ...

[IntegrationEvent(false, false)]
local procedure OnCreateTempLineOnAfterCreateTempLineWithItemTracking(var TotalQtytoPickBase: Decimal; TotalItemTrackedQtyToPickBase: Decimal; var HasExpiredItems: Boolean; LocationCode: Code[10]; ItemNo: Code[20]; VariantCode: Code[10]; UnitofMeasureCode: Code[10]; FromBinCode: Code[20]; ToBinCode: Code[20]; QtyPerUnitofMeasure: Decimal; var TempWhseActivLine: Record "Warehouse Activity Line" temporary; var TempLineNo: Integer; var IsHandled: Boolean)
begin
end;

Additional context

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

JesperSchulz commented 2 months 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.