Page 5779 Warehouse Pick, source in 29
Source29
src/Layers/W1/BaseApp/Warehouse/Activity/WarehousePick.Page.al364 lines, Copyright (c) Microsoft Corporation. MIT
// ------------------------------------------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
// ------------------------------------------------------------------------------------------------
namespace Microsoft.Warehouse.Activity;
using Microsoft.Warehouse.Activity.History;
using Microsoft.Warehouse.Comment;
using Microsoft.Warehouse.Journal;
using Microsoft.Warehouse.Setup;
using Microsoft.Warehouse.Structure;
page 5779 "Warehouse Pick"
{
Caption = 'Warehouse Pick';
InsertAllowed = false;
PageType = Document;
RefreshOnActivate = true;
SaveValues = true;
SourceTable = "Warehouse Activity Header";
SourceTableView = where(Type = const(Pick));
layout
{
area(content)
{
group(General)
{
Caption = 'General';
field("No."; Rec."No.")
{
ApplicationArea = Warehouse;
Editable = false;
trigger OnAssistEdit()
begin
if Rec.AssistEdit(xRec) then
CurrPage.Update();
end;
}
field(CurrentLocationCode; CurrentLocationCode)
{
ApplicationArea = Location;
Caption = 'Location Code';
Editable = false;
Lookup = false;
ToolTip = 'Specifies the location where the warehouse activity takes place. ';
}
field("Breakbulk Filter"; Rec."Breakbulk Filter")
{
ApplicationArea = Warehouse;
trigger OnValidate()
begin
BreakbulkFilterOnAfterValidate();
end;
}
field("Assigned User ID"; Rec."Assigned User ID")
{
ApplicationArea = Warehouse;
}
field("Assignment Date"; Rec."Assignment Date")
{
ApplicationArea = Warehouse;
Editable = false;
}
field("Assignment Time"; Rec."Assignment Time")
{
ApplicationArea = Warehouse;
Editable = false;
}
field("Sorting Method"; Rec."Sorting Method")
{
ApplicationArea = Warehouse;
trigger OnValidate()
begin
SortingMethodOnAfterValidate();
end;
}
}
part(WhseActivityLines; "Whse. Pick Subform")
{
ApplicationArea = Warehouse;
SubPageLink = "Activity Type" = field(Type),
"No." = field("No.");
SubPageView = sorting("Activity Type", "No.", "Sorting Sequence No.")
where(Breakbulk = const(false));
}
}
area(factboxes)
{
part(Control1901796907; "Item Warehouse FactBox")
{
ApplicationArea = Warehouse;
Provider = WhseActivityLines;
SubPageLink = "No." = field("Item No.");
Visible = true;
}
part(Control4; "Lot Numbers by Bin FactBox")
{
ApplicationArea = Warehouse;
Provider = WhseActivityLines;
SubPageLink = "Item No." = field("Item No."),
"Variant Code" = field("Variant Code"),
"Location Code" = field("Location Code");
Visible = false;
}
systempart(Control1900383207; Links)
{
ApplicationArea = RecordLinks;
Visible = false;
}
systempart(Control1905767507; Notes)
{
ApplicationArea = Notes;
Visible = true;
}
}
}
actions
{
area(navigation)
{
group("P&ick")
{
Caption = 'P&ick';
Image = CreateInventoryPickup;
action("Co&mments")
{
ApplicationArea = Comments;
Caption = 'Co&mments';
Image = ViewComments;
RunObject = Page "Warehouse Comment Sheet";
RunPageLink = "Table Name" = const("Whse. Activity Header"),
Type = field(Type),
"No." = field("No.");
ToolTip = 'View or add comments for the record.';
}
action("Registered Picks")
{
ApplicationArea = Warehouse;
Caption = 'Registered Picks';
Image = RegisteredDocs;
RunObject = Page "Registered Whse. Activity List";
RunPageLink = Type = field(Type),
"Whse. Activity No." = field("No.");
RunPageView = sorting("Whse. Activity No.");
ToolTip = 'View the quantities that have already been picked.';
}
}
}
area(processing)
{
group("F&unctions")
{
Caption = 'F&unctions';
Image = "Action";
action("Autofill Qty. to Handle")
{
ApplicationArea = Warehouse;
Caption = 'Autofill Qty. to Handle';
Image = AutofillQtyToHandle;
ToolTip = 'Have the system enter the outstanding quantity in the Qty. to Handle field.';
trigger OnAction()
begin
AutofillQtyToHandle();
end;
}
action("Delete Qty. to Handle")
{
ApplicationArea = Warehouse;
Caption = 'Delete Qty. to Handle';
Image = DeleteQtyToHandle;
ToolTip = 'Have the system clear the value in the Qty. To Handle field. ';
trigger OnAction()
begin
DeleteQtyToHandle();
end;
}
separator(Action32)
{
}
}
group("&Registering")
{
Caption = '&Registering';
Image = PostOrder;
action(RegisterPick)
{
ApplicationArea = Warehouse;
Caption = '&Register Pick';
Image = RegisterPick;
ShortCutKey = 'F9';
ToolTip = 'Record that the items have been picked.';
trigger OnAction()
begin
RegisterActivityYesNo();
end;
}
}
action("&Print")
{
ApplicationArea = Warehouse;
Caption = '&Print';
Ellipsis = true;
Image = Print;
ToolTip = 'Prepare to print the document. A report request window for the document opens where you can specify what to include on the print-out.';
trigger OnAction()
begin
WhseActPrint.PrintPickHeader(Rec);
end;
}
}
area(Promoted)
{
group(Category_Process)
{
Caption = 'Process', Comment = 'Generated from the PromotedActionCategories property index 1.';
actionref(RegisterPick_Promoted; RegisterPick)
{
}
actionref("&Print_Promoted"; "&Print")
{
}
group("Category_Qty. to Handle")
{
Caption = 'Qty. to Handle';
ShowAs = SplitButton;
actionref("Autofill Qty. to Handle_Promoted"; "Autofill Qty. to Handle")
{
}
actionref("Delete Qty. to Handle_Promoted"; "Delete Qty. to Handle")
{
}
}
}
group(Category_Category4)
{
Caption = 'Print/Send', Comment = 'Generated from the PromotedActionCategories property index 3.';
}
group(Category_Category5)
{
Caption = 'Pick', Comment = 'Generated from the PromotedActionCategories property index 4.';
actionref("Co&mments_Promoted"; "Co&mments")
{
}
separator(Navigate_Separator)
{
}
actionref("Registered Picks_Promoted"; "Registered Picks")
{
}
}
group(Category_Category6)
{
Caption = 'Navigate', Comment = 'Generated from the PromotedActionCategories property index 5.';
}
group(Category_Report)
{
Caption = 'Report', Comment = 'Generated from the PromotedActionCategories property index 2.';
}
}
}
trigger OnAfterGetRecord()
begin
CurrentLocationCode := Rec."Location Code";
end;
trigger OnDeleteRecord(): Boolean
begin
CurrPage.Update();
end;
trigger OnOpenPage()
var
WMSManagement: Codeunit "WMS Management";
begin
Rec.ErrorIfUserIsNotWhseEmployee();
Rec.FilterGroup(2); // set group of filters user cannot change
Rec.SetFilter("Location Code", WMSManagement.GetWarehouseEmployeeLocationFilter(UserId));
Rec.FilterGroup(0); // set filter group back to standard
SetBinFieldsVisibleOnLines(false);
end;
trigger OnAfterGetCurrRecord()
begin
SetBinFieldsVisibleOnLines(true);
end;
var
WhseActPrint: Codeunit "Warehouse Document-Print";
CurrentLocationCode: Code[10];
HideBinFields: Boolean;
LocationCodeWhenHideBinLastChecked: Code[20];
local procedure SetBinFieldsVisibleOnLines(AllowSubformUpdate: Boolean)
var
BinVisiblityNeedsUpdate: Boolean;
begin
BinVisiblityNeedsUpdate := CheckBinFieldsVisibility();
CurrPage.WhseActivityLines.Page.SetHideBinFields(HideBinFields);
if not BinVisiblityNeedsUpdate or not AllowSubFormUpdate then
exit;
CurrPage.WhseActivityLines.Page.Update(false); // Visibility on the subform must be updated via. page update, since fields are in repeater
end;
local procedure CheckBinFieldsVisibility() BinVisiblityNeedsUpdate: Boolean
var
HideBinFieldsLocal: Boolean;
begin
if (Rec."Location Code" = LocationCodeWhenHideBinLastChecked) then
exit(false);
if Rec."Location Code" <> '' then
HideBinFieldsLocal := not Rec.BinCodeMandatory();
LocationCodeWhenHideBinLastChecked := Rec."Location Code";
BinVisiblityNeedsUpdate := HideBinFieldsLocal <> HideBinFields;
HideBinFields := HideBinFieldsLocal;
end;
local procedure AutofillQtyToHandle()
begin
CurrPage.WhseActivityLines.PAGE.AutofillQtyToHandle();
end;
local procedure DeleteQtyToHandle()
begin
CurrPage.WhseActivityLines.PAGE.DeleteQtyToHandle();
end;
local procedure RegisterActivityYesNo()
begin
CurrPage.WhseActivityLines.PAGE.RegisterActivityYesNo();
end;
local procedure SortingMethodOnAfterValidate()
begin
CurrPage.Update();
end;
local procedure BreakbulkFilterOnAfterValidate()
begin
CurrPage.Update();
end;
}