Page 7378 Invt. Pick Subform, source in 29
Source29
src/Layers/W1/BaseApp/Warehouse/Activity/InvtPickSubform.Page.al540 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.Inventory.Availability;
using Microsoft.Inventory.Location;
using Microsoft.Inventory.Tracking;
using Microsoft.Warehouse.Journal;
using Microsoft.Warehouse.Structure;
page 7378 "Invt. Pick Subform"
{
Caption = 'Lines';
InsertAllowed = false;
LinksAllowed = false;
MultipleNewLines = true;
PageType = ListPart;
SourceTable = "Warehouse Activity Line";
SourceTableView = where("Activity Type" = const("Invt. Pick"));
layout
{
area(content)
{
repeater(Control1)
{
ShowCaption = false;
field("Action Type"; Rec."Action Type")
{
ApplicationArea = Warehouse;
Visible = false;
}
field("Source Document"; Rec."Source Document")
{
ApplicationArea = Warehouse;
BlankZero = true;
Visible = false;
}
field("Source No."; Rec."Source No.")
{
ApplicationArea = Warehouse;
Visible = false;
}
field("Item No."; Rec."Item No.")
{
ApplicationArea = Warehouse;
}
field("Variant Code"; Rec."Variant Code")
{
ApplicationArea = Planning;
Visible = false;
}
field(Description; Rec.Description)
{
ApplicationArea = Warehouse;
}
field("Serial No."; Rec."Serial No.")
{
ApplicationArea = ItemTracking;
Visible = false;
trigger OnValidate()
begin
SerialNoOnAfterValidate();
end;
}
field("Serial No. Blocked"; Rec."Serial No. Blocked")
{
ApplicationArea = ItemTracking;
Visible = false;
}
field("Lot No."; Rec."Lot No.")
{
ApplicationArea = ItemTracking;
Visible = false;
trigger OnValidate()
begin
LotNoOnAfterValidate();
end;
}
field("Lot No. Blocked"; Rec."Lot No. Blocked")
{
ApplicationArea = ItemTracking;
Visible = false;
}
field("Package No."; Rec."Package No.")
{
ApplicationArea = ItemTracking;
Visible = false;
}
field("Expiration Date"; Rec."Expiration Date")
{
ApplicationArea = ItemTracking;
Editable = false;
Visible = false;
}
field("Location Code"; Rec."Location Code")
{
ApplicationArea = Location;
Visible = false;
}
field("Bin Code"; Rec."Bin Code")
{
ApplicationArea = Warehouse;
trigger OnValidate()
begin
BinCodeOnAfterValidate();
end;
}
field("Shelf No."; Rec."Shelf No.")
{
ApplicationArea = Warehouse;
Visible = false;
}
field(Quantity; Rec.Quantity)
{
ApplicationArea = Warehouse;
Editable = false;
}
field("Qty. (Base)"; Rec."Qty. (Base)")
{
ApplicationArea = Warehouse;
ToolTip = 'Specifies the quantity of the item to be handled, in the base unit of measure.';
Visible = false;
}
field("Qty. to Handle"; Rec."Qty. to Handle")
{
ApplicationArea = Warehouse;
trigger OnValidate()
begin
QtytoHandleOnAfterValidate();
end;
}
field("Qty. Handled"; Rec."Qty. Handled")
{
ApplicationArea = Warehouse;
Visible = true;
}
field("Qty. to Handle (Base)"; Rec."Qty. to Handle (Base)")
{
ApplicationArea = Warehouse;
ToolTip = 'Specifies the quantity of items to be handled in this warehouse activity.';
Visible = false;
}
field("Qty. Handled (Base)"; Rec."Qty. Handled (Base)")
{
ApplicationArea = Warehouse;
ToolTip = 'Specifies the number of items on the line that have been handled in this warehouse activity.';
Visible = false;
}
field("Qty. Outstanding"; Rec."Qty. Outstanding")
{
ApplicationArea = Warehouse;
Visible = true;
}
field("Qty. Outstanding (Base)"; Rec."Qty. Outstanding (Base)")
{
ApplicationArea = Warehouse;
ToolTip = 'Specifies the number of items, expressed in the base unit of measure, that have not yet been handled for this warehouse activity line.';
Visible = false;
}
field("Due Date"; Rec."Due Date")
{
ApplicationArea = Warehouse;
Visible = false;
}
field("Unit of Measure Code"; Rec."Unit of Measure Code")
{
ApplicationArea = Warehouse;
}
field("Qty. per Unit of Measure"; Rec."Qty. per Unit of Measure")
{
ApplicationArea = Warehouse;
Visible = false;
}
field("Shipping Advice"; Rec."Shipping Advice")
{
ApplicationArea = Warehouse;
ToolTip = 'Specifies the shipping advice, informing whether partial deliveries are acceptable, copied from the source document header.';
Visible = false;
}
field("Destination Type"; Rec."Destination Type")
{
ApplicationArea = Warehouse;
Visible = false;
}
field("Destination No."; Rec."Destination No.")
{
ApplicationArea = Warehouse;
Visible = false;
}
field("Shipping Agent Code"; Rec."Shipping Agent Code")
{
ApplicationArea = Warehouse;
Visible = false;
}
field("Shipping Agent Service Code"; Rec."Shipping Agent Service Code")
{
ApplicationArea = Warehouse;
Visible = false;
}
field("Shipment Method Code"; Rec."Shipment Method Code")
{
ApplicationArea = Warehouse;
Visible = false;
}
field("Special Equipment Code"; Rec."Special Equipment Code")
{
ApplicationArea = Warehouse;
Visible = false;
}
field("Assemble to Order"; Rec."Assemble to Order")
{
ApplicationArea = Assembly;
Visible = false;
}
}
}
}
actions
{
area(processing)
{
group("F&unctions")
{
Caption = 'F&unctions';
Image = "Action";
action(SplitWhseActivityLine)
{
ApplicationArea = Warehouse;
Caption = '&Split Line';
Image = Split;
ShortCutKey = 'Ctrl+F11';
ToolTip = 'Enable that the items can be taken or placed in more than one bin, for example, because the quantity in the suggested bin is insufficient to pick or move or there is not enough room to put away the required quantity.';
trigger OnAction()
begin
CallSplitLine();
end;
}
action(FillQtyToHandle)
{
ApplicationArea = Warehouse;
Caption = 'Autofill Qty. To Handle';
Image = AutofillQtyToHandle;
Gesture = LeftSwipe;
ToolTip = 'Have the system enter the outstanding quantity in the Qty. to Handle field.';
Scope = Repeater;
trigger OnAction()
begin
Rec.AutofillQtyToHandleOnLine(Rec);
end;
}
action(ResetQtyToHandle)
{
ApplicationArea = Warehouse;
Caption = 'Reset Qty. To Handle';
Image = UndoFluent;
Gesture = RightSwipe;
ToolTip = 'Have the system clear the value in the Qty. To Handle field.';
Scope = Repeater;
trigger OnAction()
begin
Rec.DeleteQtyToHandleOnLine(Rec);
end;
}
}
group("&Line")
{
Caption = '&Line';
Image = Line;
action("Source &Document Line")
{
ApplicationArea = Warehouse;
Caption = 'Source &Document Line';
Image = SourceDocLine;
ToolTip = 'View the line on a released source document that the warehouse activity is for. ';
trigger OnAction()
begin
ShowSourceLine();
end;
}
action("Source Document Attached Lines")
{
ApplicationArea = Warehouse;
Caption = 'Source Document - Attached Lines';
Image = AllLines;
ToolTip = 'View the lines on a released source document that are attached to this item line.';
trigger OnAction()
begin
ShowSourceAttachedLines();
end;
}
action("Bin Contents List")
{
ApplicationArea = Warehouse;
Caption = 'Bin Contents List';
Image = BinContent;
ToolTip = 'View the contents of the selected bin and the parameters that define how items are routed through the bin.';
trigger OnAction()
begin
ShowBinContents();
end;
}
group("Item Availability by")
{
Caption = 'Item Availability by';
Image = ItemAvailability;
action("Event")
{
ApplicationArea = Warehouse;
Caption = 'Event';
Image = "Event";
ToolTip = 'View how the actual and the projected available balance of an item will develop over time according to supply and demand events.';
trigger OnAction()
begin
Rec.ShowItemAvailabilityByEvent();
end;
}
action(Period)
{
ApplicationArea = Warehouse;
Caption = 'Period';
Image = Period;
ToolTip = 'View the projected quantity of the item over time according to time periods, such as day, week, or month.';
trigger OnAction()
begin
Rec.ShowItemAvailabilityByPeriod();
end;
}
action(Variant)
{
ApplicationArea = Planning;
Caption = 'Variant';
Image = ItemVariant;
ToolTip = 'View or edit the item''s variants. Instead of setting up each color of an item as a separate item, you can set up the various colors as variants of the item.';
trigger OnAction()
begin
Rec.ShowItemAvailabilityByVariant();
end;
}
action(Location)
{
AccessByPermission = TableData Location = R;
ApplicationArea = Warehouse;
Caption = 'Location';
Image = Warehouse;
ToolTip = 'View the actual and projected quantity of the item per location.';
trigger OnAction()
begin
Rec.ShowItemAvailabilityByLocation();
end;
}
action(Lot)
{
ApplicationArea = ItemTracking;
Caption = 'Lot';
Image = LotInfo;
RunObject = Page "Item Availability by Lot No.";
RunPageLink = "No." = field("Item No."),
"Location Filter" = field("Location Code"),
"Variant Filter" = field("Variant Code");
ToolTip = 'View the current and projected quantity of the item in each lot.';
}
}
}
}
}
trigger OnDeleteRecord(): Boolean
begin
CurrPage.Update(false);
end;
trigger OnNewRecord(BelowxRec: Boolean)
begin
Rec."Activity Type" := xRec."Activity Type";
end;
trigger OnOpenPage()
begin
end;
var
WMSMgt: Codeunit "WMS Management";
local procedure ShowSourceLine()
begin
WMSMgt.ShowSourceDocLine(
Rec."Source Type", Rec."Source Subtype", Rec."Source No.", Rec."Source Line No.", Rec."Source Subline No.");
end;
local procedure ShowSourceAttachedLines()
begin
WMSMgt.ShowSourceDocAttachedLines(
Rec."Source Type", Rec."Source Subtype", Rec."Source No.", Rec."Source Line No.");
end;
local procedure ShowBinContents()
var
BinContent: Record "Bin Content";
begin
BinContent.ShowBinContents(Rec."Location Code", Rec."Item No.", Rec."Variant Code", '')
end;
procedure AutofillQtyToHandle()
var
WhseActivLine: Record "Warehouse Activity Line";
begin
WhseActivLine.Copy(Rec);
Rec.AutofillQtyToHandle(WhseActivLine);
end;
procedure DeleteQtyToHandle()
var
WhseActivLine: Record "Warehouse Activity Line";
begin
WhseActivLine.Copy(Rec);
Rec.DeleteQtyToHandle(WhseActivLine);
end;
local procedure CallSplitLine()
var
WhseActivLine: Record "Warehouse Activity Line";
begin
WhseActivLine.Copy(Rec);
Rec.SplitLine(WhseActivLine);
Rec.Copy(WhseActivLine);
CurrPage.Update(false);
end;
procedure PostPickYesNo()
var
WhseActivLine: Record "Warehouse Activity Line";
begin
WhseActivLine.Copy(Rec);
OnPostPickYesNoOnBeforeRunWhseActivPostYesNo(WhseActivLine, Rec);
CODEUNIT.Run(CODEUNIT::"Whse.-Act.-Post (Yes/No)", WhseActivLine);
CurrPage.Update(false);
end;
procedure PreviewPostPick()
var
WhseActPostYesNo: Codeunit "Whse.-Act.-Post (Yes/No)";
begin
WhseActPostYesNo.Preview(Rec);
end;
procedure PostAndPrint()
var
WhseActivLine: Record "Warehouse Activity Line";
WhseActivPostYesNo: Codeunit "Whse.-Act.-Post (Yes/No)";
begin
WhseActivLine.Copy(Rec);
WhseActivPostYesNo.PrintDocument(true);
OnPostAndPrintOnBeforeRunWhseActivPostYesNo(WhseActivLine, Rec);
WhseActivPostYesNo.Run(WhseActivLine);
CurrPage.Update(false);
end;
procedure UpdateForm()
begin
CurrPage.Update();
end;
protected procedure SerialNoOnAfterValidate()
var
ItemTrackingMgt: Codeunit "Item Tracking Management";
ExpDate: Date;
EntriesExist: Boolean;
begin
if Rec."Serial No." <> '' then
ExpDate := ItemTrackingMgt.ExistingExpirationDate(Rec, false, EntriesExist);
if ExpDate <> 0D then
Rec."Expiration Date" := ExpDate;
OnAfterSerialNoOnAfterValidate(Rec, ExpDate, EntriesExist);
end;
protected procedure LotNoOnAfterValidate()
var
ItemTrackingMgt: Codeunit "Item Tracking Management";
ExpDate: Date;
EntriesExist: Boolean;
begin
if Rec."Lot No." <> '' then
ExpDate := ItemTrackingMgt.ExistingExpirationDate(Rec, false, EntriesExist);
if ExpDate <> 0D then
Rec."Expiration Date" := ExpDate;
OnAfterLotNoOnAfterValidate(Rec, ExpDate, EntriesExist);
end;
protected procedure BinCodeOnAfterValidate()
begin
CurrPage.Update();
end;
protected procedure QtytoHandleOnAfterValidate()
begin
CurrPage.SaveRecord();
end;
[IntegrationEvent(false, false)]
local procedure OnPostPickYesNoOnBeforeRunWhseActivPostYesNo(var WhseActivLine: Record "Warehouse Activity Line"; var WarehouseActivityLine: Record "Warehouse Activity Line")
begin
end;
[IntegrationEvent(false, false)]
local procedure OnPostAndPrintOnBeforeRunWhseActivPostYesNo(var WhseActivLine: Record "Warehouse Activity Line"; var WarehouseActivityLine: Record "Warehouse Activity Line")
begin
end;
[IntegrationEvent(false, false)]
local procedure OnAfterSerialNoOnAfterValidate(var Rec: Record "Warehouse Activity Line"; ExpDate: Date; EntriesExist: Boolean)
begin
end;
[IntegrationEvent(false, false)]
local procedure OnAfterLotNoOnAfterValidate(var Rec: Record "Warehouse Activity Line"; ExpDate: Date; EntriesExist: Boolean)
begin
end;
}