local procedure UpdateBinEmpty(NewWarehouseEntry: Record "Warehouse Entry")
var
WarehouseEntry: Record "Warehouse Entry";
IsHandled: Boolean;
begin
OnBeforeUpdateBinEmpty(NewWarehouseEntry, Bin, IsHandled);
if IsHandled then
exit;
if NewWarehouseEntry.Quantity > 0 then
ModifyBinEmpty(false)
else begin
WarehouseEntry.SetCurrentKey("Bin Code", "Location Code");
WarehouseEntry.SetRange("Bin Code", NewWarehouseEntry."Bin Code");
WarehouseEntry.SetRange("Location Code", NewWarehouseEntry."Location Code");
WarehouseEntry.CalcSums("Qty. (Base)");
ModifyBinEmpty(WarehouseEntry."Qty. (Base)" = 0);
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 290,900 Super User 2024 Season 2
Martin Dráb 229,275 Most Valuable Professional
nmaenpaa 101,156