Page 7375 Inventory Put-away, source in 29
Source29
src/Layers/W1/BaseApp/Warehouse/Activity/InventoryPutaway.Page.al429 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.Comment;
using Microsoft.Warehouse.InventoryDocument;
using Microsoft.Warehouse.Journal;
using Microsoft.Warehouse.Reports;
using Microsoft.Warehouse.Structure;
page 7375 "Inventory Put-away"
{
Caption = 'Inventory Put-away';
PageType = Document;
RefreshOnActivate = true;
SaveValues = true;
SourceTable = "Warehouse Activity Header";
SourceTableView = where(Type = const("Invt. Put-away"));
layout
{
area(content)
{
group(General)
{
Caption = 'General';
field("No."; Rec."No.")
{
ApplicationArea = Warehouse;
trigger OnAssistEdit()
begin
if Rec.AssistEdit(xRec) then
CurrPage.Update();
end;
}
field("Location Code"; Rec."Location Code")
{
ApplicationArea = Location;
}
field(SourceDocument; Rec."Source Document")
{
ApplicationArea = Warehouse;
DrillDown = false;
Lookup = false;
}
field("Source No."; Rec."Source No.")
{
ApplicationArea = Warehouse;
trigger OnLookup(var Text: Text): Boolean
begin
CODEUNIT.Run(CODEUNIT::"Create Inventory Put-away", Rec);
CurrPage.WhseActivityLines.PAGE.UpdateForm();
end;
trigger OnValidate()
begin
SourceNoOnAfterValidate();
end;
}
field("Destination No."; Rec."Destination No.")
{
ApplicationArea = Warehouse;
CaptionClass = Format(WMSMgt.GetCaptionClass(Rec."Destination Type", Rec."Source Document", 0));
Editable = false;
}
#pragma warning disable AA0100
field("WMSMgt.GetDestinationName(""Destination Type"",""Destination No."")"; WMSMgt.GetDestinationEntityName(Rec."Destination Type", Rec."Destination No."))
#pragma warning restore AA0100
{
ApplicationArea = Warehouse;
CaptionClass = Format(WMSMgt.GetCaptionClass(Rec."Destination Type", Rec."Source Document", 1));
Caption = 'Name';
Editable = false;
ToolTip = 'Specifies the name of the received items put away into storage.';
}
field("Posting Date"; Rec."Posting Date")
{
ApplicationArea = Warehouse;
}
field("Expected Receipt Date"; Rec."Expected Receipt Date")
{
ApplicationArea = Warehouse;
Editable = false;
}
field("External Document No."; Rec."External Document No.")
{
ApplicationArea = Warehouse;
CaptionClass = Format(WMSMgt.GetCaptionClass(Rec."Destination Type", Rec."Source Document", 2));
}
field("External Document No.2"; Rec."External Document No.2")
{
ApplicationArea = Warehouse;
CaptionClass = Format(WMSMgt.GetCaptionClass(Rec."Destination Type", Rec."Source Document", 3));
ShowMandatory = InvoiceNoMandatory;
}
field("Assigned User ID"; Rec."Assigned User ID")
{
ApplicationArea = Warehouse;
}
field("Assignment Date"; Rec."Assignment Date")
{
ApplicationArea = Warehouse;
Editable = false;
Importance = Additional;
}
field("Assignment Time"; Rec."Assignment Time")
{
ApplicationArea = Warehouse;
Editable = false;
Importance = Additional;
}
}
part(WhseActivityLines; "Invt. Put-away 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(Control7; "Lot Numbers by Bin FactBox")
{
ApplicationArea = ItemTracking;
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("Put-&away")
{
Caption = 'Put-&away';
Image = CreatePutAway;
action("Co&mments")
{
ApplicationArea = Warehouse;
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("Posted Put-aways")
{
ApplicationArea = Warehouse;
Caption = 'Posted Put-aways';
Image = PostedPutAway;
RunObject = Page "Posted Invt. Put-away List";
RunPageLink = "Invt. Put-away No." = field("No.");
RunPageView = sorting("Invt. Put-away No.");
ToolTip = 'View any quantities that have already been put away.';
}
action("Source Document")
{
ApplicationArea = Warehouse;
Caption = 'Show Source Document';
Image = "Order";
ToolTip = 'View the source document of the warehouse activity.';
trigger OnAction()
var
WMSMgt: Codeunit "WMS Management";
begin
WMSMgt.ShowSourceDocCard(Rec."Source Type", Rec."Source Subtype", Rec."Source No.");
end;
}
}
}
area(processing)
{
group("F&unctions")
{
Caption = 'F&unctions';
Image = "Action";
action(GetSourceDocument)
{
ApplicationArea = Warehouse;
Caption = '&Get Source Document';
Ellipsis = true;
Image = GetSourceDoc;
ShortCutKey = 'Ctrl+F7';
ToolTip = 'Select the source document that you want to put items away for.';
trigger OnAction()
begin
CODEUNIT.Run(CODEUNIT::"Create Inventory Put-away", Rec);
end;
}
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;
}
}
group("P&osting")
{
Caption = 'P&osting';
Image = Post;
action("P&ost")
{
ApplicationArea = Warehouse;
Caption = 'P&ost';
Ellipsis = true;
Image = PostOrder;
ShortCutKey = 'F9';
ToolTip = 'Finalize the document or journal by posting the amounts and quantities to the related accounts in your company books.';
trigger OnAction()
begin
PostPutAwayYesNo();
end;
}
action(PreviewPosting)
{
ApplicationArea = Warehouse;
Caption = 'Preview Posting';
Image = ViewPostedOrder;
ShortCutKey = 'Ctrl+Alt+F9';
ToolTip = 'Review the different types of entries that will be created when you post the document or journal.';
trigger OnAction()
begin
PreviewPostPutAway();
end;
}
action("Post and &Print")
{
ApplicationArea = Warehouse;
Caption = 'Post and &Print';
Ellipsis = true;
Image = PostPrint;
ShortCutKey = 'Shift+F9';
ToolTip = 'Finalize and prepare to print the document or journal. The values and quantities are posted to the related accounts. A report request window where you can specify what to include on the print-out.';
trigger OnAction()
begin
PostAndPrint();
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.PrintInvtPutAwayHeader(Rec, false);
end;
}
}
area(reporting)
{
action("Put-away List")
{
ApplicationArea = Warehouse;
Caption = 'Put-away List';
Image = "Report";
//The property 'PromotedCategory' can only be set if the property 'Promoted' is set to 'true'
//PromotedCategory = "Report";
RunObject = Report "Put-away List";
}
}
area(Promoted)
{
group(Category_Process)
{
Caption = 'Process', Comment = 'Generated from the PromotedActionCategories property index 1.';
group(Category_Category5)
{
Caption = 'Posting', Comment = 'Generated from the PromotedActionCategories property index 4.';
ShowAs = SplitButton;
actionref("P&ost_Promoted"; "P&ost")
{
}
actionref(PreviewPosting_Promoted; PreviewPosting)
{
}
actionref("Post and &Print_Promoted"; "Post and &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")
{
}
}
actionref("&Print_Promoted"; "&Print")
{
}
actionref(GetSourceDocument_Promoted; GetSourceDocument)
{
}
actionref(SourceDocument_Promoted; "Source Document")
{
}
}
group(Category_Category4)
{
Caption = 'Print/Send', Comment = 'Generated from the PromotedActionCategories property index 3.';
}
group(Category_Report)
{
Caption = 'Report', Comment = 'Generated from the PromotedActionCategories property index 2.';
}
}
}
trigger OnDeleteRecord(): Boolean
begin
CurrPage.Update();
end;
trigger OnNewRecord(BelowxRec: Boolean)
begin
Rec."Location Code" := Rec.GetUserLocation();
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
end;
trigger OnAfterGetCurrRecord()
begin
InvoiceNoMandatory := Rec.IsInvoiceNoMandatory();
end;
var
WMSMgt: Codeunit "WMS Management";
WhseActPrint: Codeunit "Warehouse Document-Print";
InvoiceNoMandatory: Boolean;
local procedure AutofillQtyToHandle()
begin
CurrPage.WhseActivityLines.PAGE.AutofillQtyToHandle();
end;
local procedure DeleteQtyToHandle()
begin
CurrPage.WhseActivityLines.PAGE.DeleteQtyToHandle();
end;
local procedure PostPutAwayYesNo()
begin
CurrPage.WhseActivityLines.PAGE.PostPutAwayYesNo();
end;
local procedure PreviewPostPutAway()
begin
CurrPage.WhseActivityLines.PAGE.PreviewPostPutAway();
Currpage.Update(false);
end;
local procedure PostAndPrint()
begin
CurrPage.WhseActivityLines.PAGE.PostAndPrint();
end;
local procedure SourceNoOnAfterValidate()
begin
CurrPage.WhseActivityLines.PAGE.UpdateForm();
end;
}