Table 6650 Return Shipment Header
- App
- Base Application
- Namespace
- Microsoft.Purchases.History
- Versions
- 17-28
Fields, 88Keys, 5Procedures, 4Events, 3
Versions171819202122232425262728
Source29
Source in 29
src/Layers/W1/BaseApp/Purchases/History/ReturnShipmentHeader.Table.al674 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.Purchases.History;
using Microsoft.Bank.BankAccount;
using Microsoft.Bank.Payment;
using Microsoft.CRM.Campaign;
using Microsoft.CRM.Contact;
using Microsoft.CRM.Team;
using Microsoft.Finance.Currency;
using Microsoft.Finance.Dimension;
using Microsoft.Finance.GeneralLedger.Account;
using Microsoft.Finance.GeneralLedger.Journal;
using Microsoft.Finance.GeneralLedger.Setup;
using Microsoft.Finance.SalesTax;
using Microsoft.Finance.VAT.Setup;
using Microsoft.Foundation.Address;
using Microsoft.Foundation.AuditCodes;
using Microsoft.Foundation.Navigate;
using Microsoft.Foundation.NoSeries;
using Microsoft.Foundation.PaymentTerms;
using Microsoft.Foundation.Reporting;
using Microsoft.Foundation.Shipping;
using Microsoft.Inventory.Intrastat;
using Microsoft.Inventory.Location;
using Microsoft.Pricing.Calculation;
using Microsoft.Purchases.Comment;
using Microsoft.Purchases.Payables;
using Microsoft.Purchases.Vendor;
using Microsoft.Sales.Customer;
using Microsoft.Utilities;
using System.Automation;
using System.Globalization;
using System.Security.AccessControl;
using System.Security.User;
table 6650 "Return Shipment Header"
{
Caption = 'Return Shipment Header';
DataCaptionFields = "No.", "Buy-from Vendor Name";
DrillDownPageID = "Posted Return Shipments";
LookupPageID = "Posted Return Shipments";
DataClassification = CustomerContent;
fields
{
field(2; "Buy-from Vendor No."; Code[20])
{
Caption = 'Buy-from Vendor No.';
ToolTip = 'Specifies the name of the vendor who delivered the items.';
NotBlank = true;
TableRelation = Vendor;
}
field(3; "No."; Code[20])
{
Caption = 'No.';
ToolTip = 'Specifies the number of the involved entry or record, according to the specified number series.';
}
field(4; "Pay-to Vendor No."; Code[20])
{
Caption = 'Pay-to Vendor No.';
ToolTip = 'Specifies the number of the vendor that you received the invoice from.';
NotBlank = true;
TableRelation = Vendor;
}
field(5; "Pay-to Name"; Text[100])
{
Caption = 'Pay-to Name';
ToolTip = 'Specifies the name of the customer who you received the invoice from.';
}
field(6; "Pay-to Name 2"; Text[50])
{
Caption = 'Pay-to Name 2';
ToolTip = 'Specifies an additional part of the name of the vendor who you receive or received the credit memo from.';
}
field(7; "Pay-to Address"; Text[100])
{
Caption = 'Pay-to Address';
ToolTip = 'Specifies the address of the vendor that you received the invoice from.';
}
field(8; "Pay-to Address 2"; Text[50])
{
Caption = 'Pay-to Address 2';
ToolTip = 'Specifies an additional part of the address of the customer that the invoice was shipped to.';
}
field(9; "Pay-to City"; Text[30])
{
Caption = 'Pay-to City';
ToolTip = 'Specifies the city of the customer that you shipped the invoice to.';
TableRelation = if ("Pay-to Country/Region Code" = const('')) "Post Code".City
else
if ("Pay-to Country/Region Code" = filter(<> '')) "Post Code".City where("Country/Region Code" = field("Pay-to Country/Region Code"));
ValidateTableRelation = false;
}
field(10; "Pay-to Contact"; Text[100])
{
Caption = 'Pay-to Contact';
ToolTip = 'Specifies the name of the person to contact about an invoice from this customer.';
}
field(11; "Your Reference"; Text[35])
{
Caption = 'Your Reference';
}
field(12; "Ship-to Code"; Code[10])
{
Caption = 'Ship-to Code';
ToolTip = 'Specifies a code for an alternate shipment address if you want to ship to another address than the one that has been entered automatically. This field is also used in case of drop shipment.';
TableRelation = "Ship-to Address".Code where("Customer No." = field("Sell-to Customer No."));
}
field(13; "Ship-to Name"; Text[100])
{
Caption = 'Ship-to Name';
ToolTip = 'Specifies the name of the customer at the address that the items are shipped to.';
}
field(14; "Ship-to Name 2"; Text[50])
{
Caption = 'Ship-to Name 2';
ToolTip = 'Specifies an additional part of the name of the customer at the address that the items are shipped to.';
}
field(15; "Ship-to Address"; Text[100])
{
Caption = 'Ship-to Address';
ToolTip = 'Specifies the address that the items are shipped to.';
}
field(16; "Ship-to Address 2"; Text[50])
{
Caption = 'Ship-to Address 2';
ToolTip = 'Specifies an additional part of the ship-to address, in case it is a long address.';
}
field(17; "Ship-to City"; Text[30])
{
Caption = 'Ship-to City';
ToolTip = 'Specifies the city of the address that the items are shipped to.';
TableRelation = if ("Ship-to Country/Region Code" = const('')) "Post Code".City
else
if ("Ship-to Country/Region Code" = filter(<> '')) "Post Code".City where("Country/Region Code" = field("Ship-to Country/Region Code"));
ValidateTableRelation = false;
}
field(18; "Ship-to Contact"; Text[100])
{
Caption = 'Ship-to Contact';
ToolTip = 'Specifies the name of the contact person at the address that the items are shipped to.';
}
field(20; "Posting Date"; Date)
{
Caption = 'Posting Date';
ToolTip = 'Specifies the entry''s posting date.';
}
field(21; "Expected Receipt Date"; Date)
{
Caption = 'Expected Receipt Date';
}
field(22; "Posting Description"; Text[100])
{
Caption = 'Posting Description';
}
field(23; "Payment Terms Code"; Code[10])
{
Caption = 'Payment Terms Code';
TableRelation = "Payment Terms";
}
field(24; "Due Date"; Date)
{
Caption = 'Due Date';
}
field(25; "Payment Discount %"; Decimal)
{
AutoFormatType = 0;
Caption = 'Payment Discount %';
DecimalPlaces = 0 : 5;
MaxValue = 100;
MinValue = 0;
}
field(26; "Pmt. Discount Date"; Date)
{
Caption = 'Pmt. Discount Date';
}
field(27; "Shipment Method Code"; Code[10])
{
Caption = 'Shipment Method Code';
TableRelation = "Shipment Method";
}
field(28; "Location Code"; Code[10])
{
Caption = 'Location Code';
ToolTip = 'Specifies the location from where inventory items to the customer on the sales document are to be shipped by default.';
TableRelation = Location where("Use As In-Transit" = const(false));
}
field(29; "Shortcut Dimension 1 Code"; Code[20])
{
CaptionClass = '1,2,1';
Caption = 'Shortcut Dimension 1 Code';
ToolTip = 'Specifies the code for Shortcut Dimension 1, which is one of two global dimension codes that you set up in the General Ledger Setup window.';
TableRelation = "Dimension Value".Code where("Global Dimension No." = const(1));
}
field(30; "Shortcut Dimension 2 Code"; Code[20])
{
CaptionClass = '1,2,2';
Caption = 'Shortcut Dimension 2 Code';
ToolTip = 'Specifies the code for Shortcut Dimension 2, which is one of two global dimension codes that you set up in the General Ledger Setup window.';
TableRelation = "Dimension Value".Code where("Global Dimension No." = const(2));
}
field(31; "Vendor Posting Group"; Code[20])
{
Caption = 'Vendor Posting Group';
Editable = false;
TableRelation = "Vendor Posting Group";
}
field(32; "Currency Code"; Code[10])
{
Caption = 'Currency Code';
ToolTip = 'Specifies the currency that is used on the entry.';
Editable = false;
TableRelation = Currency;
}
field(33; "Currency Factor"; Decimal)
{
AutoFormatType = 0;
Caption = 'Currency Factor';
DecimalPlaces = 0 : 15;
MinValue = 0;
}
field(37; "Invoice Disc. Code"; Code[20])
{
Caption = 'Invoice Disc. Code';
}
field(41; "Language Code"; Code[10])
{
Caption = 'Language Code';
TableRelation = Language;
}
field(42; "Format Region"; Text[80])
{
Caption = 'Format Region';
TableRelation = "Language Selection"."Language Tag";
}
field(43; "Purchaser Code"; Code[20])
{
Caption = 'Purchaser Code';
ToolTip = 'Specifies which purchaser is assigned to the vendor.';
TableRelation = "Salesperson/Purchaser";
}
field(46; Comment; Boolean)
{
CalcFormula = exist("Purch. Comment Line" where("Document Type" = const("Posted Return Shipment"),
"No." = field("No."),
"Document Line No." = const(0)));
Caption = 'Comment';
Editable = false;
FieldClass = FlowField;
}
field(47; "No. Printed"; Integer)
{
Caption = 'No. Printed';
ToolTip = 'Specifies how many times the document has been printed.';
Editable = false;
}
field(51; "On Hold"; Code[3])
{
Caption = 'On Hold';
}
field(52; "Applies-to Doc. Type"; Enum "Gen. Journal Document Type")
{
Caption = 'Applies-to Doc. Type';
ToolTip = 'Specifies the type of the posted document that this document or journal line will be applied to when you post, for example to register payment.';
}
field(53; "Applies-to Doc. No."; Code[20])
{
Caption = 'Applies-to Doc. No.';
ToolTip = 'Specifies the number of the posted document that this document or journal line will be applied to when you post, for example to register payment.';
trigger OnLookup()
var
VendLedgEntry: Record "Vendor Ledger Entry";
begin
VendLedgEntry.SetCurrentKey("Document No.");
VendLedgEntry.SetRange("Document Type", "Applies-to Doc. Type");
VendLedgEntry.SetRange("Document No.", "Applies-to Doc. No.");
OnLookupAppliesToDocNoOnAfterSetFilters(VendLedgEntry, Rec);
PAGE.Run(0, VendLedgEntry);
end;
}
field(55; "Bal. Account No."; Code[20])
{
Caption = 'Bal. Account No.';
TableRelation = if ("Bal. Account Type" = const("G/L Account")) "G/L Account"
else
if ("Bal. Account Type" = const("Bank Account")) "Bank Account";
}
field(70; "VAT Registration No."; Text[20])
{
Caption = 'VAT Registration No.';
}
field(72; "Sell-to Customer No."; Code[20])
{
Caption = 'Sell-to Customer No.';
TableRelation = Customer;
}
field(73; "Reason Code"; Code[10])
{
Caption = 'Reason Code';
TableRelation = "Reason Code";
}
field(74; "Gen. Bus. Posting Group"; Code[20])
{
Caption = 'Gen. Bus. Posting Group';
TableRelation = "Gen. Business Posting Group";
}
field(76; "Transaction Type"; Code[10])
{
Caption = 'Transaction Type';
TableRelation = "Transaction Type";
}
field(77; "Transport Method"; Code[10])
{
Caption = 'Transport Method';
TableRelation = "Transport Method";
}
field(78; "VAT Country/Region Code"; Code[10])
{
Caption = 'VAT Country/Region Code';
TableRelation = "Country/Region";
}
field(79; "Buy-from Vendor Name"; Text[100])
{
Caption = 'Buy-from Vendor Name';
ToolTip = 'Specifies the name of the vendor who delivered the items.';
}
field(80; "Buy-from Vendor Name 2"; Text[50])
{
Caption = 'Buy-from Vendor Name 2';
ToolTip = 'Specifies an additional part of the name of the vendor that you’re buying from.';
}
field(81; "Buy-from Address"; Text[100])
{
Caption = 'Buy-from Address';
ToolTip = 'Specifies the address of the vendor who delivered the items.';
}
field(82; "Buy-from Address 2"; Text[50])
{
Caption = 'Buy-from Address 2';
ToolTip = 'Specifies an additional part of the address of the vendor who delivered the items.';
}
field(83; "Buy-from City"; Text[30])
{
Caption = 'Buy-from City';
ToolTip = 'Specifies the city of the vendor who delivered the items.';
TableRelation = if ("Buy-from Country/Region Code" = const('')) "Post Code".City
else
if ("Buy-from Country/Region Code" = filter(<> '')) "Post Code".City where("Country/Region Code" = field("Buy-from Country/Region Code"));
ValidateTableRelation = false;
}
field(84; "Buy-from Contact"; Text[100])
{
Caption = 'Buy-from Contact';
ToolTip = 'Specifies the name of the contact person at the vendor who delivered the items.';
}
field(85; "Pay-to Post Code"; Code[20])
{
Caption = 'Pay-to Post Code';
ToolTip = 'Specifies the post code of the customer that you received the invoice from.';
TableRelation = if ("Pay-to Country/Region Code" = const('')) "Post Code"
else
if ("Pay-to Country/Region Code" = filter(<> '')) "Post Code" where("Country/Region Code" = field("Pay-to Country/Region Code"));
ValidateTableRelation = false;
}
field(86; "Pay-to County"; Text[30])
{
CaptionClass = '5,6,' + "Pay-to Country/Region Code";
Caption = 'Pay-to County';
}
field(87; "Pay-to Country/Region Code"; Code[10])
{
Caption = 'Pay-to Country/Region Code';
ToolTip = 'Specifies the country/region code of the address.';
TableRelation = "Country/Region";
}
field(88; "Buy-from Post Code"; Code[20])
{
Caption = 'Buy-from Post Code';
ToolTip = 'Specifies the post code of the vendor who delivered the items.';
TableRelation = if ("Buy-from Country/Region Code" = const('')) "Post Code"
else
if ("Buy-from Country/Region Code" = filter(<> '')) "Post Code" where("Country/Region Code" = field("Buy-from Country/Region Code"));
ValidateTableRelation = false;
}
field(89; "Buy-from County"; Text[30])
{
CaptionClass = '5,5,' + "Buy-from Country/Region Code";
Caption = 'Buy-from County';
}
field(90; "Buy-from Country/Region Code"; Code[10])
{
Caption = 'Buy-from Country/Region Code';
ToolTip = 'Specifies the city of the vendor who delivered the items.';
TableRelation = "Country/Region";
}
field(91; "Ship-to Post Code"; Code[20])
{
Caption = 'Ship-to Post Code';
ToolTip = 'Specifies the postal code of the address that the items are shipped to.';
TableRelation = if ("Ship-to Country/Region Code" = const('')) "Post Code"
else
if ("Ship-to Country/Region Code" = filter(<> '')) "Post Code" where("Country/Region Code" = field("Ship-to Country/Region Code"));
ValidateTableRelation = false;
}
field(92; "Ship-to County"; Text[30])
{
CaptionClass = '5,4,' + "Ship-to Country/Region Code";
Caption = 'Ship-to County';
}
field(93; "Ship-to Country/Region Code"; Code[10])
{
Caption = 'Ship-to Country/Region Code';
ToolTip = 'Specifies the country or region of the ship-to address.';
TableRelation = "Country/Region";
}
field(94; "Bal. Account Type"; enum "Payment Balance Account Type")
{
Caption = 'Bal. Account Type';
}
field(95; "Order Address Code"; Code[10])
{
Caption = 'Order Address Code';
ToolTip = 'Specifies the order address of the related customer.';
TableRelation = "Order Address".Code where("Vendor No." = field("Buy-from Vendor No."));
}
field(97; "Entry Point"; Code[10])
{
Caption = 'Entry Point';
TableRelation = "Entry/Exit Point";
}
field(98; Correction; Boolean)
{
Caption = 'Correction';
}
field(99; "Document Date"; Date)
{
Caption = 'Document Date';
ToolTip = 'Specifies the date when the related document was created.';
}
field(101; "Area"; Code[10])
{
Caption = 'Area';
TableRelation = Area;
}
field(102; "Transaction Specification"; Code[10])
{
Caption = 'Transaction Specification';
TableRelation = "Transaction Specification";
}
field(104; "Payment Method Code"; Code[10])
{
Caption = 'Payment Method Code';
TableRelation = "Payment Method";
}
field(108; "No. Series"; Code[20])
{
Caption = 'No. Series';
Editable = false;
TableRelation = "No. Series";
}
field(112; "User ID"; Code[50])
{
Caption = 'User ID';
DataClassification = EndUserIdentifiableInformation;
TableRelation = User."User Name";
}
field(113; "Source Code"; Code[10])
{
Caption = 'Source Code';
TableRelation = "Source Code";
}
field(114; "Tax Area Code"; Code[20])
{
Caption = 'Tax Area Code';
TableRelation = "Tax Area";
}
field(115; "Tax Liable"; Boolean)
{
Caption = 'Tax Liable';
}
field(116; "VAT Bus. Posting Group"; Code[20])
{
Caption = 'VAT Bus. Posting Group';
TableRelation = "VAT Business Posting Group";
}
field(119; "VAT Base Discount %"; Decimal)
{
AutoFormatType = 0;
Caption = 'VAT Base Discount %';
DecimalPlaces = 0 : 5;
MaxValue = 100;
MinValue = 0;
}
field(210; "Ship-to Phone No."; Text[30])
{
Caption = 'Ship-to Phone No.';
ToolTip = 'Specifies the telephone number of the company''s shipping address.';
ExtendedDatatype = PhoneNo;
}
field(480; "Dimension Set ID"; Integer)
{
Caption = 'Dimension Set ID';
Editable = false;
TableRelation = "Dimension Set Entry";
trigger OnLookup()
begin
Rec.ShowDimensions();
end;
}
field(5050; "Campaign No."; Code[20])
{
Caption = 'Campaign No.';
TableRelation = Campaign;
}
field(5052; "Buy-from Contact No."; Code[20])
{
Caption = 'Buy-from Contact No.';
ToolTip = 'Specifies the number of the contact person at the vendor who delivered the items.';
TableRelation = Contact;
}
field(5053; "Pay-to Contact No."; Code[20])
{
Caption = 'Pay-to Contact No.';
ToolTip = 'Specifies the number of the person to contact about an invoice from this customer.';
TableRelation = Contact;
}
field(5700; "Responsibility Center"; Code[10])
{
Caption = 'Responsibility Center';
ToolTip = 'Specifies the code of the responsibility center, such as a distribution hub, that is associated with the involved user, company, customer, or vendor.';
TableRelation = "Responsibility Center";
}
field(5800; "Vendor Authorization No."; Code[35])
{
Caption = 'Vendor Authorization No.';
ToolTip = 'Specifies the identification number of a compensation agreement.';
}
field(6601; "Return Order No."; Code[20])
{
Caption = 'Return Order No.';
ToolTip = 'Specifies the number of the return order that will post a return shipment.';
}
field(6602; "Return Order No. Series"; Code[20])
{
Caption = 'Return Order No. Series';
TableRelation = "No. Series";
}
field(7000; "Price Calculation Method"; Enum "Price Calculation Method")
{
Caption = 'Price Calculation Method';
}
}
keys
{
key(Key1; "No.")
{
Clustered = true;
}
key(Key2; "Return Order No.")
{
}
key(Key3; "Buy-from Vendor No.")
{
}
key(Key4; "Pay-to Vendor No.")
{
}
key(Key5; "Posting Date")
{
}
}
fieldgroups
{
}
trigger OnDelete()
var
CertificateOfSupply: Record "Certificate of Supply";
PostPurchDelete: Codeunit "PostPurch-Delete";
begin
PostPurchDelete.IsDocumentDeletionAllowed("Posting Date");
LockTable();
PostPurchDelete.DeletePurchShptLines(Rec);
PurchCommentLine.SetRange("Document Type", PurchCommentLine."Document Type"::"Posted Return Shipment");
PurchCommentLine.SetRange("No.", "No.");
PurchCommentLine.DeleteAll();
ApprovalsMgmt.DeletePostedApprovalEntries(RecordId);
if CertificateOfSupply.Get(CertificateOfSupply."Document Type"::"Return Shipment", "No.") then
CertificateOfSupply.Delete(true);
end;
var
ReturnShptHeader: Record "Return Shipment Header";
PurchCommentLine: Record "Purch. Comment Line";
DimMgt: Codeunit DimensionManagement;
ApprovalsMgmt: Codeunit "Approvals Mgmt.";
UserSetupMgt: Codeunit "User Setup Management";
#pragma warning disable AA0074
Text001: Label 'Posted Document Dimensions';
#pragma warning restore AA0074
procedure PrintRecords(ShowRequestForm: Boolean)
var
ReportSelection: Record "Report Selections";
IsHandled: Boolean;
begin
ReturnShptHeader.Copy(Rec);
IsHandled := false;
OnBeforePrintRecords(ReturnShptHeader, ShowRequestForm, IsHandled);
if IsHandled then
exit;
ReportSelection.PrintWithDialogForVend(
ReportSelection.Usage::"P.Ret.Shpt.", ReturnShptHeader, ShowRequestForm, ReturnShptHeader.FieldNo("Buy-from Vendor No."));
end;
procedure Navigate()
var
NavigatePage: Page Navigate;
begin
NavigatePage.SetDoc("Posting Date", "No.");
NavigatePage.SetRec(Rec);
NavigatePage.Run();
end;
procedure ShowDimensions()
begin
DimMgt.ShowDimensionSet("Dimension Set ID", StrSubstNo('%1,%2 %3', TableCaption(), "No.", Text001));
end;
procedure SetSecurityFilterOnRespCenter()
var
IsHandled: Boolean;
begin
IsHandled := false;
OnBeforeSetSecurityFilterOnRespCenter(Rec, IsHandled);
if IsHandled then
exit;
if UserSetupMgt.GetPurchasesFilter() <> '' then begin
FilterGroup(2);
SetRange("Responsibility Center", UserSetupMgt.GetPurchasesFilter());
FilterGroup(0);
end;
end;
[IntegrationEvent(false, false)]
local procedure OnBeforeSetSecurityFilterOnRespCenter(var ReturnShipmentHeader: Record "Return Shipment Header"; var IsHandled: Boolean)
begin
end;
[IntegrationEvent(false, false)]
local procedure OnLookupAppliesToDocNoOnAfterSetFilters(var VendLedgEntry: Record "Vendor Ledger Entry"; ReturnShipmentHeader: Record "Return Shipment Header")
begin
end;
[IntegrationEvent(false, false)]
local procedure OnBeforePrintRecords(var ReturnShipmentHeader: Record "Return Shipment Header"; ShowRequestForm: Boolean; var IsHandled: Boolean)
begin
end;
}