Table 5995 Service Cr.Memo Line, source in 29
Source29
src/Layers/W1/BaseApp/Service/History/ServiceCrMemoLine.Table.al832 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.Service.History;
using Microsoft.Finance.Dimension;
using Microsoft.Finance.GeneralLedger.Account;
using Microsoft.Finance.GeneralLedger.Setup;
using Microsoft.Finance.SalesTax;
using Microsoft.Finance.VAT.Calculation;
using Microsoft.Finance.VAT.Clause;
using Microsoft.Finance.VAT.Setup;
using Microsoft.Foundation.AuditCodes;
using Microsoft.Foundation.Enums;
using Microsoft.Foundation.UOM;
using Microsoft.Inventory.Intrastat;
using Microsoft.Inventory.Item;
using Microsoft.Inventory.Item.Catalog;
using Microsoft.Inventory.Ledger;
using Microsoft.Inventory.Location;
using Microsoft.Inventory.Tracking;
using Microsoft.Pricing.Calculation;
using Microsoft.Projects.Project.Job;
using Microsoft.Projects.Resources.Resource;
using Microsoft.Sales.Customer;
using Microsoft.Sales.Pricing;
using Microsoft.Service.Contract;
using Microsoft.Service.Document;
using Microsoft.Service.Item;
using Microsoft.Service.Maintenance;
using Microsoft.Service.Pricing;
using Microsoft.Utilities;
using Microsoft.Warehouse.Structure;
using System.Reflection;
using System.Security.User;
table 5995 "Service Cr.Memo Line"
{
Caption = 'Service Cr.Memo Line';
DrillDownPageID = "Posted Service Cr. Memo Lines";
LookupPageID = "Posted Service Cr. Memo Lines";
PasteIsValid = false;
DataClassification = CustomerContent;
fields
{
field(2; "Customer No."; Code[20])
{
Caption = 'Customer No.';
ToolTip = 'Specifies the number of the customer to receive the service on the credit memo.';
Editable = false;
TableRelation = Customer;
}
field(3; "Document No."; Code[20])
{
Caption = 'Document No.';
ToolTip = 'Specifies the number of the credit memo.';
TableRelation = "Service Cr.Memo Header"."No.";
}
field(4; "Line No."; Integer)
{
Caption = 'Line No.';
}
field(5; Type; Enum "Service Line Type")
{
Caption = 'Type';
ToolTip = 'Specifies the type of the credit memo line.';
}
field(6; "No."; Code[20])
{
Caption = 'No.';
ToolTip = 'Specifies the number of the involved entry or record, according to the specified number series.';
TableRelation = if (Type = const(" ")) "Standard Text"
else
if (Type = const(Item)) Item
else
if (Type = const(Resource)) Resource
else
if (Type = const(Cost)) "Service Cost"
else
if (Type = const("G/L Account")) "G/L Account";
}
field(7; "Location Code"; Code[10])
{
Caption = 'Location Code';
ToolTip = 'Specifies the location, such as warehouse or distribution center, in which the credit memo line was registered.';
TableRelation = Location;
}
field(8; "Posting Group"; Code[20])
{
Caption = 'Posting Group';
TableRelation = if (Type = const(Item)) "Inventory Posting Group";
}
field(11; Description; Text[100])
{
Caption = 'Description';
ToolTip = 'Specifies the name of an item, resource, cost, general ledger account, or some descriptive text on the service credit memo line.';
}
field(12; "Description 2"; Text[50])
{
Caption = 'Description 2';
ToolTip = 'Specifies information in addition to the description.';
}
field(13; "Unit of Measure"; Text[50])
{
Caption = 'Unit of Measure';
ToolTip = 'Specifies the name of the item or resource''s unit of measure, such as piece or hour.';
}
field(15; Quantity; Decimal)
{
AutoFormatType = 0;
Caption = 'Quantity';
ToolTip = 'Specifies the number of item units, resource hours, general ledger account payments, or cost specified on the credit memo line.';
DecimalPlaces = 0 : 5;
}
field(22; "Unit Price"; Decimal)
{
AutoFormatExpression = GetCurrencyCode();
AutoFormatType = 2;
CaptionClass = GetCaptionClass(FieldNo("Unit Price"));
Caption = 'Unit Price';
ToolTip = 'Specifies the price of one unit of the item or resource. You can enter a price manually or have it entered according to the Price/Profit Calculation field on the related card.';
Editable = true;
}
field(23; "Unit Cost (LCY)"; Decimal)
{
AutoFormatExpression = '';
AutoFormatType = 2;
Caption = 'Unit Cost (LCY)';
}
field(25; "VAT %"; Decimal)
{
AutoFormatType = 0;
Caption = 'VAT %';
DecimalPlaces = 0 : 5;
Editable = false;
}
field(27; "Line Discount %"; Decimal)
{
AutoFormatType = 0;
Caption = 'Line Discount %';
ToolTip = 'Specifies the discount percentage that is granted for the item on the line.';
DecimalPlaces = 0 : 5;
MaxValue = 100;
MinValue = 0;
}
field(28; "Line Discount Amount"; Decimal)
{
AutoFormatExpression = GetCurrencyCode();
AutoFormatType = 1;
Caption = 'Line Discount Amount';
ToolTip = 'Specifies the discount amount that is granted for the item on the line.';
Editable = false;
}
field(29; Amount; Decimal)
{
AutoFormatExpression = GetCurrencyCode();
AutoFormatType = 1;
Caption = 'Amount';
ToolTip = 'Specifies the total net amount on the service line.';
Editable = false;
}
field(30; "Amount Including VAT"; Decimal)
{
AutoFormatExpression = GetCurrencyCode();
AutoFormatType = 1;
Caption = 'Amount Including VAT';
ToolTip = 'Specifies the net amount, including VAT, for this line.';
Editable = false;
}
field(32; "Allow Invoice Disc."; Boolean)
{
Caption = 'Allow Invoice Disc.';
ToolTip = 'Specifies if the invoice line is included when the invoice discount is calculated.';
InitValue = true;
}
field(34; "Gross Weight"; Decimal)
{
AutoFormatType = 0;
Caption = 'Gross Weight';
DecimalPlaces = 0 : 5;
}
field(35; "Net Weight"; Decimal)
{
AutoFormatType = 0;
Caption = 'Net Weight';
DecimalPlaces = 0 : 5;
}
field(36; "Units per Parcel"; Decimal)
{
AutoFormatType = 0;
Caption = 'Units per Parcel';
DecimalPlaces = 0 : 5;
}
field(37; "Unit Volume"; Decimal)
{
AutoFormatType = 0;
Caption = 'Unit Volume';
DecimalPlaces = 0 : 5;
}
field(40; "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(41; "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(42; "Customer Price Group"; Code[10])
{
Caption = 'Customer Price Group';
Editable = false;
TableRelation = "Customer Price Group";
}
field(45; "Job No."; Code[20])
{
Caption = 'Project No.';
TableRelation = Job;
}
field(46; "Job Task No."; Code[20])
{
Caption = 'Project Task No.';
TableRelation = "Job Task"."Job Task No." where("Job No." = field("Job No."));
}
field(52; "Work Type Code"; Code[10])
{
Caption = 'Work Type Code';
TableRelation = "Work Type";
}
field(63; "Shipment No."; Code[20])
{
Caption = 'Shipment No.';
ToolTip = 'Specifies the number of the posted shipment for this credit memo line.';
Editable = false;
}
field(68; "Bill-to Customer No."; Code[20])
{
Caption = 'Bill-to Customer No.';
ToolTip = 'Specifies the number of the customer that you send or sent the invoice or credit memo to.';
Editable = false;
TableRelation = Customer;
}
field(69; "Inv. Discount Amount"; Decimal)
{
AutoFormatExpression = GetCurrencyCode();
AutoFormatType = 1;
Caption = 'Inv. Discount Amount';
ToolTip = 'Specifies the total calculated invoice discount amount for the line.';
}
field(74; "Gen. Bus. Posting Group"; Code[20])
{
Caption = 'Gen. Bus. Posting Group';
ToolTip = 'Specifies the vendor''s or customer''s trade type to link transactions made for this business partner with the appropriate general ledger account according to the general posting setup.';
TableRelation = "Gen. Business Posting Group";
}
field(75; "Gen. Prod. Posting Group"; Code[20])
{
Caption = 'Gen. Prod. Posting Group';
ToolTip = 'Specifies the item''s product type to link transactions made for this item with the appropriate general ledger account according to the general posting setup.';
TableRelation = "Gen. Product Posting Group";
}
field(77; "VAT Calculation Type"; Enum "Tax Calculation Type")
{
Caption = 'VAT Calculation Type';
Editable = false;
}
field(78; "Transaction Type"; Code[10])
{
Caption = 'Transaction Type';
TableRelation = "Transaction Type";
}
field(79; "Transport Method"; Code[10])
{
Caption = 'Transport Method';
TableRelation = "Transport Method";
}
field(80; "Attached to Line No."; Integer)
{
Caption = 'Attached to Line No.';
Editable = false;
TableRelation = "Service Cr.Memo Line"."Line No." where("Document No." = field("Document No."));
}
field(81; "Exit Point"; Code[10])
{
Caption = 'Exit Point';
TableRelation = "Entry/Exit Point";
}
field(82; "Area"; Code[10])
{
Caption = 'Area';
TableRelation = Area;
}
field(83; "Transaction Specification"; Code[10])
{
Caption = 'Transaction Specification';
TableRelation = "Transaction Specification";
}
field(85; "Tax Area Code"; Code[20])
{
Caption = 'Tax Area Code';
ToolTip = 'Specifies the tax area that is used to calculate and post sales tax.';
TableRelation = "Tax Area";
}
field(86; "Tax Liable"; Boolean)
{
Caption = 'Tax Liable';
ToolTip = 'Specifies that items, resources, or costs on the current credit memo line are liable to sales tax.';
}
field(87; "Tax Group Code"; Code[20])
{
Caption = 'Tax Group Code';
ToolTip = 'Specifies the tax group that is used to calculate and post sales tax.';
TableRelation = "Tax Group";
}
field(88; "VAT Clause Code"; Code[20])
{
Caption = 'VAT Clause Code';
TableRelation = "VAT Clause";
}
field(89; "VAT Bus. Posting Group"; Code[20])
{
Caption = 'VAT Bus. Posting Group';
ToolTip = 'Specifies the VAT specification of the involved customer or vendor to link transactions made for this record with the appropriate general ledger account according to the VAT posting setup.';
TableRelation = "VAT Business Posting Group";
}
field(90; "VAT Prod. Posting Group"; Code[20])
{
Caption = 'VAT Prod. Posting Group';
ToolTip = 'Specifies the VAT specification of the involved item or resource to link transactions made for this record with the appropriate general ledger account according to the VAT posting setup.';
TableRelation = "VAT Product Posting Group";
}
field(99; "VAT Base Amount"; Decimal)
{
AutoFormatExpression = GetCurrencyCode();
AutoFormatType = 1;
Caption = 'VAT Base Amount';
}
field(100; "Unit Cost"; Decimal)
{
AutoFormatExpression = GetCurrencyCode();
AutoFormatType = 2;
Caption = 'Unit Cost';
}
field(101; "System-Created Entry"; Boolean)
{
Caption = 'System-Created Entry';
Editable = false;
}
field(103; "Line Amount"; Decimal)
{
AutoFormatExpression = GetCurrencyCode();
AutoFormatType = 1;
CaptionClass = GetCaptionClass(FieldNo("Line Amount"));
Caption = 'Line Amount';
ToolTip = 'Specifies the net amount, excluding any invoice discount amount, that must be paid for products on the line.';
}
field(104; "VAT Difference"; Decimal)
{
AutoFormatExpression = GetCurrencyCode();
AutoFormatType = 1;
Caption = 'VAT Difference';
Editable = false;
}
field(106; "VAT Identifier"; Code[20])
{
Caption = 'VAT Identifier';
Editable = false;
}
field(145; "Pmt. Discount Amount"; Decimal)
{
AutoFormatExpression = GetCurrencyCode();
AutoFormatType = 1;
Caption = 'Pmt. Discount Amount';
}
field(480; "Dimension Set ID"; Integer)
{
Caption = 'Dimension Set ID';
Editable = false;
TableRelation = "Dimension Set Entry";
trigger OnLookup()
begin
Rec.ShowDimensions();
end;
}
field(1019; "Job Planning Line No."; Integer)
{
AccessByPermission = TableData Job = R;
BlankZero = true;
Caption = 'Project Planning Line No.';
}
field(5402; "Variant Code"; Code[10])
{
Caption = 'Variant Code';
ToolTip = 'Specifies the variant of the item on the line.';
TableRelation = if (Type = const(Item)) "Item Variant".Code where("Item No." = field("No."));
}
field(5403; "Bin Code"; Code[20])
{
Caption = 'Bin Code';
ToolTip = 'Specifies the bin where the items are picked or put away.';
TableRelation = Bin.Code where("Location Code" = field("Location Code"));
}
field(5404; "Qty. per Unit of Measure"; Decimal)
{
AutoFormatType = 0;
Caption = 'Qty. per Unit of Measure';
DecimalPlaces = 0 : 5;
Editable = false;
InitValue = 1;
}
field(5407; "Unit of Measure Code"; Code[10])
{
Caption = 'Unit of Measure Code';
ToolTip = 'Specifies how each unit of the item or resource is measured, such as in pieces or hours. By default, the value in the Base Unit of Measure field on the item or resource card is inserted.';
TableRelation = if (Type = const(Item)) "Item Unit of Measure".Code where("Item No." = field("No."))
else
"Unit of Measure";
}
field(5415; "Quantity (Base)"; Decimal)
{
AutoFormatType = 0;
Caption = 'Quantity (Base)';
DecimalPlaces = 0 : 5;
}
field(5700; "Responsibility Center"; Code[10])
{
Caption = 'Responsibility Center';
Editable = false;
TableRelation = "Responsibility Center";
}
field(5709; "Item Category Code"; Code[20])
{
Caption = 'Item Category Code';
TableRelation = "Item Category".Code;
}
field(5710; Nonstock; Boolean)
{
Caption = 'Catalog';
ToolTip = 'Specifies that the item on the credit memo line is a catalog item.';
Editable = false;
}
field(5725; "Item Reference No."; Code[50])
{
AccessByPermission = TableData "Item Reference" = R;
Caption = 'Item Reference No.';
ToolTip = 'Specifies the referenced item number.';
}
field(5726; "Item Reference Unit of Measure"; Code[10])
{
Caption = 'Unit of Measure (Item Ref.)';
TableRelation = if (Type = const(Item)) "Item Unit of Measure".Code where("Item No." = field("No."));
}
field(5727; "Item Reference Type"; Enum "Item Reference Type")
{
Caption = 'Item Reference Type';
}
field(5728; "Item Reference Type No."; Code[30])
{
Caption = 'Item Reference Type No.';
}
field(5811; "Appl.-from Item Entry"; Integer)
{
AccessByPermission = TableData Item = R;
Caption = 'Appl.-from Item Entry';
ToolTip = 'Specifies the number of the item ledger entry that the document or journal line is applied from.';
}
field(5902; "Service Item No."; Code[20])
{
Caption = 'Service Item No.';
ToolTip = 'Specifies the number of the service item linked to this credit memo line.';
TableRelation = "Service Item"."No.";
}
field(5903; "Appl.-to Service Entry"; Integer)
{
AccessByPermission = TableData Item = R;
Caption = 'Appl.-to Service Entry';
ToolTip = 'Specifies the number of the service ledger entry applied to this service credit memo.';
Editable = false;
}
field(5905; "Service Item Serial No."; Code[50])
{
Caption = 'Service Item Serial No.';
}
field(5906; "Service Item Line Description"; Text[100])
{
Caption = 'Service Item Line Description';
Editable = false;
}
field(5908; "Posting Date"; Date)
{
Caption = 'Posting Date';
}
field(5910; "Needed by Date"; Date)
{
Caption = 'Needed by Date';
}
field(5916; "Ship-to Code"; Code[10])
{
Caption = 'Ship-to Code';
Editable = false;
TableRelation = "Ship-to Address".Code where("Customer No." = field("Customer No."));
}
field(5928; "Service Price Group Code"; Code[10])
{
Caption = 'Service Price Group Code';
TableRelation = "Service Price Group";
}
field(5929; "Fault Area Code"; Code[10])
{
Caption = 'Fault Area Code';
TableRelation = "Fault Area";
}
field(5930; "Symptom Code"; Code[10])
{
Caption = 'Symptom Code';
TableRelation = "Symptom Code";
}
field(5931; "Fault Code"; Code[10])
{
Caption = 'Fault Code';
TableRelation = "Fault Code".Code where("Fault Area Code" = field("Fault Area Code"),
"Symptom Code" = field("Symptom Code"));
}
field(5932; "Resolution Code"; Code[10])
{
Caption = 'Resolution Code';
TableRelation = "Resolution Code";
}
field(5933; "Exclude Warranty"; Boolean)
{
Caption = 'Exclude Warranty';
Editable = true;
}
field(5934; Warranty; Boolean)
{
Caption = 'Warranty';
Editable = false;
}
field(5936; "Contract No."; Code[20])
{
Caption = 'Contract No.';
ToolTip = 'Specifies the number of the contract associated with the posted service credit memo.';
Editable = false;
TableRelation = "Service Contract Header"."Contract No." where("Contract Type" = const(Contract));
}
field(5938; "Contract Disc. %"; Decimal)
{
AutoFormatType = 0;
Caption = 'Contract Disc. %';
DecimalPlaces = 0 : 5;
Editable = false;
MaxValue = 100;
MinValue = 0;
}
field(5939; "Warranty Disc. %"; Decimal)
{
AutoFormatType = 0;
Caption = 'Warranty Disc. %';
DecimalPlaces = 0 : 5;
Editable = false;
MaxValue = 100;
MinValue = 0;
}
field(5965; "Component Line No."; Integer)
{
Caption = 'Component Line No.';
}
field(5966; "Spare Part Action"; Option)
{
Caption = 'Spare Part Action';
OptionCaption = ' ,Permanent,Temporary,Component Replaced,Component Installed';
OptionMembers = " ",Permanent,"Temporary","Component Replaced","Component Installed";
}
field(5967; "Fault Reason Code"; Code[10])
{
Caption = 'Fault Reason Code';
TableRelation = "Fault Reason Code";
}
field(5968; "Replaced Item No."; Code[20])
{
Caption = 'Replaced Item No.';
TableRelation = Item;
}
field(5969; "Exclude Contract Discount"; Boolean)
{
Caption = 'Exclude Contract Discount';
Editable = true;
}
field(5994; "Price Adjmt. Status"; Option)
{
Caption = 'Price Adjmt. Status';
Editable = false;
OptionCaption = ' ,Adjusted,Modified';
OptionMembers = " ",Adjusted,Modified;
}
field(5997; "Line Discount Type"; Option)
{
Caption = 'Line Discount Type';
Editable = false;
OptionCaption = ' ,Warranty Disc.,Contract Disc.,Line Disc.,Manual';
OptionMembers = " ","Warranty Disc.","Contract Disc.","Line Disc.",Manual;
}
field(5999; "Copy Components From"; Option)
{
Caption = 'Copy Components From';
OptionCaption = 'None,Item BOM,Old Service Item,Old Serv.Item w/o Serial No.';
OptionMembers = "None","Item BOM","Old Service Item","Old Serv.Item w/o Serial No.";
}
field(6608; "Return Reason Code"; Code[10])
{
Caption = 'Return Reason Code';
ToolTip = 'Specifies the code explaining why the item was returned.';
TableRelation = "Return Reason";
}
field(7000; "Price Calculation Method"; Enum "Price Calculation Method")
{
Caption = 'Price Calculation Method';
}
field(7001; "Allow Line Disc."; Boolean)
{
Caption = 'Allow Line Disc.';
}
field(7002; "Customer Disc. Group"; Code[20])
{
Caption = 'Customer Disc. Group';
TableRelation = "Customer Discount Group";
}
}
keys
{
key(Key1; "Document No.", "Line No.")
{
Clustered = true;
}
key(Key2; Type, "No.")
{
}
key(Key3; "Service Item No.", Type, "Posting Date")
{
}
key(Key4; "Document No.", "Service Item No.")
{
}
key(Key5; "Document No.")
{
Enabled = false;
SumIndexFields = Amount;
}
key(Key6; "Document No.", Type, "No.")
{
}
key(Key7; Type, "No.", "Variant Code", "Location Code", "Posting Date", "Shortcut Dimension 1 Code", "Shortcut Dimension 2 Code")
{
SumIndexFields = "Quantity (Base)";
}
key(Key8; "Appl.-to Service Entry")
{
}
key(Key9; "Document No.", "Component Line No.")
{
}
key(Key10; "Fault Reason Code")
{
}
key(Key11; "Customer No.")
{
}
key(Key12; "Document No.", Type)
{
MaintainSqlIndex = false;
SumIndexFields = Amount;
}
}
fieldgroups
{
}
var
DimMgt: Codeunit DimensionManagement;
procedure ShowDimensions()
begin
DimMgt.ShowDimensionSet("Dimension Set ID",
StrSubstNo('%1 %2 %3', TableCaption(), "Document No.", "Line No."));
end;
procedure CalcVATAmountLines(ServCrMemoHeader: Record "Service Cr.Memo Header"; var TempVATAmountLine: Record "VAT Amount Line" temporary)
begin
TempVATAmountLine.DeleteAll();
SetRange("Document No.", ServCrMemoHeader."No.");
if Find('-') then
repeat
TempVATAmountLine.Init();
Rec.CopyToVATAmountLine(TempVATAmountLine);
OnCalcVATAmountLinesOnBeforeInsertLine(ServCrMemoHeader, TempVATAmountLine);
TempVATAmountLine.InsertLine();
until Next() = 0;
end;
procedure CopyToVATAmountLine(var VATAmountLine: Record "VAT Amount Line")
begin
VATAmountLine."VAT Identifier" := Rec."VAT Identifier";
VATAmountLine."VAT Calculation Type" := Rec."VAT Calculation Type";
VATAmountLine."VAT Clause Code" := Rec."VAT Clause Code";
VATAmountLine."Tax Group Code" := Rec."Tax Group Code";
VATAmountLine."VAT %" := Rec."VAT %";
VATAmountLine."VAT Base" := Rec.Amount;
VATAmountLine."VAT Amount" := Rec."Amount Including VAT" - Rec.Amount;
VATAmountLine."Amount Including VAT" := Rec."Amount Including VAT";
VATAmountLine."Line Amount" := Rec."Line Amount";
if Rec."Allow Invoice Disc." then
VATAmountLine."Inv. Disc. Base Amount" := Rec."Line Amount";
VATAmountLine."Invoice Discount Amount" := Rec."Inv. Discount Amount";
VATAmountLine.Quantity := Rec."Quantity (Base)";
VATAmountLine."Calculated VAT Amount" :=
Rec."Amount Including VAT" - Rec.Amount - Rec."VAT Difference";
VATAmountLine."VAT Difference" := Rec."VAT Difference";
OnAfterCopyToVATAmountLine(Rec, VATAmountLine);
end;
procedure GetCaptionClass(FieldNumber: Integer): Text[80]
var
ServiceCMHeader: Record "Service Cr.Memo Header";
begin
if not ServiceCMHeader.Get("Document No.") then
ServiceCMHeader.Init();
if ServiceCMHeader."Prices Including VAT" then
exit('2,1,' + GetFieldCaption(FieldNumber));
exit('2,0,' + GetFieldCaption(FieldNumber));
end;
procedure ShowItemTrackingLines()
var
ItemTrackingDocMgt: Codeunit "Item Tracking Doc. Management";
begin
ItemTrackingDocMgt.ShowItemTrackingForInvoiceLine(RowID1());
end;
procedure ShowShortcutDimCode(var ShortcutDimCode: array[8] of Code[20])
begin
DimMgt.GetShortcutDimensions(Rec."Dimension Set ID", ShortcutDimCode);
end;
procedure RowID1(): Text[250]
var
ItemTrackingMgt: Codeunit "Item Tracking Management";
begin
exit(ItemTrackingMgt.ComposeRowID(DATABASE::"Service Cr.Memo Line", 0, "Document No.", '', 0, "Line No."));
end;
local procedure GetFieldCaption(FieldNumber: Integer): Text[100]
var
"Field": Record "Field";
begin
Field.Get(DATABASE::"Service Cr.Memo Line", FieldNumber);
exit(Field."Field Caption");
end;
procedure GetCurrencyCode(): Code[10]
var
ServiceCMHeader: Record "Service Cr.Memo Header";
begin
if "Document No." = ServiceCMHeader."No." then
exit(ServiceCMHeader."Currency Code");
if ServiceCMHeader.Get("Document No.") then
exit(ServiceCMHeader."Currency Code");
exit('');
end;
procedure FilterPstdDocLineValueEntries(var ValueEntry: Record "Value Entry")
begin
ValueEntry.Reset();
ValueEntry.SetCurrentKey("Document No.");
ValueEntry.SetRange("Document No.", "Document No.");
ValueEntry.SetRange("Document Type", ValueEntry."Document Type"::"Service Credit Memo");
ValueEntry.SetRange("Document Line No.", "Line No.");
end;
procedure SetSecurityFilterOnRespCenter()
var
UserSetupMgt: Codeunit "User Setup Management";
IsHandled: Boolean;
begin
IsHandled := false;
OnBeforeSetSecurityFilterOnRespCenter(Rec, IsHandled);
if IsHandled then
exit;
if UserSetupMgt.GetServiceFilter() <> '' then begin
FilterGroup(2);
SetRange("Responsibility Center", UserSetupMgt.GetServiceFilter());
FilterGroup(0);
end;
end;
internal procedure GetVATPct() VATPct: Decimal
begin
VATPct := "VAT %";
OnAfterGetVATPct(Rec, VATPct);
end;
[IntegrationEvent(false, false)]
local procedure OnCalcVATAmountLinesOnBeforeInsertLine(ServiceCrMemoHeader: Record "Service Cr.Memo Header"; var TempVATAmountLine: Record "VAT Amount Line" temporary)
begin
end;
[IntegrationEvent(false, false)]
local procedure OnBeforeSetSecurityFilterOnRespCenter(var ServiceCrMemoLine: Record "Service Cr.Memo Line"; var IsHandled: Boolean)
begin
end;
[IntegrationEvent(false, false)]
local procedure OnAfterCopyToVATAmountLine(ServiceCrMemoLine: Record "Service Cr.Memo Line"; var VATAmountLine: Record "VAT Amount Line")
begin
end;
[IntegrationEvent(false, false)]
local procedure OnAfterGetVATPct(var ServiceCrMemoLine: Record "Service Cr.Memo Line"; var VATPct: Decimal)
begin
end;
}