[Event Request] Codeunit 99000845 Reservation Management - function CalcReservedQtyOnPick
A request at the end of this local procedure to adjust (recalculate) the results of AllocQty & AvailQty -> params - all the fields used for calculation
**_AllocQty := WhseActivLine."Qty. Outstanding (Base)" + QtyOnInvtMovement + QtyOnOutboundBins + QtyOnSpecialBins; PickQty := WhseActivLine."Qty. Outstanding (Base)" + QtyOnInvtMovement;
AvailQty :=
Item.Inventory - PickQty - QtyOnOutboundBins - QtyOnSpecialBins -
Item."Reserved Qty. on Inventory" + QtyReservedOnPickShip;_**
Please provide the signature of the event along with the fragments of code that could define location of the event call unambiguously. The best way is to copy the actual AL code you would implement.
in codeunit reservation management :
local procedure CalcReservedQtyOnPick(var AvailQty: Decimal; var AllocQty: Decimal) ... IsHandled := false; OnCalcReservedQtyOnPickOnbeforeSetAllocQty(WhseActivLine."Qty. Outstanding (Base)", QtyOnInvtMovement, QtyOnOutboundBins, QtyOnSpecialBins, AllocQty, IsHandled); if not IsHandled then AllocQty := WhseActivLine."Qty. Outstanding (Base)" + QtyOnInvtMovement + QtyOnOutboundBins + QtyOnSpecialBins;
IsHandled := false;
OnCalcReservedQtyOnPickOnbeforeSetPickQty(WhseActivLine."Qty. Outstanding (Base)", QtyOnInvMovement, PickQty,
IsHandled);
if not IsHandled then
PickQty := WhseActivLine."Qty. Outstanding (Base)" + QtyOnInvtMovement;
IsHandled := false;
OnCalcReservedQtyOnPickOnbeforeSetAvailQty(Item.Inventory, PickQty, QtyOnOutboundBins, QtyOnSpecialBins,
Item."Reserved Qty. on Inventory", QtyReservedOnPickShip,
Item."Reserved Qty. on Inventory", QtyReservedOnPickShip, AvailQty, IsHandled)
If not IsHandled then
AvailQty := Item.Inventory - PickQty - QtyOnOutboundBins - QtyOnSpecialBins - Item."Reserved Qty. on Inventory" +
QtyReservedOnPickShip;
end;
end;
...
** 3 Events**
[IntegrationEvent(false, false)]
local procedure OnCalcReservedQtyOnPickOnbeforeSetAllocQty(WhseActivLine."Qty. Outstanding (Base)" decimal,
QtyOnInvtMovement decimal, QtyOnOutboundBins decimal, QtyOnSpecialBins decimal, var AllocQty
decimal, var IsHandled boolean);
begin
end;
[IntegrationEvent(false, false)]
local procedure OnCalcReservedQtyOnPickOnbeforeSetPickQty("WhseActivLineQtyOutstanding (Base)" decimal,
QtyOnInvMovement decimal, PickQty decimal,
QtyOnSpecialBins decimal, var PickQty decimal, var IsHandled boolean);
begin
end;
[IntegrationEvent(false, false)]
local procedure OnCalcReservedQtyOnPickOnbeforeSetAvailQty(ItemInventory decimal, PickQty decimal,
QtyOnOutboundBins decimal, QtyOnSpecialBins decimal, ItemReservedQtyonInventory decimal,
QtyReservedOnPickShip decimal, ItemReservedQtyonInventory decimal, QtyReservedOnPickShip decimal, var
AvailQty decimal, var IsHandled boolean)
begin
end;
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. We will update this issue with information about availability.