Table 7340 Posted Invt. Put-away Header, source in 29
Source29
src/Layers/W1/BaseApp/Warehouse/InventoryDocument/PostedInvtPutawayHeader.Table.al242 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.InventoryDocument;
using Microsoft.Foundation.Navigate;
using Microsoft.Foundation.NoSeries;
using Microsoft.Inventory.Item;
using Microsoft.Inventory.Location;
using Microsoft.Inventory.Setup;
using Microsoft.Inventory.Transfer;
using Microsoft.Purchases.History;
using Microsoft.Purchases.Vendor;
using Microsoft.Sales.Customer;
using Microsoft.Sales.Document;
using Microsoft.Sales.History;
using Microsoft.Warehouse.Activity;
using Microsoft.Warehouse.Comment;
using Microsoft.Warehouse.Request;
using Microsoft.Warehouse.Setup;
table 7340 "Posted Invt. Put-away Header"
{
Caption = 'Posted Invt. Put-away Header';
LookupPageID = "Posted Invt. Put-away List";
DataClassification = CustomerContent;
fields
{
field(2; "No."; Code[20])
{
Caption = 'No.';
ToolTip = 'Specifies the number of the involved entry or record, according to the specified number series.';
}
field(3; "Location Code"; Code[10])
{
Caption = 'Location Code';
ToolTip = 'Specifies the code of the location in which the posted inventory put-away occurred.';
NotBlank = true;
TableRelation = Location;
}
field(4; "Assigned User ID"; Code[50])
{
Caption = 'Assigned User ID';
DataClassification = EndUserIdentifiableInformation;
TableRelation = "Warehouse Employee" where("Location Code" = field("Location Code"));
}
field(5; "Assignment Date"; Date)
{
Caption = 'Assignment Date';
}
field(6; "Assignment Time"; Time)
{
Caption = 'Assignment Time';
}
field(8; "Registering Date"; Date)
{
Caption = 'Registering Date';
}
field(9; "No. Series"; Code[20])
{
Caption = 'No. Series';
ToolTip = 'Specifies the number series from which entry or record numbers are assigned to new entries or records.';
Editable = false;
TableRelation = "No. Series";
}
field(10; Comment; Boolean)
{
CalcFormula = exist("Warehouse Comment Line" where("Table Name" = const("Posted Invt. Put-Away"),
Type = const(" "),
"No." = field("No.")));
Caption = 'Comment';
Editable = false;
FieldClass = FlowField;
}
field(11; "Invt. Put-away No."; Code[20])
{
Caption = 'Invt. Put-away No.';
ToolTip = 'Specifies the inventory put-away number from which the put-away was posted.';
}
field(12; "No. Printed"; Integer)
{
Caption = 'No. Printed';
Editable = false;
}
field(20; "Posting Date"; Date)
{
Caption = 'Posting Date';
ToolTip = 'Specifies the posting date from the inventory put-away.';
}
field(7306; "Source No."; Code[20])
{
Caption = 'Source No.';
ToolTip = 'Specifies the number of the source document that the entry originates from.';
TableRelation = if ("Source Type" = const(120)) "Purch. Rcpt. Header" where("No." = field("Source No."))
else
if ("Source Type" = const(110)) "Sales Shipment Header" where("No." = field("Source No."))
else
if ("Source Type" = const(6650)) "Return Shipment Header" where("No." = field("Source No."))
else
if ("Source Type" = const(6660)) "Return Receipt Header" where("No." = field("Source No."))
else
if ("Source Type" = const(5744)) "Transfer Shipment Header" where("No." = field("Source No."))
else
if ("Source Type" = const(5746)) "Transfer Receipt Header" where("No." = field("Source No."));
}
field(7307; "Source Document"; Enum "Warehouse Activity Source Document")
{
BlankZero = true;
Caption = 'Source Document';
}
field(7308; "Source Type"; Integer)
{
Caption = 'Source Type';
}
field(7309; "Source Subtype"; Option)
{
Caption = 'Source Subtype';
Editable = false;
OptionCaption = '0,1,2,3,4,5,6,7,8,9,10';
OptionMembers = "0","1","2","3","4","5","6","7","8","9","10";
}
field(7310; "Destination Type"; enum "Warehouse Destination Type")
{
Caption = 'Destination Type';
}
field(7311; "Destination No."; Code[20])
{
Caption = 'Destination No.';
ToolTip = 'Specifies the number or the code of the customer, vendor, location, item, family, or sales order linked to the posted inventory put-away.';
TableRelation = if ("Destination Type" = const(Vendor)) Vendor
else
if ("Destination Type" = const(Customer)) Customer
else
if ("Destination Type" = const(Location)) Location
else
if ("Destination Type" = const(Item)) Item
else
if ("Destination Type" = const("Sales Order")) "Sales Header"."No." where("Document Type" = const(Order));
}
field(7312; "External Document No."; Code[35])
{
Caption = 'External Document No.';
ToolTip = 'Specifies a document number that refers to the customer''s or vendor''s numbering system.';
}
field(7313; "Expected Receipt Date"; Date)
{
Caption = 'Expected Receipt Date';
ToolTip = 'Specifies the date on which the receipt of the items on the posted inventory put-away was expected.';
}
field(7315; "External Document No.2"; Code[35])
{
Caption = 'External Document No.2';
ToolTip = 'Specifies an additional part of the document number that refers to the customer''s or vendor''s numbering system.';
}
}
keys
{
key(Key1; "No.")
{
Clustered = true;
}
key(Key2; "Invt. Put-away No.")
{
}
key(Key3; "Location Code")
{
}
key(Key4; "Posting Date")
{
}
}
fieldgroups
{
}
trigger OnDelete()
var
PostedInvtPutAwayLine: Record "Posted Invt. Put-away Line";
WhseCommentLine: Record "Warehouse Comment Line";
begin
CheckLocation();
PostedInvtPutAwayLine.SetRange("No.", "No.");
PostedInvtPutAwayLine.DeleteAll();
WhseCommentLine.SetRange("Table Name", WhseCommentLine."Table Name"::"Posted Invt. Put-Away");
WhseCommentLine.SetRange(Type, WhseCommentLine.Type::" ");
WhseCommentLine.SetRange("No.", "No.");
WhseCommentLine.DeleteAll();
end;
trigger OnInsert()
var
NoSeries: Codeunit "No. Series";
begin
if "No." = '' then begin
TestNoSeries();
"No. Series" := GetNoSeriesCode();
if NoSeries.AreRelated("No. Series", xRec."No. Series") then
"No. Series" := xRec."No. Series";
"No." := NoSeries.GetNextNo("No. Series", "Posting Date");
end;
"Registering Date" := WorkDate();
end;
var
InvtSetup: Record "Inventory Setup";
local procedure GetNoSeriesCode(): Code[20]
begin
InvtSetup.Get();
exit(InvtSetup."Posted Invt. Put-away Nos.");
end;
local procedure TestNoSeries()
begin
InvtSetup.Get();
InvtSetup.TestField("Posted Invt. Put-away Nos.");
end;
procedure Navigate()
var
NavigatePage: Page Navigate;
begin
NavigatePage.SetDoc("Posting Date", "No.");
NavigatePage.SetRec(Rec);
NavigatePage.Run();
end;
local procedure CheckLocation()
var
Location: Record Location;
begin
Location.Get("Location Code");
Location.TestField("Bin Mandatory", false);
end;
}