diff --git a/src/Layers/APAC/BaseApp/Finance/GeneralLedger/Journal/GenJournalLine.Table.al b/src/Layers/APAC/BaseApp/Finance/GeneralLedger/Journal/GenJournalLine.Table.al index cd0571446e5..409d727000c 100644 --- a/src/Layers/APAC/BaseApp/Finance/GeneralLedger/Journal/GenJournalLine.Table.al +++ b/src/Layers/APAC/BaseApp/Finance/GeneralLedger/Journal/GenJournalLine.Table.al @@ -2750,6 +2750,11 @@ table 81 "Gen. Journal Line" Editable = false; FieldClass = FlowField; } + field(395; "Business Activity Code"; Code[10]) + { + Caption = 'Business Activity Code'; + TableRelation = "Business Activity".Code; + } /// /// Dimension set identifier linking to dimension value combinations for analytical reporting and cost center tracking. /// diff --git a/src/Layers/APAC/BaseApp/Finance/GeneralLedger/Journal/PostedGenJournalLine.Table.al b/src/Layers/APAC/BaseApp/Finance/GeneralLedger/Journal/PostedGenJournalLine.Table.al index f1b1023f5c6..cab7e985c7d 100644 --- a/src/Layers/APAC/BaseApp/Finance/GeneralLedger/Journal/PostedGenJournalLine.Table.al +++ b/src/Layers/APAC/BaseApp/Finance/GeneralLedger/Journal/PostedGenJournalLine.Table.al @@ -1224,6 +1224,11 @@ table 181 "Posted Gen. Journal Line" Caption = 'Exported to Payment File'; Editable = false; } + field(395; "Business Activity Code"; Code[10]) + { + Caption = 'Business Activity Code'; + TableRelation = "Business Activity".Code; + } /// /// Dimension set identifier linking posted entries to dimension combinations for analytical reporting and financial analysis. /// diff --git a/src/Layers/APAC/BaseApp/Finance/GeneralLedger/Setup/GeneralLedgerSetup.Table.al b/src/Layers/APAC/BaseApp/Finance/GeneralLedger/Setup/GeneralLedgerSetup.Table.al index a54f392d817..6d93a832968 100644 --- a/src/Layers/APAC/BaseApp/Finance/GeneralLedger/Setup/GeneralLedgerSetup.Table.al +++ b/src/Layers/APAC/BaseApp/Finance/GeneralLedger/Setup/GeneralLedgerSetup.Table.al @@ -1442,6 +1442,10 @@ table 98 "General Ledger Setup" Caption = 'Use Concurrent Posting'; ToolTip = 'Specifies whether to use concurrent posting when posting journals. Concurrent posting can reduce the time it takes to post journals by allowing multiple batches to be posted at the same time. Enabling this option requires additional configuration and setup, such as setting up a batch job to run the concurrent posting process and ensuring that your system has the necessary resources to support concurrent processing.'; } + field(395; "Use Business Activity Code"; Boolean) + { + Caption = 'Use Business Activity Code'; + } field(11600; "BAS to be Lodged as a Group"; Boolean) { Caption = 'BAS to be Lodged as a Group'; diff --git a/src/Layers/APAC/BaseApp/Finance/VAT/Ledger/VATEntry.Table.al b/src/Layers/APAC/BaseApp/Finance/VAT/Ledger/VATEntry.Table.al index 01df9e03cd7..7719998ecc1 100644 --- a/src/Layers/APAC/BaseApp/Finance/VAT/Ledger/VATEntry.Table.al +++ b/src/Layers/APAC/BaseApp/Finance/VAT/Ledger/VATEntry.Table.al @@ -774,6 +774,11 @@ table 254 "VAT Entry" TableRelation = "G/L Register"; ToolTip = 'Specifies the G/L register number that groups related G/L entries from the same posting.'; } + field(395; "Business Activity Code"; Code[10]) + { + Caption = 'Business Activity Code'; + TableRelation = "Business Activity".Code; + } /// /// Percentage of VAT that is non-deductible based on business use or regulatory restrictions. /// diff --git a/src/Layers/APAC/BaseApp/Foundation/Company/CompanyInformation.Table.al b/src/Layers/APAC/BaseApp/Foundation/Company/CompanyInformation.Table.al index 29b9c42c411..9af6f67c2bd 100644 --- a/src/Layers/APAC/BaseApp/Foundation/Company/CompanyInformation.Table.al +++ b/src/Layers/APAC/BaseApp/Foundation/Company/CompanyInformation.Table.al @@ -9,6 +9,7 @@ using Microsoft.EServices.OnlineMap; using Microsoft.Finance.VAT.Registration; using Microsoft.Finance.WithholdingTax; using Microsoft.Foundation.Address; +using Microsoft.Foundation.AuditCodes; using Microsoft.Foundation.Calendar; using Microsoft.Foundation.Enums; using Microsoft.Inventory.Item; @@ -471,6 +472,11 @@ table 79 "Company Information" SetBrandColorValue(); end; } + field(395; "Business Activity Code"; Code[10]) + { + Caption = 'Business Activity Code'; + TableRelation = "Business Activity".Code; + } field(5700; "Responsibility Center"; Code[10]) { Caption = 'Responsibility Center'; diff --git a/src/Layers/APAC/BaseApp/Purchases/Archive/PurchaseHeaderArchive.Table.al b/src/Layers/APAC/BaseApp/Purchases/Archive/PurchaseHeaderArchive.Table.al index 762ef95f913..5dd37e8722e 100644 --- a/src/Layers/APAC/BaseApp/Purchases/Archive/PurchaseHeaderArchive.Table.al +++ b/src/Layers/APAC/BaseApp/Purchases/Archive/PurchaseHeaderArchive.Table.al @@ -742,6 +742,11 @@ table 5109 "Purchase Header Archive" ToolTip = 'Specifies the telephone number of the company''s shipping address.'; ExtendedDatatype = PhoneNo; } + field(395; "Business Activity Code"; Code[10]) + { + Caption = 'Business Activity Code'; + TableRelation = "Business Activity".Code; + } field(480; "Dimension Set ID"; Integer) { Caption = 'Dimension Set ID'; diff --git a/src/Layers/APAC/BaseApp/Purchases/Document/PurchaseHeader.Table.al b/src/Layers/APAC/BaseApp/Purchases/Document/PurchaseHeader.Table.al index 58b67acca99..fc3015ce93d 100644 --- a/src/Layers/APAC/BaseApp/Purchases/Document/PurchaseHeader.Table.al +++ b/src/Layers/APAC/BaseApp/Purchases/Document/PurchaseHeader.Table.al @@ -2330,6 +2330,11 @@ table 38 "Purchase Header" FieldClass = FlowField; AutoFormatType = 1; } + field(395; "Business Activity Code"; Code[10]) + { + Caption = 'Business Activity Code'; + TableRelation = "Business Activity".Code; + } field(480; "Dimension Set ID"; Integer) { Caption = 'Dimension Set ID'; diff --git a/src/Layers/APAC/BaseApp/Purchases/History/PurchCrMemoHdr.Table.al b/src/Layers/APAC/BaseApp/Purchases/History/PurchCrMemoHdr.Table.al index 37879dd578b..5ade51ea982 100644 --- a/src/Layers/APAC/BaseApp/Purchases/History/PurchCrMemoHdr.Table.al +++ b/src/Layers/APAC/BaseApp/Purchases/History/PurchCrMemoHdr.Table.al @@ -567,6 +567,12 @@ table 124 "Purch. Cr. Memo Hdr." ToolTip = 'Specifies the telephone number of the company''s shipping address.'; ExtendedDatatype = PhoneNo; } + field(395; "Business Activity Code"; Code[10]) + { + Caption = 'Business Activity Code'; + Editable = false; + TableRelation = "Business Activity".Code; + } field(480; "Dimension Set ID"; Integer) { Caption = 'Dimension Set ID'; diff --git a/src/Layers/APAC/BaseApp/Purchases/History/PurchInvHeader.Table.al b/src/Layers/APAC/BaseApp/Purchases/History/PurchInvHeader.Table.al index 9b4ccb39ff4..17e4845d33f 100644 --- a/src/Layers/APAC/BaseApp/Purchases/History/PurchInvHeader.Table.al +++ b/src/Layers/APAC/BaseApp/Purchases/History/PurchInvHeader.Table.al @@ -616,6 +616,12 @@ table 122 "Purch. Inv. Header" ToolTip = 'Specifies the telephone number of the company''s shipping address.'; ExtendedDatatype = PhoneNo; } + field(395; "Business Activity Code"; Code[10]) + { + Caption = 'Business Activity Code'; + Editable = false; + TableRelation = "Business Activity".Code; + } field(480; "Dimension Set ID"; Integer) { Caption = 'Dimension Set ID'; diff --git a/src/Layers/APAC/BaseApp/Sales/Archive/SalesHeaderArchive.Table.al b/src/Layers/APAC/BaseApp/Sales/Archive/SalesHeaderArchive.Table.al index 706ee9687d2..442a60f5fd0 100644 --- a/src/Layers/APAC/BaseApp/Sales/Archive/SalesHeaderArchive.Table.al +++ b/src/Layers/APAC/BaseApp/Sales/Archive/SalesHeaderArchive.Table.al @@ -1190,6 +1190,11 @@ table 5107 "Sales Header Archive" ExtendedDatatype = PhoneNo; ToolTip = 'Specifies the telephone number of the company''s shipping address.'; } + field(395; "Business Activity Code"; Code[10]) + { + Caption = 'Business Activity Code'; + TableRelation = "Business Activity".Code; + } /// /// Specifies the unique identifier for the combination of dimension values assigned to this document. /// diff --git a/src/Layers/APAC/BaseApp/Sales/Document/SalesHeader.Table.al b/src/Layers/APAC/BaseApp/Sales/Document/SalesHeader.Table.al index 9cff15854dc..f3113e5161b 100644 --- a/src/Layers/APAC/BaseApp/Sales/Document/SalesHeader.Table.al +++ b/src/Layers/APAC/BaseApp/Sales/Document/SalesHeader.Table.al @@ -2937,6 +2937,11 @@ table 36 "Sales Header" Editable = false; FieldClass = FlowField; } + field(395; "Business Activity Code"; Code[10]) + { + Caption = 'Business Activity Code'; + TableRelation = "Business Activity".Code; + } /// /// Specifies the identifier for the combination of dimensions applied to the document. /// diff --git a/src/Layers/APAC/BaseApp/Sales/History/SalesCrMemoHeader.Table.al b/src/Layers/APAC/BaseApp/Sales/History/SalesCrMemoHeader.Table.al index 71b54216941..e7a7a2b2023 100644 --- a/src/Layers/APAC/BaseApp/Sales/History/SalesCrMemoHeader.Table.al +++ b/src/Layers/APAC/BaseApp/Sales/History/SalesCrMemoHeader.Table.al @@ -940,6 +940,12 @@ table 114 "Sales Cr.Memo Header" ToolTip = 'Specifies the telephone number of the company''s shipping address.'; ExtendedDatatype = PhoneNo; } + field(395; "Business Activity Code"; Code[10]) + { + Caption = 'Business Activity Code'; + Editable = false; + TableRelation = "Business Activity".Code; + } /// /// Specifies the unique identifier for the dimension set applied to this credit memo. /// diff --git a/src/Layers/APAC/BaseApp/Sales/History/SalesInvoiceHeader.Table.al b/src/Layers/APAC/BaseApp/Sales/History/SalesInvoiceHeader.Table.al index a7a5aef1ae3..3d0bcb21798 100644 --- a/src/Layers/APAC/BaseApp/Sales/History/SalesInvoiceHeader.Table.al +++ b/src/Layers/APAC/BaseApp/Sales/History/SalesInvoiceHeader.Table.al @@ -1016,6 +1016,12 @@ table 112 "Sales Invoice Header" ToolTip = 'Specifies the telephone number of the company''s shipping address.'; ExtendedDatatype = PhoneNo; } + field(395; "Business Activity Code"; Code[10]) + { + Caption = 'Business Activity Code'; + Editable = false; + TableRelation = "Business Activity".Code; + } /// /// Specifies the unique identifier for the dimension set applied to this document. /// diff --git a/src/Layers/AT/BaseApp/Foundation/Company/CompanyInformation.Table.al b/src/Layers/AT/BaseApp/Foundation/Company/CompanyInformation.Table.al index f1c227ae563..0f5220efd40 100644 --- a/src/Layers/AT/BaseApp/Foundation/Company/CompanyInformation.Table.al +++ b/src/Layers/AT/BaseApp/Foundation/Company/CompanyInformation.Table.al @@ -8,6 +8,7 @@ using Microsoft.Bank.Setup; using Microsoft.EServices.OnlineMap; using Microsoft.Finance.VAT.Registration; using Microsoft.Foundation.Address; +using Microsoft.Foundation.AuditCodes; using Microsoft.Foundation.Calendar; using Microsoft.Foundation.Enums; using Microsoft.Inventory.Intrastat; @@ -474,6 +475,11 @@ table 79 "Company Information" SetBrandColorValue(); end; } + field(395; "Business Activity Code"; Code[10]) + { + Caption = 'Business Activity Code'; + TableRelation = "Business Activity".Code; + } field(5700; "Responsibility Center"; Code[10]) { Caption = 'Responsibility Center'; @@ -1014,4 +1020,4 @@ table 79 "Company Information" begin end; -} +} \ No newline at end of file diff --git a/src/Layers/BE/BaseApp/Finance/GeneralLedger/Journal/GenJournalLine.Table.al b/src/Layers/BE/BaseApp/Finance/GeneralLedger/Journal/GenJournalLine.Table.al index 05a9cd5d8e1..5a3d8066de3 100644 --- a/src/Layers/BE/BaseApp/Finance/GeneralLedger/Journal/GenJournalLine.Table.al +++ b/src/Layers/BE/BaseApp/Finance/GeneralLedger/Journal/GenJournalLine.Table.al @@ -2754,6 +2754,11 @@ table 81 "Gen. Journal Line" Editable = false; FieldClass = FlowField; } + field(395; "Business Activity Code"; Code[10]) + { + Caption = 'Business Activity Code'; + TableRelation = "Business Activity".Code; + } /// /// Dimension set identifier linking to dimension value combinations for analytical reporting and cost center tracking. /// diff --git a/src/Layers/BE/BaseApp/Finance/GeneralLedger/Journal/PostedGenJournalLine.Table.al b/src/Layers/BE/BaseApp/Finance/GeneralLedger/Journal/PostedGenJournalLine.Table.al index cd2a449e89f..683db0e99f5 100644 --- a/src/Layers/BE/BaseApp/Finance/GeneralLedger/Journal/PostedGenJournalLine.Table.al +++ b/src/Layers/BE/BaseApp/Finance/GeneralLedger/Journal/PostedGenJournalLine.Table.al @@ -1222,6 +1222,11 @@ table 181 "Posted Gen. Journal Line" Caption = 'Exported to Payment File'; Editable = false; } + field(395; "Business Activity Code"; Code[10]) + { + Caption = 'Business Activity Code'; + TableRelation = "Business Activity".Code; + } /// /// Dimension set identifier linking posted entries to dimension combinations for analytical reporting and financial analysis. /// diff --git a/src/Layers/BE/BaseApp/Finance/GeneralLedger/Setup/GeneralLedgerSetup.Table.al b/src/Layers/BE/BaseApp/Finance/GeneralLedger/Setup/GeneralLedgerSetup.Table.al index 1377b941500..fc6a6d238fc 100644 --- a/src/Layers/BE/BaseApp/Finance/GeneralLedger/Setup/GeneralLedgerSetup.Table.al +++ b/src/Layers/BE/BaseApp/Finance/GeneralLedger/Setup/GeneralLedgerSetup.Table.al @@ -1444,6 +1444,10 @@ table 98 "General Ledger Setup" Caption = 'Use Concurrent Posting'; ToolTip = 'Specifies whether to use concurrent posting when posting journals. Concurrent posting can reduce the time it takes to post journals by allowing multiple batches to be posted at the same time. Enabling this option requires additional configuration and setup, such as setting up a batch job to run the concurrent posting process and ensuring that your system has the necessary resources to support concurrent processing.'; } + field(395; "Use Business Activity Code"; Boolean) + { + Caption = 'Use Business Activity Code'; + } field(11315; "VAT Statement Template Name"; Code[10]) { Caption = 'VAT Statement Template Name'; diff --git a/src/Layers/BE/BaseApp/Finance/VAT/Ledger/VATEntry.Table.al b/src/Layers/BE/BaseApp/Finance/VAT/Ledger/VATEntry.Table.al index 626cd98003a..67b89c63ce2 100644 --- a/src/Layers/BE/BaseApp/Finance/VAT/Ledger/VATEntry.Table.al +++ b/src/Layers/BE/BaseApp/Finance/VAT/Ledger/VATEntry.Table.al @@ -774,6 +774,11 @@ table 254 "VAT Entry" TableRelation = "G/L Register"; ToolTip = 'Specifies the G/L register number that groups related G/L entries from the same posting.'; } + field(395; "Business Activity Code"; Code[10]) + { + Caption = 'Business Activity Code'; + TableRelation = "Business Activity".Code; + } /// /// Percentage of VAT that is non-deductible based on business use or regulatory restrictions. /// diff --git a/src/Layers/BE/BaseApp/Finance/VAT/Setup/VATSetup.Page.al b/src/Layers/BE/BaseApp/Finance/VAT/Setup/VATSetup.Page.al index 6fe4c284b7d..42d1cb81616 100644 --- a/src/Layers/BE/BaseApp/Finance/VAT/Setup/VATSetup.Page.al +++ b/src/Layers/BE/BaseApp/Finance/VAT/Setup/VATSetup.Page.al @@ -253,7 +253,6 @@ page 187 "VAT Setup" end; end; - var IsVATDateEnabled: Boolean; } diff --git a/src/Layers/BE/BaseApp/Finance/VAT/Setup/VATSetup.Table.al b/src/Layers/BE/BaseApp/Finance/VAT/Setup/VATSetup.Table.al index a691dddc5d6..7da722ed32a 100644 --- a/src/Layers/BE/BaseApp/Finance/VAT/Setup/VATSetup.Table.al +++ b/src/Layers/BE/BaseApp/Finance/VAT/Setup/VATSetup.Table.al @@ -150,6 +150,10 @@ table 189 "VAT Setup" { Caption = 'Ship-To Alt. Cust. VAT Reg.'; } + field(395; "Per Business Activity Code Settl. Entry"; Boolean) + { + Caption = 'Per Business Activity Code Settlement Entry'; + } } keys diff --git a/src/Layers/BE/BaseApp/Foundation/Company/CompanyInformation.Table.al b/src/Layers/BE/BaseApp/Foundation/Company/CompanyInformation.Table.al index eb32cca9999..9c335bea77c 100644 --- a/src/Layers/BE/BaseApp/Foundation/Company/CompanyInformation.Table.al +++ b/src/Layers/BE/BaseApp/Foundation/Company/CompanyInformation.Table.al @@ -8,6 +8,7 @@ using Microsoft.Bank.Setup; using Microsoft.EServices.OnlineMap; using Microsoft.Finance.VAT.Registration; using Microsoft.Foundation.Address; +using Microsoft.Foundation.AuditCodes; using Microsoft.Foundation.Calendar; using Microsoft.Foundation.Enums; using Microsoft.Inventory.Item; @@ -468,6 +469,11 @@ table 79 "Company Information" SetBrandColorValue(); end; } + field(395; "Business Activity Code"; Code[10]) + { + Caption = 'Business Activity Code'; + TableRelation = "Business Activity".Code; + } field(5700; "Responsibility Center"; Code[10]) { Caption = 'Responsibility Center'; diff --git a/src/Layers/BE/BaseApp/Purchases/Archive/PurchaseHeaderArchive.Table.al b/src/Layers/BE/BaseApp/Purchases/Archive/PurchaseHeaderArchive.Table.al index c924b210919..7b75100b34d 100644 --- a/src/Layers/BE/BaseApp/Purchases/Archive/PurchaseHeaderArchive.Table.al +++ b/src/Layers/BE/BaseApp/Purchases/Archive/PurchaseHeaderArchive.Table.al @@ -741,6 +741,11 @@ table 5109 "Purchase Header Archive" ToolTip = 'Specifies the telephone number of the company''s shipping address.'; ExtendedDatatype = PhoneNo; } + field(395; "Business Activity Code"; Code[10]) + { + Caption = 'Business Activity Code'; + TableRelation = "Business Activity".Code; + } field(480; "Dimension Set ID"; Integer) { Caption = 'Dimension Set ID'; diff --git a/src/Layers/BE/BaseApp/Purchases/Document/PurchaseHeader.Table.al b/src/Layers/BE/BaseApp/Purchases/Document/PurchaseHeader.Table.al index b3e4659b1d1..0a4908fea03 100644 --- a/src/Layers/BE/BaseApp/Purchases/Document/PurchaseHeader.Table.al +++ b/src/Layers/BE/BaseApp/Purchases/Document/PurchaseHeader.Table.al @@ -2324,6 +2324,11 @@ table 38 "Purchase Header" FieldClass = FlowField; AutoFormatType = 1; } + field(395; "Business Activity Code"; Code[10]) + { + Caption = 'Business Activity Code'; + TableRelation = "Business Activity".Code; + } field(480; "Dimension Set ID"; Integer) { Caption = 'Dimension Set ID'; diff --git a/src/Layers/BE/BaseApp/Purchases/History/PurchCrMemoHdr.Table.al b/src/Layers/BE/BaseApp/Purchases/History/PurchCrMemoHdr.Table.al index 14a4c6325b8..1af53afbf4e 100644 --- a/src/Layers/BE/BaseApp/Purchases/History/PurchCrMemoHdr.Table.al +++ b/src/Layers/BE/BaseApp/Purchases/History/PurchCrMemoHdr.Table.al @@ -566,6 +566,12 @@ table 124 "Purch. Cr. Memo Hdr." ToolTip = 'Specifies the telephone number of the company''s shipping address.'; ExtendedDatatype = PhoneNo; } + field(395; "Business Activity Code"; Code[10]) + { + Caption = 'Business Activity Code'; + Editable = false; + TableRelation = "Business Activity".Code; + } field(480; "Dimension Set ID"; Integer) { Caption = 'Dimension Set ID'; diff --git a/src/Layers/BE/BaseApp/Purchases/History/PurchInvHeader.Table.al b/src/Layers/BE/BaseApp/Purchases/History/PurchInvHeader.Table.al index ea658cfb7ee..2db3df13389 100644 --- a/src/Layers/BE/BaseApp/Purchases/History/PurchInvHeader.Table.al +++ b/src/Layers/BE/BaseApp/Purchases/History/PurchInvHeader.Table.al @@ -615,6 +615,12 @@ table 122 "Purch. Inv. Header" ToolTip = 'Specifies the telephone number of the company''s shipping address.'; ExtendedDatatype = PhoneNo; } + field(395; "Business Activity Code"; Code[10]) + { + Caption = 'Business Activity Code'; + Editable = false; + TableRelation = "Business Activity".Code; + } field(480; "Dimension Set ID"; Integer) { Caption = 'Dimension Set ID'; diff --git a/src/Layers/BE/BaseApp/Sales/Archive/SalesHeaderArchive.Table.al b/src/Layers/BE/BaseApp/Sales/Archive/SalesHeaderArchive.Table.al index 95dcd3a7f45..9492343b73e 100644 --- a/src/Layers/BE/BaseApp/Sales/Archive/SalesHeaderArchive.Table.al +++ b/src/Layers/BE/BaseApp/Sales/Archive/SalesHeaderArchive.Table.al @@ -1189,6 +1189,11 @@ table 5107 "Sales Header Archive" ExtendedDatatype = PhoneNo; ToolTip = 'Specifies the telephone number of the company''s shipping address.'; } + field(395; "Business Activity Code"; Code[10]) + { + Caption = 'Business Activity Code'; + TableRelation = "Business Activity".Code; + } /// /// Specifies the unique identifier for the combination of dimension values assigned to this document. /// diff --git a/src/Layers/BE/BaseApp/Sales/Document/SalesHeader.Table.al b/src/Layers/BE/BaseApp/Sales/Document/SalesHeader.Table.al index 76e931d8d08..a014679a52c 100644 --- a/src/Layers/BE/BaseApp/Sales/Document/SalesHeader.Table.al +++ b/src/Layers/BE/BaseApp/Sales/Document/SalesHeader.Table.al @@ -2935,6 +2935,11 @@ table 36 "Sales Header" Editable = false; FieldClass = FlowField; } + field(395; "Business Activity Code"; Code[10]) + { + Caption = 'Business Activity Code'; + TableRelation = "Business Activity".Code; + } /// /// Specifies the identifier for the combination of dimensions applied to the document. /// diff --git a/src/Layers/BE/BaseApp/Sales/FinanceCharge/FinanceChargeMemoHeader.Table.al b/src/Layers/BE/BaseApp/Sales/FinanceCharge/FinanceChargeMemoHeader.Table.al index 8d29cf8f6ce..ceda21a3b45 100644 --- a/src/Layers/BE/BaseApp/Sales/FinanceCharge/FinanceChargeMemoHeader.Table.al +++ b/src/Layers/BE/BaseApp/Sales/FinanceCharge/FinanceChargeMemoHeader.Table.al @@ -583,6 +583,11 @@ table 302 "Finance Charge Memo Header" ToolTip = 'Specifies the bank account to use for bank information when the document is printed.'; TableRelation = "Bank Account" where("Currency Code" = field("Currency Code")); } + field(395; "Business Activity Code"; Code[10]) + { + Caption = 'Business Activity Code'; + TableRelation = "Business Activity".Code; + } /// /// Specifies the unique identifier for the combination of dimension values assigned to this memo. /// @@ -659,9 +664,9 @@ table 302 "Finance Charge Memo Header" 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"); + if NoSeries.AreRelated("No. Series", xRec."No. Series") then + "No. Series" := xRec."No. Series"; + "No." := NoSeries.GetNextNo("No. Series", "Posting Date"); end; "Posting Description" := StrSubstNo(Text000, "No."); @@ -674,8 +679,8 @@ table 302 "Finance Charge Memo Header" then "Issuing No. Series" := "No. Series" else - if NoSeries.IsAutomatic(GetIssuingNoSeriesCode()) then - "Issuing No. Series" := GetIssuingNoSeriesCode(); + if NoSeries.IsAutomatic(GetIssuingNoSeriesCode()) then + "Issuing No. Series" := GetIssuingNoSeriesCode(); if "Posting Date" = 0D then "Posting Date" := WorkDate(); diff --git a/src/Layers/BE/BaseApp/Sales/FinanceCharge/IssuedFinChargeMemoHeader.Table.al b/src/Layers/BE/BaseApp/Sales/FinanceCharge/IssuedFinChargeMemoHeader.Table.al index e7a6dc5a81c..ea629da8fc1 100644 --- a/src/Layers/BE/BaseApp/Sales/FinanceCharge/IssuedFinChargeMemoHeader.Table.al +++ b/src/Layers/BE/BaseApp/Sales/FinanceCharge/IssuedFinChargeMemoHeader.Table.al @@ -457,6 +457,11 @@ table 304 "Issued Fin. Charge Memo Header" ToolTip = 'Specifies the bank account to use for bank information when the document is printed.'; TableRelation = "Bank Account" where("Currency Code" = field("Currency Code")); } + field(395; "Business Activity Code"; Code[10]) + { + Caption = 'Business Activity Code'; + TableRelation = "Business Activity".Code; + } /// /// Specifies the unique identifier for the dimension values assigned to this memo. /// diff --git a/src/Layers/BE/BaseApp/Sales/History/SalesCrMemoHeader.Table.al b/src/Layers/BE/BaseApp/Sales/History/SalesCrMemoHeader.Table.al index 5c655d3c39f..3799496c78b 100644 --- a/src/Layers/BE/BaseApp/Sales/History/SalesCrMemoHeader.Table.al +++ b/src/Layers/BE/BaseApp/Sales/History/SalesCrMemoHeader.Table.al @@ -939,6 +939,12 @@ table 114 "Sales Cr.Memo Header" ToolTip = 'Specifies the telephone number of the company''s shipping address.'; ExtendedDatatype = PhoneNo; } + field(395; "Business Activity Code"; Code[10]) + { + Caption = 'Business Activity Code'; + Editable = false; + TableRelation = "Business Activity".Code; + } /// /// Specifies the unique identifier for the dimension set applied to this credit memo. /// diff --git a/src/Layers/BE/BaseApp/Sales/History/SalesInvoiceHeader.Table.al b/src/Layers/BE/BaseApp/Sales/History/SalesInvoiceHeader.Table.al index 45898266717..3e85ab33bf1 100644 --- a/src/Layers/BE/BaseApp/Sales/History/SalesInvoiceHeader.Table.al +++ b/src/Layers/BE/BaseApp/Sales/History/SalesInvoiceHeader.Table.al @@ -1015,6 +1015,12 @@ table 112 "Sales Invoice Header" ToolTip = 'Specifies the telephone number of the company''s shipping address.'; ExtendedDatatype = PhoneNo; } + field(395; "Business Activity Code"; Code[10]) + { + Caption = 'Business Activity Code'; + Editable = false; + TableRelation = "Business Activity".Code; + } /// /// Specifies the unique identifier for the dimension set applied to this document. /// diff --git a/src/Layers/CH/BaseApp/Finance/GeneralLedger/Journal/GenJournalLine.Table.al b/src/Layers/CH/BaseApp/Finance/GeneralLedger/Journal/GenJournalLine.Table.al index 9eb7337c73e..fc290cb71c3 100644 --- a/src/Layers/CH/BaseApp/Finance/GeneralLedger/Journal/GenJournalLine.Table.al +++ b/src/Layers/CH/BaseApp/Finance/GeneralLedger/Journal/GenJournalLine.Table.al @@ -2773,6 +2773,11 @@ table 81 "Gen. Journal Line" Editable = false; FieldClass = FlowField; } + field(395; "Business Activity Code"; Code[10]) + { + Caption = 'Business Activity Code'; + TableRelation = "Business Activity".Code; + } /// /// Dimension set identifier linking to dimension value combinations for analytical reporting and cost center tracking. /// diff --git a/src/Layers/CH/BaseApp/Finance/GeneralLedger/Journal/PostedGenJournalLine.Table.al b/src/Layers/CH/BaseApp/Finance/GeneralLedger/Journal/PostedGenJournalLine.Table.al index 0f7955cbf7d..5e1390e8ac3 100644 --- a/src/Layers/CH/BaseApp/Finance/GeneralLedger/Journal/PostedGenJournalLine.Table.al +++ b/src/Layers/CH/BaseApp/Finance/GeneralLedger/Journal/PostedGenJournalLine.Table.al @@ -1223,6 +1223,11 @@ table 181 "Posted Gen. Journal Line" Caption = 'Exported to Payment File'; Editable = false; } + field(395; "Business Activity Code"; Code[10]) + { + Caption = 'Business Activity Code'; + TableRelation = "Business Activity".Code; + } /// /// Dimension set identifier linking posted entries to dimension combinations for analytical reporting and financial analysis. /// diff --git a/src/Layers/CH/BaseApp/Finance/GeneralLedger/Setup/GeneralLedgerSetup.Table.al b/src/Layers/CH/BaseApp/Finance/GeneralLedger/Setup/GeneralLedgerSetup.Table.al index 1083c981aa1..cb5d22c018d 100644 --- a/src/Layers/CH/BaseApp/Finance/GeneralLedger/Setup/GeneralLedgerSetup.Table.al +++ b/src/Layers/CH/BaseApp/Finance/GeneralLedger/Setup/GeneralLedgerSetup.Table.al @@ -1444,6 +1444,10 @@ table 98 "General Ledger Setup" Caption = 'Use Concurrent Posting'; ToolTip = 'Specifies whether to use concurrent posting when posting journals. Concurrent posting can reduce the time it takes to post journals by allowing multiple batches to be posted at the same time. Enabling this option requires additional configuration and setup, such as setting up a batch job to run the concurrent posting process and ensuring that your system has the necessary resources to support concurrent processing.'; } + field(395; "Use Business Activity Code"; Boolean) + { + Caption = 'Use Business Activity Code'; + } field(11003; "Currency Code For EURO"; Code[10]) { Caption = 'Currency Code For EURO'; diff --git a/src/Layers/CH/BaseApp/Finance/VAT/Ledger/VATEntry.Table.al b/src/Layers/CH/BaseApp/Finance/VAT/Ledger/VATEntry.Table.al index 93e38346d57..21819effee1 100644 --- a/src/Layers/CH/BaseApp/Finance/VAT/Ledger/VATEntry.Table.al +++ b/src/Layers/CH/BaseApp/Finance/VAT/Ledger/VATEntry.Table.al @@ -771,6 +771,11 @@ table 254 "VAT Entry" TableRelation = "G/L Register"; ToolTip = 'Specifies the G/L register number that groups related G/L entries from the same posting.'; } + field(395; "Business Activity Code"; Code[10]) + { + Caption = 'Business Activity Code'; + TableRelation = "Business Activity".Code; + } /// /// Percentage of VAT that is non-deductible based on business use or regulatory restrictions. /// diff --git a/src/Layers/CH/BaseApp/Foundation/Company/CompanyInformation.Table.al b/src/Layers/CH/BaseApp/Foundation/Company/CompanyInformation.Table.al index 4883eea7386..6f774843982 100644 --- a/src/Layers/CH/BaseApp/Foundation/Company/CompanyInformation.Table.al +++ b/src/Layers/CH/BaseApp/Foundation/Company/CompanyInformation.Table.al @@ -8,6 +8,7 @@ using Microsoft.Bank.Setup; using Microsoft.EServices.OnlineMap; using Microsoft.Finance.VAT.Registration; using Microsoft.Foundation.Address; +using Microsoft.Foundation.AuditCodes; using Microsoft.Foundation.Calendar; using Microsoft.Foundation.Enums; using Microsoft.Inventory.Intrastat; @@ -475,6 +476,11 @@ table 79 "Company Information" SetBrandColorValue(); end; } + field(395; "Business Activity Code"; Code[10]) + { + Caption = 'Business Activity Code'; + TableRelation = "Business Activity".Code; + } field(5700; "Responsibility Center"; Code[10]) { Caption = 'Responsibility Center'; @@ -1004,4 +1010,4 @@ table 79 "Company Information" begin end; -} +} \ No newline at end of file diff --git a/src/Layers/CH/BaseApp/Purchases/Archive/PurchaseHeaderArchive.Table.al b/src/Layers/CH/BaseApp/Purchases/Archive/PurchaseHeaderArchive.Table.al index 3c3db4cf655..bf7a8d1edf5 100644 --- a/src/Layers/CH/BaseApp/Purchases/Archive/PurchaseHeaderArchive.Table.al +++ b/src/Layers/CH/BaseApp/Purchases/Archive/PurchaseHeaderArchive.Table.al @@ -741,6 +741,11 @@ table 5109 "Purchase Header Archive" ToolTip = 'Specifies the telephone number of the company''s shipping address.'; ExtendedDatatype = PhoneNo; } + field(395; "Business Activity Code"; Code[10]) + { + Caption = 'Business Activity Code'; + TableRelation = "Business Activity".Code; + } field(480; "Dimension Set ID"; Integer) { Caption = 'Dimension Set ID'; diff --git a/src/Layers/CH/BaseApp/Purchases/Document/PurchaseHeader.Table.al b/src/Layers/CH/BaseApp/Purchases/Document/PurchaseHeader.Table.al index e275a67a24c..b6548d4555c 100644 --- a/src/Layers/CH/BaseApp/Purchases/Document/PurchaseHeader.Table.al +++ b/src/Layers/CH/BaseApp/Purchases/Document/PurchaseHeader.Table.al @@ -2319,6 +2319,11 @@ table 38 "Purchase Header" FieldClass = FlowField; AutoFormatType = 1; } + field(395; "Business Activity Code"; Code[10]) + { + Caption = 'Business Activity Code'; + TableRelation = "Business Activity".Code; + } field(480; "Dimension Set ID"; Integer) { Caption = 'Dimension Set ID'; diff --git a/src/Layers/CH/BaseApp/Sales/Archive/SalesHeaderArchive.Table.al b/src/Layers/CH/BaseApp/Sales/Archive/SalesHeaderArchive.Table.al index cb9ecb4a114..68cdf26c91b 100644 --- a/src/Layers/CH/BaseApp/Sales/Archive/SalesHeaderArchive.Table.al +++ b/src/Layers/CH/BaseApp/Sales/Archive/SalesHeaderArchive.Table.al @@ -1189,6 +1189,11 @@ table 5107 "Sales Header Archive" ExtendedDatatype = PhoneNo; ToolTip = 'Specifies the telephone number of the company''s shipping address.'; } + field(395; "Business Activity Code"; Code[10]) + { + Caption = 'Business Activity Code'; + TableRelation = "Business Activity".Code; + } /// /// Specifies the unique identifier for the combination of dimension values assigned to this document. /// diff --git a/src/Layers/CH/BaseApp/Sales/Document/SalesHeader.Table.al b/src/Layers/CH/BaseApp/Sales/Document/SalesHeader.Table.al index be0373b1aa2..ce811f0aab6 100644 --- a/src/Layers/CH/BaseApp/Sales/Document/SalesHeader.Table.al +++ b/src/Layers/CH/BaseApp/Sales/Document/SalesHeader.Table.al @@ -2938,6 +2938,11 @@ table 36 "Sales Header" Editable = false; FieldClass = FlowField; } + field(395; "Business Activity Code"; Code[10]) + { + Caption = 'Business Activity Code'; + TableRelation = "Business Activity".Code; + } /// /// Specifies the identifier for the combination of dimensions applied to the document. /// diff --git a/src/Layers/CZ/BaseApp/Sales/Document/SalesHeader.Table.al b/src/Layers/CZ/BaseApp/Sales/Document/SalesHeader.Table.al index 5ebd9b3bc33..67cd8b1550d 100644 --- a/src/Layers/CZ/BaseApp/Sales/Document/SalesHeader.Table.al +++ b/src/Layers/CZ/BaseApp/Sales/Document/SalesHeader.Table.al @@ -2931,6 +2931,11 @@ table 36 "Sales Header" Editable = false; FieldClass = FlowField; } + field(395; "Business Activity Code"; Code[10]) + { + Caption = 'Business Activity Code'; + TableRelation = "Business Activity".Code; + } /// /// Specifies the identifier for the combination of dimensions applied to the document. /// diff --git a/src/Layers/DACH/BaseApp/Finance/GeneralLedger/Journal/GenJournalLine.Table.al b/src/Layers/DACH/BaseApp/Finance/GeneralLedger/Journal/GenJournalLine.Table.al index 28c295c3833..a8cae1393ef 100644 --- a/src/Layers/DACH/BaseApp/Finance/GeneralLedger/Journal/GenJournalLine.Table.al +++ b/src/Layers/DACH/BaseApp/Finance/GeneralLedger/Journal/GenJournalLine.Table.al @@ -2750,6 +2750,11 @@ table 81 "Gen. Journal Line" Editable = false; FieldClass = FlowField; } + field(395; "Business Activity Code"; Code[10]) + { + Caption = 'Business Activity Code'; + TableRelation = "Business Activity".Code; + } /// /// Dimension set identifier linking to dimension value combinations for analytical reporting and cost center tracking. /// diff --git a/src/Layers/DACH/BaseApp/Finance/GeneralLedger/Setup/GeneralLedgerSetup.Table.al b/src/Layers/DACH/BaseApp/Finance/GeneralLedger/Setup/GeneralLedgerSetup.Table.al index 2822bac3547..950dfe27adb 100644 --- a/src/Layers/DACH/BaseApp/Finance/GeneralLedger/Setup/GeneralLedgerSetup.Table.al +++ b/src/Layers/DACH/BaseApp/Finance/GeneralLedger/Setup/GeneralLedgerSetup.Table.al @@ -1439,6 +1439,10 @@ table 98 "General Ledger Setup" Caption = 'Use Concurrent Posting'; ToolTip = 'Specifies whether to use concurrent posting when posting journals. Concurrent posting can reduce the time it takes to post journals by allowing multiple batches to be posted at the same time. Enabling this option requires additional configuration and setup, such as setting up a batch job to run the concurrent posting process and ensuring that your system has the necessary resources to support concurrent processing.'; } + field(395; "Use Business Activity Code"; Boolean) + { + Caption = 'Use Business Activity Code'; + } field(11003; "Currency Code For EURO"; Code[10]) { Caption = 'Currency Code For EURO'; diff --git a/src/Layers/DACH/BaseApp/Finance/VAT/Ledger/VATEntry.Table.al b/src/Layers/DACH/BaseApp/Finance/VAT/Ledger/VATEntry.Table.al index 9d9f43ede5a..9278c2ba85c 100644 --- a/src/Layers/DACH/BaseApp/Finance/VAT/Ledger/VATEntry.Table.al +++ b/src/Layers/DACH/BaseApp/Finance/VAT/Ledger/VATEntry.Table.al @@ -771,6 +771,11 @@ table 254 "VAT Entry" TableRelation = "G/L Register"; ToolTip = 'Specifies the G/L register number that groups related G/L entries from the same posting.'; } + field(395; "Business Activity Code"; Code[10]) + { + Caption = 'Business Activity Code'; + TableRelation = "Business Activity".Code; + } /// /// Percentage of VAT that is non-deductible based on business use or regulatory restrictions. /// diff --git a/src/Layers/DACH/BaseApp/Foundation/Company/CompanyInformation.Table.al b/src/Layers/DACH/BaseApp/Foundation/Company/CompanyInformation.Table.al index 3c51153c866..789f901184b 100644 --- a/src/Layers/DACH/BaseApp/Foundation/Company/CompanyInformation.Table.al +++ b/src/Layers/DACH/BaseApp/Foundation/Company/CompanyInformation.Table.al @@ -8,6 +8,7 @@ using Microsoft.Bank.Setup; using Microsoft.EServices.OnlineMap; using Microsoft.Finance.VAT.Registration; using Microsoft.Foundation.Address; +using Microsoft.Foundation.AuditCodes; using Microsoft.Foundation.Calendar; using Microsoft.Foundation.Enums; using Microsoft.Inventory.Intrastat; @@ -475,6 +476,11 @@ table 79 "Company Information" SetBrandColorValue(); end; } + field(395; "Business Activity Code"; Code[10]) + { + Caption = 'Business Activity Code'; + TableRelation = "Business Activity".Code; + } field(5700; "Responsibility Center"; Code[10]) { Caption = 'Responsibility Center'; @@ -996,4 +1002,4 @@ table 79 "Company Information" begin end; -} +} \ No newline at end of file diff --git a/src/Layers/DACH/BaseApp/Purchases/Archive/PurchaseHeaderArchive.Table.al b/src/Layers/DACH/BaseApp/Purchases/Archive/PurchaseHeaderArchive.Table.al index 021e46d0e77..cef3bc118b5 100644 --- a/src/Layers/DACH/BaseApp/Purchases/Archive/PurchaseHeaderArchive.Table.al +++ b/src/Layers/DACH/BaseApp/Purchases/Archive/PurchaseHeaderArchive.Table.al @@ -741,6 +741,11 @@ table 5109 "Purchase Header Archive" ToolTip = 'Specifies the telephone number of the company''s shipping address.'; ExtendedDatatype = PhoneNo; } + field(395; "Business Activity Code"; Code[10]) + { + Caption = 'Business Activity Code'; + TableRelation = "Business Activity".Code; + } field(480; "Dimension Set ID"; Integer) { Caption = 'Dimension Set ID'; diff --git a/src/Layers/DACH/BaseApp/Purchases/Document/PurchaseHeader.Table.al b/src/Layers/DACH/BaseApp/Purchases/Document/PurchaseHeader.Table.al index a33cec735d1..ab06cdf0311 100644 --- a/src/Layers/DACH/BaseApp/Purchases/Document/PurchaseHeader.Table.al +++ b/src/Layers/DACH/BaseApp/Purchases/Document/PurchaseHeader.Table.al @@ -2314,6 +2314,11 @@ table 38 "Purchase Header" FieldClass = FlowField; AutoFormatType = 1; } + field(395; "Business Activity Code"; Code[10]) + { + Caption = 'Business Activity Code'; + TableRelation = "Business Activity".Code; + } field(480; "Dimension Set ID"; Integer) { Caption = 'Dimension Set ID'; diff --git a/src/Layers/DACH/BaseApp/Purchases/History/PurchCrMemoHdr.Table.al b/src/Layers/DACH/BaseApp/Purchases/History/PurchCrMemoHdr.Table.al index df748b8eb4f..f5301aaae5b 100644 --- a/src/Layers/DACH/BaseApp/Purchases/History/PurchCrMemoHdr.Table.al +++ b/src/Layers/DACH/BaseApp/Purchases/History/PurchCrMemoHdr.Table.al @@ -566,6 +566,12 @@ table 124 "Purch. Cr. Memo Hdr." ToolTip = 'Specifies the telephone number of the company''s shipping address.'; ExtendedDatatype = PhoneNo; } + field(395; "Business Activity Code"; Code[10]) + { + Caption = 'Business Activity Code'; + Editable = false; + TableRelation = "Business Activity".Code; + } field(480; "Dimension Set ID"; Integer) { Caption = 'Dimension Set ID'; diff --git a/src/Layers/DACH/BaseApp/Purchases/History/PurchInvHeader.Table.al b/src/Layers/DACH/BaseApp/Purchases/History/PurchInvHeader.Table.al index fe7a15f069a..0bcfc3b2bac 100644 --- a/src/Layers/DACH/BaseApp/Purchases/History/PurchInvHeader.Table.al +++ b/src/Layers/DACH/BaseApp/Purchases/History/PurchInvHeader.Table.al @@ -615,6 +615,12 @@ table 122 "Purch. Inv. Header" ToolTip = 'Specifies the telephone number of the company''s shipping address.'; ExtendedDatatype = PhoneNo; } + field(395; "Business Activity Code"; Code[10]) + { + Caption = 'Business Activity Code'; + Editable = false; + TableRelation = "Business Activity".Code; + } field(480; "Dimension Set ID"; Integer) { Caption = 'Dimension Set ID'; diff --git a/src/Layers/ES/BaseApp/Finance/GeneralLedger/Journal/GenJournalLine.Table.al b/src/Layers/ES/BaseApp/Finance/GeneralLedger/Journal/GenJournalLine.Table.al index c69c6103347..d9de080400e 100644 --- a/src/Layers/ES/BaseApp/Finance/GeneralLedger/Journal/GenJournalLine.Table.al +++ b/src/Layers/ES/BaseApp/Finance/GeneralLedger/Journal/GenJournalLine.Table.al @@ -2771,6 +2771,11 @@ table 81 "Gen. Journal Line" Editable = false; FieldClass = FlowField; } + field(395; "Business Activity Code"; Code[10]) + { + Caption = 'Business Activity Code'; + TableRelation = "Business Activity".Code; + } /// /// Dimension set identifier linking to dimension value combinations for analytical reporting and cost center tracking. /// diff --git a/src/Layers/ES/BaseApp/Finance/GeneralLedger/Journal/PostedGenJournalLine.Table.al b/src/Layers/ES/BaseApp/Finance/GeneralLedger/Journal/PostedGenJournalLine.Table.al index f8625c87861..1d33e91e199 100644 --- a/src/Layers/ES/BaseApp/Finance/GeneralLedger/Journal/PostedGenJournalLine.Table.al +++ b/src/Layers/ES/BaseApp/Finance/GeneralLedger/Journal/PostedGenJournalLine.Table.al @@ -1222,6 +1222,11 @@ table 181 "Posted Gen. Journal Line" Caption = 'Exported to Payment File'; Editable = false; } + field(395; "Business Activity Code"; Code[10]) + { + Caption = 'Business Activity Code'; + TableRelation = "Business Activity".Code; + } /// /// Dimension set identifier linking posted entries to dimension combinations for analytical reporting and financial analysis. /// diff --git a/src/Layers/ES/BaseApp/Finance/GeneralLedger/Setup/GeneralLedgerSetup.Table.al b/src/Layers/ES/BaseApp/Finance/GeneralLedger/Setup/GeneralLedgerSetup.Table.al index 23249ba1589..40219fa09a6 100644 --- a/src/Layers/ES/BaseApp/Finance/GeneralLedger/Setup/GeneralLedgerSetup.Table.al +++ b/src/Layers/ES/BaseApp/Finance/GeneralLedger/Setup/GeneralLedgerSetup.Table.al @@ -1443,6 +1443,10 @@ table 98 "General Ledger Setup" Caption = 'Use Concurrent Posting'; ToolTip = 'Specifies whether to use concurrent posting when posting journals. Concurrent posting can reduce the time it takes to post journals by allowing multiple batches to be posted at the same time. Enabling this option requires additional configuration and setup, such as setting up a batch job to run the concurrent posting process and ensuring that your system has the necessary resources to support concurrent processing.'; } + field(395; "Use Business Activity Code"; Boolean) + { + Caption = 'Use Business Activity Code'; + } field(10701; "Payment Discount Type"; Option) { Caption = 'Payment Discount Type'; diff --git a/src/Layers/ES/BaseApp/Finance/VAT/Ledger/VATEntry.Table.al b/src/Layers/ES/BaseApp/Finance/VAT/Ledger/VATEntry.Table.al index dbda7f2bf9c..863daa56962 100644 --- a/src/Layers/ES/BaseApp/Finance/VAT/Ledger/VATEntry.Table.al +++ b/src/Layers/ES/BaseApp/Finance/VAT/Ledger/VATEntry.Table.al @@ -781,6 +781,11 @@ table 254 "VAT Entry" TableRelation = "G/L Register"; ToolTip = 'Specifies the G/L register number that groups related G/L entries from the same posting.'; } + field(395; "Business Activity Code"; Code[10]) + { + Caption = 'Business Activity Code'; + TableRelation = "Business Activity".Code; + } /// /// Percentage of VAT that is non-deductible based on business use or regulatory restrictions. /// diff --git a/src/Layers/ES/BaseApp/Foundation/Company/CompanyInformation.Table.al b/src/Layers/ES/BaseApp/Foundation/Company/CompanyInformation.Table.al index 09f202ac48a..42edab2128c 100644 --- a/src/Layers/ES/BaseApp/Foundation/Company/CompanyInformation.Table.al +++ b/src/Layers/ES/BaseApp/Foundation/Company/CompanyInformation.Table.al @@ -8,6 +8,7 @@ using Microsoft.Bank.Setup; using Microsoft.EServices.OnlineMap; using Microsoft.Finance.VAT.Registration; using Microsoft.Foundation.Address; +using Microsoft.Foundation.AuditCodes; using Microsoft.Foundation.Calendar; using Microsoft.Foundation.Enums; using Microsoft.Inventory.Item; @@ -471,6 +472,11 @@ table 79 "Company Information" SetBrandColorValue(); end; } + field(395; "Business Activity Code"; Code[10]) + { + Caption = 'Business Activity Code'; + TableRelation = "Business Activity".Code; + } field(5700; "Responsibility Center"; Code[10]) { Caption = 'Responsibility Center'; @@ -955,4 +961,4 @@ table 79 "Company Information" begin end; -} +} \ No newline at end of file diff --git a/src/Layers/ES/BaseApp/Purchases/Document/PurchaseHeader.Table.al b/src/Layers/ES/BaseApp/Purchases/Document/PurchaseHeader.Table.al index a9444e191ea..33aebb6b496 100644 --- a/src/Layers/ES/BaseApp/Purchases/Document/PurchaseHeader.Table.al +++ b/src/Layers/ES/BaseApp/Purchases/Document/PurchaseHeader.Table.al @@ -2374,6 +2374,11 @@ table 38 "Purchase Header" FieldClass = FlowField; AutoFormatType = 1; } + field(395; "Business Activity Code"; Code[10]) + { + Caption = 'Business Activity Code'; + TableRelation = "Business Activity".Code; + } field(480; "Dimension Set ID"; Integer) { Caption = 'Dimension Set ID'; diff --git a/src/Layers/ES/BaseApp/Purchases/History/PurchCrMemoHdr.Table.al b/src/Layers/ES/BaseApp/Purchases/History/PurchCrMemoHdr.Table.al index 6f31df5d776..968064a9fe2 100644 --- a/src/Layers/ES/BaseApp/Purchases/History/PurchCrMemoHdr.Table.al +++ b/src/Layers/ES/BaseApp/Purchases/History/PurchCrMemoHdr.Table.al @@ -568,6 +568,12 @@ table 124 "Purch. Cr. Memo Hdr." ToolTip = 'Specifies the telephone number of the company''s shipping address.'; ExtendedDatatype = PhoneNo; } + field(395; "Business Activity Code"; Code[10]) + { + Caption = 'Business Activity Code'; + Editable = false; + TableRelation = "Business Activity".Code; + } field(480; "Dimension Set ID"; Integer) { Caption = 'Dimension Set ID'; diff --git a/src/Layers/ES/BaseApp/Purchases/History/PurchInvHeader.Table.al b/src/Layers/ES/BaseApp/Purchases/History/PurchInvHeader.Table.al index b8f02bb40da..eae41f146e5 100644 --- a/src/Layers/ES/BaseApp/Purchases/History/PurchInvHeader.Table.al +++ b/src/Layers/ES/BaseApp/Purchases/History/PurchInvHeader.Table.al @@ -617,6 +617,12 @@ table 122 "Purch. Inv. Header" ToolTip = 'Specifies the telephone number of the company''s shipping address.'; ExtendedDatatype = PhoneNo; } + field(395; "Business Activity Code"; Code[10]) + { + Caption = 'Business Activity Code'; + Editable = false; + TableRelation = "Business Activity".Code; + } field(480; "Dimension Set ID"; Integer) { Caption = 'Dimension Set ID'; diff --git a/src/Layers/ES/BaseApp/Sales/Document/SalesHeader.Table.al b/src/Layers/ES/BaseApp/Sales/Document/SalesHeader.Table.al index 42616b52ec2..49fb1c9c89c 100644 --- a/src/Layers/ES/BaseApp/Sales/Document/SalesHeader.Table.al +++ b/src/Layers/ES/BaseApp/Sales/Document/SalesHeader.Table.al @@ -2982,6 +2982,11 @@ table 36 "Sales Header" Editable = false; FieldClass = FlowField; } + field(395; "Business Activity Code"; Code[10]) + { + Caption = 'Business Activity Code'; + TableRelation = "Business Activity".Code; + } /// /// Specifies the identifier for the combination of dimensions applied to the document. /// @@ -14200,4 +14205,4 @@ table 36 "Sales Header" local procedure OnBeforeResponsibilityCenterValidate(var SalesHeader: Record "Sales Header"; xSalesHeader: Record "Sales Header"; var IsHandled: Boolean) begin end; -} +} \ No newline at end of file diff --git a/src/Layers/ES/BaseApp/Sales/History/SalesCrMemoHeader.Table.al b/src/Layers/ES/BaseApp/Sales/History/SalesCrMemoHeader.Table.al index eab81cd250e..313548a4351 100644 --- a/src/Layers/ES/BaseApp/Sales/History/SalesCrMemoHeader.Table.al +++ b/src/Layers/ES/BaseApp/Sales/History/SalesCrMemoHeader.Table.al @@ -940,6 +940,12 @@ table 114 "Sales Cr.Memo Header" ToolTip = 'Specifies the telephone number of the company''s shipping address.'; ExtendedDatatype = PhoneNo; } + field(395; "Business Activity Code"; Code[10]) + { + Caption = 'Business Activity Code'; + Editable = false; + TableRelation = "Business Activity".Code; + } /// /// Specifies the unique identifier for the dimension set applied to this credit memo. /// @@ -1693,4 +1699,4 @@ table 114 "Sales Cr.Memo Header" local procedure OnBeforeCheckNoPrinted(var SalesCrMemoHeader: Record "Sales Cr.Memo Header"; var IsHandled: Boolean) begin end; -} +} \ No newline at end of file diff --git a/src/Layers/ES/BaseApp/Sales/History/SalesInvoiceHeader.Table.al b/src/Layers/ES/BaseApp/Sales/History/SalesInvoiceHeader.Table.al index 069faa4d8fa..cfec855fec6 100644 --- a/src/Layers/ES/BaseApp/Sales/History/SalesInvoiceHeader.Table.al +++ b/src/Layers/ES/BaseApp/Sales/History/SalesInvoiceHeader.Table.al @@ -1016,6 +1016,12 @@ table 112 "Sales Invoice Header" ToolTip = 'Specifies the telephone number of the company''s shipping address.'; ExtendedDatatype = PhoneNo; } + field(395; "Business Activity Code"; Code[10]) + { + Caption = 'Business Activity Code'; + Editable = false; + TableRelation = "Business Activity".Code; + } /// /// Specifies the unique identifier for the dimension set applied to this document. /// @@ -2113,4 +2119,4 @@ table 112 "Sales Invoice Header" local procedure OnBeforeGetWorkDescription(var SalesInvoiceHeader: Record "Sales Invoice Header") begin end; -} +} \ No newline at end of file diff --git a/src/Layers/ES/BaseApp/Service/Document/ServiceCreditMemo.Page.al b/src/Layers/ES/BaseApp/Service/Document/ServiceCreditMemo.Page.al index fe830d13da7..2290b2a6b32 100644 --- a/src/Layers/ES/BaseApp/Service/Document/ServiceCreditMemo.Page.al +++ b/src/Layers/ES/BaseApp/Service/Document/ServiceCreditMemo.Page.al @@ -168,6 +168,11 @@ page 5935 "Service Credit Memo" { ApplicationArea = Service; } + field("Business Activity Code"; Rec."Business Activity Code") + { + ApplicationArea = Service; + ToolTip = 'Specifies the code for the company''s primary activity.'; + } field("External Document No."; Rec."External Document No.") { ApplicationArea = Service; diff --git a/src/Layers/FI/BaseApp/Finance/GeneralLedger/Journal/GenJournalLine.Table.al b/src/Layers/FI/BaseApp/Finance/GeneralLedger/Journal/GenJournalLine.Table.al index 98b7467395b..892f5b4c5b8 100644 --- a/src/Layers/FI/BaseApp/Finance/GeneralLedger/Journal/GenJournalLine.Table.al +++ b/src/Layers/FI/BaseApp/Finance/GeneralLedger/Journal/GenJournalLine.Table.al @@ -2755,6 +2755,11 @@ table 81 "Gen. Journal Line" Editable = false; FieldClass = FlowField; } + field(395; "Business Activity Code"; Code[10]) + { + Caption = 'Business Activity Code'; + TableRelation = "Business Activity".Code; + } /// /// Dimension set identifier linking to dimension value combinations for analytical reporting and cost center tracking. /// diff --git a/src/Layers/FI/BaseApp/Finance/GeneralLedger/Journal/PostedGenJournalLine.Table.al b/src/Layers/FI/BaseApp/Finance/GeneralLedger/Journal/PostedGenJournalLine.Table.al index b42dcbcb5df..c0fbf61ea2f 100644 --- a/src/Layers/FI/BaseApp/Finance/GeneralLedger/Journal/PostedGenJournalLine.Table.al +++ b/src/Layers/FI/BaseApp/Finance/GeneralLedger/Journal/PostedGenJournalLine.Table.al @@ -1223,6 +1223,11 @@ table 181 "Posted Gen. Journal Line" Caption = 'Exported to Payment File'; Editable = false; } + field(395; "Business Activity Code"; Code[10]) + { + Caption = 'Business Activity Code'; + TableRelation = "Business Activity".Code; + } /// /// Dimension set identifier linking posted entries to dimension combinations for analytical reporting and financial analysis. /// diff --git a/src/Layers/FI/BaseApp/Finance/VAT/Ledger/VATEntry.Table.al b/src/Layers/FI/BaseApp/Finance/VAT/Ledger/VATEntry.Table.al index 3a598c16b50..eb627bbcd2f 100644 --- a/src/Layers/FI/BaseApp/Finance/VAT/Ledger/VATEntry.Table.al +++ b/src/Layers/FI/BaseApp/Finance/VAT/Ledger/VATEntry.Table.al @@ -771,6 +771,11 @@ table 254 "VAT Entry" TableRelation = "G/L Register"; ToolTip = 'Specifies the G/L register number that groups related G/L entries from the same posting.'; } + field(395; "Business Activity Code"; Code[10]) + { + Caption = 'Business Activity Code'; + TableRelation = "Business Activity".Code; + } /// /// Percentage of VAT that is non-deductible based on business use or regulatory restrictions. /// diff --git a/src/Layers/FI/BaseApp/Foundation/Company/CompanyInformation.Table.al b/src/Layers/FI/BaseApp/Foundation/Company/CompanyInformation.Table.al index 0dbd518ba99..364d5cd3d69 100644 --- a/src/Layers/FI/BaseApp/Foundation/Company/CompanyInformation.Table.al +++ b/src/Layers/FI/BaseApp/Foundation/Company/CompanyInformation.Table.al @@ -8,6 +8,7 @@ using Microsoft.Bank.Setup; using Microsoft.EServices.OnlineMap; using Microsoft.Finance.VAT.Registration; using Microsoft.Foundation.Address; +using Microsoft.Foundation.AuditCodes; using Microsoft.Foundation.Calendar; using Microsoft.Foundation.Enums; using Microsoft.Inventory.Item; @@ -465,6 +466,11 @@ table 79 "Company Information" SetBrandColorValue(); end; } + field(395; "Business Activity Code"; Code[10]) + { + Caption = 'Business Activity Code'; + TableRelation = "Business Activity".Code; + } field(5700; "Responsibility Center"; Code[10]) { Caption = 'Responsibility Center'; @@ -877,4 +883,4 @@ table 79 "Company Information" begin end; -} +} \ No newline at end of file diff --git a/src/Layers/FI/BaseApp/Purchases/Document/PurchaseHeader.Table.al b/src/Layers/FI/BaseApp/Purchases/Document/PurchaseHeader.Table.al index 6e460c46cef..20942c658dc 100644 --- a/src/Layers/FI/BaseApp/Purchases/Document/PurchaseHeader.Table.al +++ b/src/Layers/FI/BaseApp/Purchases/Document/PurchaseHeader.Table.al @@ -2312,6 +2312,11 @@ table 38 "Purchase Header" FieldClass = FlowField; AutoFormatType = 1; } + field(395; "Business Activity Code"; Code[10]) + { + Caption = 'Business Activity Code'; + TableRelation = "Business Activity".Code; + } field(480; "Dimension Set ID"; Integer) { Caption = 'Dimension Set ID'; diff --git a/src/Layers/FI/BaseApp/Purchases/History/PurchInvHeader.Table.al b/src/Layers/FI/BaseApp/Purchases/History/PurchInvHeader.Table.al index 9929e19645c..fa15d980535 100644 --- a/src/Layers/FI/BaseApp/Purchases/History/PurchInvHeader.Table.al +++ b/src/Layers/FI/BaseApp/Purchases/History/PurchInvHeader.Table.al @@ -615,6 +615,12 @@ table 122 "Purch. Inv. Header" ToolTip = 'Specifies the telephone number of the company''s shipping address.'; ExtendedDatatype = PhoneNo; } + field(395; "Business Activity Code"; Code[10]) + { + Caption = 'Business Activity Code'; + Editable = false; + TableRelation = "Business Activity".Code; + } field(480; "Dimension Set ID"; Integer) { Caption = 'Dimension Set ID'; diff --git a/src/Layers/FI/BaseApp/Sales/Document/SalesHeader.Table.al b/src/Layers/FI/BaseApp/Sales/Document/SalesHeader.Table.al index e9fa8536ef0..42e1393cdbe 100644 --- a/src/Layers/FI/BaseApp/Sales/Document/SalesHeader.Table.al +++ b/src/Layers/FI/BaseApp/Sales/Document/SalesHeader.Table.al @@ -2931,6 +2931,11 @@ table 36 "Sales Header" Editable = false; FieldClass = FlowField; } + field(395; "Business Activity Code"; Code[10]) + { + Caption = 'Business Activity Code'; + TableRelation = "Business Activity".Code; + } /// /// Specifies the identifier for the combination of dimensions applied to the document. /// diff --git a/src/Layers/FI/BaseApp/Sales/History/SalesInvoiceHeader.Table.al b/src/Layers/FI/BaseApp/Sales/History/SalesInvoiceHeader.Table.al index 6d4c1628124..80b20d46f75 100644 --- a/src/Layers/FI/BaseApp/Sales/History/SalesInvoiceHeader.Table.al +++ b/src/Layers/FI/BaseApp/Sales/History/SalesInvoiceHeader.Table.al @@ -1015,6 +1015,12 @@ table 112 "Sales Invoice Header" ToolTip = 'Specifies the telephone number of the company''s shipping address.'; ExtendedDatatype = PhoneNo; } + field(395; "Business Activity Code"; Code[10]) + { + Caption = 'Business Activity Code'; + Editable = false; + TableRelation = "Business Activity".Code; + } /// /// Specifies the unique identifier for the dimension set applied to this document. /// diff --git a/src/Layers/FR/BaseApp/Finance/GeneralLedger/Journal/GenJournalLine.Table.al b/src/Layers/FR/BaseApp/Finance/GeneralLedger/Journal/GenJournalLine.Table.al index 70c46823886..7925204d9ed 100644 --- a/src/Layers/FR/BaseApp/Finance/GeneralLedger/Journal/GenJournalLine.Table.al +++ b/src/Layers/FR/BaseApp/Finance/GeneralLedger/Journal/GenJournalLine.Table.al @@ -2764,6 +2764,11 @@ table 81 "Gen. Journal Line" Editable = false; FieldClass = FlowField; } + field(395; "Business Activity Code"; Code[10]) + { + Caption = 'Business Activity Code'; + TableRelation = "Business Activity".Code; + } /// /// Dimension set identifier linking to dimension value combinations for analytical reporting and cost center tracking. /// diff --git a/src/Layers/FR/BaseApp/Finance/GeneralLedger/Journal/PostedGenJournalLine.Table.al b/src/Layers/FR/BaseApp/Finance/GeneralLedger/Journal/PostedGenJournalLine.Table.al index f25613bda3a..fd7b1dd5451 100644 --- a/src/Layers/FR/BaseApp/Finance/GeneralLedger/Journal/PostedGenJournalLine.Table.al +++ b/src/Layers/FR/BaseApp/Finance/GeneralLedger/Journal/PostedGenJournalLine.Table.al @@ -1222,6 +1222,11 @@ table 181 "Posted Gen. Journal Line" Caption = 'Exported to Payment File'; Editable = false; } + field(395; "Business Activity Code"; Code[10]) + { + Caption = 'Business Activity Code'; + TableRelation = "Business Activity".Code; + } /// /// Dimension set identifier linking posted entries to dimension combinations for analytical reporting and financial analysis. /// diff --git a/src/Layers/FR/BaseApp/Finance/GeneralLedger/Setup/GeneralLedgerSetup.Table.al b/src/Layers/FR/BaseApp/Finance/GeneralLedger/Setup/GeneralLedgerSetup.Table.al index 7fb151a06d9..61041867b36 100644 --- a/src/Layers/FR/BaseApp/Finance/GeneralLedger/Setup/GeneralLedgerSetup.Table.al +++ b/src/Layers/FR/BaseApp/Finance/GeneralLedger/Setup/GeneralLedgerSetup.Table.al @@ -1457,6 +1457,10 @@ table 98 "General Ledger Setup" Caption = 'Use Concurrent Posting'; ToolTip = 'Specifies whether to use concurrent posting when posting journals. Concurrent posting can reduce the time it takes to post journals by allowing multiple batches to be posted at the same time. Enabling this option requires additional configuration and setup, such as setting up a batch job to run the concurrent posting process and ensuring that your system has the necessary resources to support concurrent processing.'; } + field(395; "Use Business Activity Code"; Boolean) + { + Caption = 'Use Business Activity Code'; + } #if not CLEANSCHEMA30 field(10800; "Posting Allowed From"; Date) { diff --git a/src/Layers/FR/BaseApp/Finance/VAT/Ledger/VATEntry.Table.al b/src/Layers/FR/BaseApp/Finance/VAT/Ledger/VATEntry.Table.al index 4def158cd07..ee33309c63a 100644 --- a/src/Layers/FR/BaseApp/Finance/VAT/Ledger/VATEntry.Table.al +++ b/src/Layers/FR/BaseApp/Finance/VAT/Ledger/VATEntry.Table.al @@ -771,6 +771,11 @@ table 254 "VAT Entry" TableRelation = "G/L Register"; ToolTip = 'Specifies the G/L register number that groups related G/L entries from the same posting.'; } + field(395; "Business Activity Code"; Code[10]) + { + Caption = 'Business Activity Code'; + TableRelation = "Business Activity".Code; + } /// /// Percentage of VAT that is non-deductible based on business use or regulatory restrictions. /// diff --git a/src/Layers/FR/BaseApp/Foundation/Company/CompanyInformation.Table.al b/src/Layers/FR/BaseApp/Foundation/Company/CompanyInformation.Table.al index 89bbdcba48d..2e8d895149c 100644 --- a/src/Layers/FR/BaseApp/Foundation/Company/CompanyInformation.Table.al +++ b/src/Layers/FR/BaseApp/Foundation/Company/CompanyInformation.Table.al @@ -9,6 +9,7 @@ using Microsoft.Bank.Setup; using Microsoft.EServices.OnlineMap; using Microsoft.Finance.VAT.Registration; using Microsoft.Foundation.Address; +using Microsoft.Foundation.AuditCodes; using Microsoft.Foundation.Calendar; using Microsoft.Foundation.Enums; using Microsoft.Inventory.Item; @@ -466,6 +467,11 @@ table 79 "Company Information" SetBrandColorValue(); end; } + field(395; "Business Activity Code"; Code[10]) + { + Caption = 'Business Activity Code'; + TableRelation = "Business Activity".Code; + } field(5700; "Responsibility Center"; Code[10]) { Caption = 'Responsibility Center'; diff --git a/src/Layers/FR/BaseApp/Sales/Document/SalesHeader.Table.al b/src/Layers/FR/BaseApp/Sales/Document/SalesHeader.Table.al index 4b820327be2..4e947a2d917 100644 --- a/src/Layers/FR/BaseApp/Sales/Document/SalesHeader.Table.al +++ b/src/Layers/FR/BaseApp/Sales/Document/SalesHeader.Table.al @@ -2931,6 +2931,11 @@ table 36 "Sales Header" Editable = false; FieldClass = FlowField; } + field(395; "Business Activity Code"; Code[10]) + { + Caption = 'Business Activity Code'; + TableRelation = "Business Activity".Code; + } /// /// Specifies the identifier for the combination of dimensions applied to the document. /// diff --git a/src/Layers/FR/BaseApp/Sales/History/SalesCrMemoHeader.Table.al b/src/Layers/FR/BaseApp/Sales/History/SalesCrMemoHeader.Table.al index 2ff5dedc846..ebf0a62816f 100644 --- a/src/Layers/FR/BaseApp/Sales/History/SalesCrMemoHeader.Table.al +++ b/src/Layers/FR/BaseApp/Sales/History/SalesCrMemoHeader.Table.al @@ -939,6 +939,12 @@ table 114 "Sales Cr.Memo Header" ToolTip = 'Specifies the telephone number of the company''s shipping address.'; ExtendedDatatype = PhoneNo; } + field(395; "Business Activity Code"; Code[10]) + { + Caption = 'Business Activity Code'; + Editable = false; + TableRelation = "Business Activity".Code; + } /// /// Specifies the unique identifier for the dimension set applied to this credit memo. /// diff --git a/src/Layers/FR/BaseApp/Sales/History/SalesInvoiceHeader.Table.al b/src/Layers/FR/BaseApp/Sales/History/SalesInvoiceHeader.Table.al index c02884a5079..ab609cb8103 100644 --- a/src/Layers/FR/BaseApp/Sales/History/SalesInvoiceHeader.Table.al +++ b/src/Layers/FR/BaseApp/Sales/History/SalesInvoiceHeader.Table.al @@ -1015,6 +1015,12 @@ table 112 "Sales Invoice Header" ToolTip = 'Specifies the telephone number of the company''s shipping address.'; ExtendedDatatype = PhoneNo; } + field(395; "Business Activity Code"; Code[10]) + { + Caption = 'Business Activity Code'; + Editable = false; + TableRelation = "Business Activity".Code; + } /// /// Specifies the unique identifier for the dimension set applied to this document. /// diff --git a/src/Layers/GB/BaseApp/Finance/GeneralLedger/Journal/GenJournalLine.Table.al b/src/Layers/GB/BaseApp/Finance/GeneralLedger/Journal/GenJournalLine.Table.al index 6ef0666858e..ea927ff5105 100644 --- a/src/Layers/GB/BaseApp/Finance/GeneralLedger/Journal/GenJournalLine.Table.al +++ b/src/Layers/GB/BaseApp/Finance/GeneralLedger/Journal/GenJournalLine.Table.al @@ -2748,6 +2748,11 @@ table 81 "Gen. Journal Line" Editable = false; FieldClass = FlowField; } + field(395; "Business Activity Code"; Code[10]) + { + Caption = 'Business Activity Code'; + TableRelation = "Business Activity".Code; + } /// /// Dimension set identifier linking to dimension value combinations for analytical reporting and cost center tracking. /// diff --git a/src/Layers/GB/BaseApp/Finance/GeneralLedger/Journal/PostedGenJournalLine.Table.al b/src/Layers/GB/BaseApp/Finance/GeneralLedger/Journal/PostedGenJournalLine.Table.al index 1271f013f0e..b9c03c75351 100644 --- a/src/Layers/GB/BaseApp/Finance/GeneralLedger/Journal/PostedGenJournalLine.Table.al +++ b/src/Layers/GB/BaseApp/Finance/GeneralLedger/Journal/PostedGenJournalLine.Table.al @@ -1222,6 +1222,11 @@ table 181 "Posted Gen. Journal Line" Caption = 'Exported to Payment File'; Editable = false; } + field(395; "Business Activity Code"; Code[10]) + { + Caption = 'Business Activity Code'; + TableRelation = "Business Activity".Code; + } /// /// Dimension set identifier linking posted entries to dimension combinations for analytical reporting and financial analysis. /// diff --git a/src/Layers/GB/BaseApp/Finance/GeneralLedger/Setup/GeneralLedgerSetup.Table.al b/src/Layers/GB/BaseApp/Finance/GeneralLedger/Setup/GeneralLedgerSetup.Table.al index 412b8a422a9..818c11a9184 100644 --- a/src/Layers/GB/BaseApp/Finance/GeneralLedger/Setup/GeneralLedgerSetup.Table.al +++ b/src/Layers/GB/BaseApp/Finance/GeneralLedger/Setup/GeneralLedgerSetup.Table.al @@ -1442,6 +1442,10 @@ table 98 "General Ledger Setup" Caption = 'Use Concurrent Posting'; ToolTip = 'Specifies whether to use concurrent posting when posting journals. Concurrent posting can reduce the time it takes to post journals by allowing multiple batches to be posted at the same time. Enabling this option requires additional configuration and setup, such as setting up a batch job to run the concurrent posting process and ensuring that your system has the necessary resources to support concurrent processing.'; } + field(395; "Use Business Activity Code"; Boolean) + { + Caption = 'Use Business Activity Code'; + } #if not CLEANSCHEMA30 field(10500; "Threshold applies"; Boolean) { diff --git a/src/Layers/GB/BaseApp/Foundation/Company/CompanyInformation.Table.al b/src/Layers/GB/BaseApp/Foundation/Company/CompanyInformation.Table.al index 29145eba25e..4ccae42b758 100644 --- a/src/Layers/GB/BaseApp/Foundation/Company/CompanyInformation.Table.al +++ b/src/Layers/GB/BaseApp/Foundation/Company/CompanyInformation.Table.al @@ -8,6 +8,7 @@ using Microsoft.Bank.Setup; using Microsoft.EServices.OnlineMap; using Microsoft.Finance.VAT.Registration; using Microsoft.Foundation.Address; +using Microsoft.Foundation.AuditCodes; using Microsoft.Foundation.Calendar; using Microsoft.Foundation.Enums; using Microsoft.Inventory.Item; @@ -480,6 +481,11 @@ table 79 "Company Information" SetBrandColorValue(); end; } + field(395; "Business Activity Code"; Code[10]) + { + Caption = 'Business Activity Code'; + TableRelation = "Business Activity".Code; + } field(5700; "Responsibility Center"; Code[10]) { Caption = 'Responsibility Center'; @@ -1023,4 +1029,4 @@ table 79 "Company Information" begin end; -} +} \ No newline at end of file diff --git a/src/Layers/GB/BaseApp/Purchases/Document/PurchaseHeader.Table.al b/src/Layers/GB/BaseApp/Purchases/Document/PurchaseHeader.Table.al index 9a291ed6063..3af904168e7 100644 --- a/src/Layers/GB/BaseApp/Purchases/Document/PurchaseHeader.Table.al +++ b/src/Layers/GB/BaseApp/Purchases/Document/PurchaseHeader.Table.al @@ -2312,6 +2312,11 @@ table 38 "Purchase Header" FieldClass = FlowField; AutoFormatType = 1; } + field(395; "Business Activity Code"; Code[10]) + { + Caption = 'Business Activity Code'; + TableRelation = "Business Activity".Code; + } field(480; "Dimension Set ID"; Integer) { Caption = 'Dimension Set ID'; diff --git a/src/Layers/GB/BaseApp/Sales/Document/SalesHeader.Table.al b/src/Layers/GB/BaseApp/Sales/Document/SalesHeader.Table.al index 5ebd9b3bc33..67cd8b1550d 100644 --- a/src/Layers/GB/BaseApp/Sales/Document/SalesHeader.Table.al +++ b/src/Layers/GB/BaseApp/Sales/Document/SalesHeader.Table.al @@ -2931,6 +2931,11 @@ table 36 "Sales Header" Editable = false; FieldClass = FlowField; } + field(395; "Business Activity Code"; Code[10]) + { + Caption = 'Business Activity Code'; + TableRelation = "Business Activity".Code; + } /// /// Specifies the identifier for the combination of dimensions applied to the document. /// diff --git a/src/Layers/IT/BaseApp/Finance/GeneralLedger/Journal/GenJournalLine.Table.al b/src/Layers/IT/BaseApp/Finance/GeneralLedger/Journal/GenJournalLine.Table.al index b5d11e82fd4..0899dc8cee8 100644 --- a/src/Layers/IT/BaseApp/Finance/GeneralLedger/Journal/GenJournalLine.Table.al +++ b/src/Layers/IT/BaseApp/Finance/GeneralLedger/Journal/GenJournalLine.Table.al @@ -1,4 +1,4 @@ -// ------------------------------------------------------------------------------------------------ +// ------------------------------------------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. // ------------------------------------------------------------------------------------------------ @@ -2802,6 +2802,11 @@ table 81 "Gen. Journal Line" Editable = false; FieldClass = FlowField; } + field(395; "Business Activity Code"; Code[10]) + { + Caption = 'Business Activity Code'; + TableRelation = "Business Activity".Code; + } /// /// Dimension set identifier linking to dimension value combinations for analytical reporting and cost center tracking. /// @@ -3990,11 +3995,16 @@ table 81 "Gen. Journal Line" { Caption = 'Closing Balance Sheet'; } +#if not CLEAN29 field(12123; "Activity Code"; Code[6]) { Caption = 'Activity Code'; TableRelation = "Activity Code".Code; + ObsoleteReason = 'Replaced by the Business Activity Code field.'; + ObsoleteState = Pending; + ObsoleteTag = '29.0'; } +#endif field(12125; "Service Tariff No."; Code[10]) { Caption = 'Service Tariff No.'; @@ -7916,7 +7926,10 @@ table 81 "Gen. Journal Line" "VAT Posting" := "VAT Posting"::"Manual VAT Entry"; "System-Created Entry" := true; Prepayment := true; +#if not CLEAN29 "Activity Code" := PurchHeader."Activity Code"; +#endif + "Business Activity Code" := PurchHeader."Business Activity Code"; "Fiscal Code" := PurchHeader."Fiscal Code"; "Individual Person" := PurchHeader."Individual Person"; Resident := PurchHeader.Resident; @@ -8040,7 +8053,10 @@ table 81 "Gen. Journal Line" "Source No." := SalesHeader."Bill-to Customer No."; "IC Partner Code" := SalesHeader."Sell-to IC Partner Code"; "Payment Method Code" := SalesHeader."Payment Method Code"; +#if not CLEAN29 "Activity Code" := SalesHeader."Activity Code"; +#endif + "Business Activity Code" := SalesHeader."Business Activity Code"; "Fiscal Code" := SalesHeader."Fiscal Code"; "Individual Person" := SalesHeader."Individual Person"; Resident := SalesHeader.Resident; @@ -8912,7 +8928,10 @@ table 81 "Gen. Journal Line" FAGenJournalLine.Validate(Amount, Amount); FAGenJournalLine.Validate("Currency Code", "Currency Code"); FAGenJournalLine.Validate("Posting Date", "Posting Date"); +#if not CLEAN29 FAGenJournalLine.Validate("Activity Code", "Activity Code"); +#endif + FAGenJournalLine.Validate("Business Activity Code", "Business Activity Code"); FAGenJournalLine.Validate("FA Posting Type", "FA Posting Type"::"Acquisition Cost"); FAGenJournalLine.Validate("External Document No.", "External Document No."); FAGenJournalLine.Insert(true); diff --git a/src/Layers/IT/BaseApp/Finance/GeneralLedger/Journal/GeneralJournal.Page.al b/src/Layers/IT/BaseApp/Finance/GeneralLedger/Journal/GeneralJournal.Page.al index 76a0c9152f0..eba7a140c67 100644 --- a/src/Layers/IT/BaseApp/Finance/GeneralLedger/Journal/GeneralJournal.Page.al +++ b/src/Layers/IT/BaseApp/Finance/GeneralLedger/Journal/GeneralJournal.Page.al @@ -1,4 +1,4 @@ -// ------------------------------------------------------------------------------------------------ +// ------------------------------------------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. // ------------------------------------------------------------------------------------------------ @@ -603,7 +603,17 @@ page 39 "General Journal" ApplicationArea = Basic, Suite; Visible = false; } +#if not CLEAN29 field("Activity Code"; Rec."Activity Code") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the code for the company''s primary activity.'; + ObsoleteReason = 'Replaced by the Business Activity Code field.'; + ObsoleteState = Pending; + ObsoleteTag = '29.0'; + } +#endif + field("Business Activity Code"; Rec."Business Activity Code") { ApplicationArea = Basic, Suite; ToolTip = 'Specifies the code for the company''s primary activity.'; diff --git a/src/Layers/IT/BaseApp/Finance/GeneralLedger/Journal/PostedGenJournalLine.Table.al b/src/Layers/IT/BaseApp/Finance/GeneralLedger/Journal/PostedGenJournalLine.Table.al index 367aa35099f..c9790e42538 100644 --- a/src/Layers/IT/BaseApp/Finance/GeneralLedger/Journal/PostedGenJournalLine.Table.al +++ b/src/Layers/IT/BaseApp/Finance/GeneralLedger/Journal/PostedGenJournalLine.Table.al @@ -45,7 +45,6 @@ using Microsoft.Purchases.Payables; using Microsoft.Purchases.Vendor; using Microsoft.Sales.Customer; using Microsoft.Sales.History; -using Microsoft.Utilities; using System.IO; using System.Threading; @@ -1226,6 +1225,11 @@ table 181 "Posted Gen. Journal Line" Caption = 'Exported to Payment File'; Editable = false; } + field(395; "Business Activity Code"; Code[10]) + { + Caption = 'Business Activity Code'; + TableRelation = "Business Activity".Code; + } /// /// Dimension set identifier linking posted entries to dimension combinations for analytical reporting and financial analysis. /// @@ -1853,11 +1857,16 @@ table 181 "Posted Gen. Journal Line" { Caption = 'Closing Balance Sheet'; } +#if not CLEAN29 field(12123; "Activity Code"; Code[6]) { Caption = 'Activity Code'; - TableRelation = "Activity Code".Code; + TableRelation = Microsoft.Utilities."Activity Code".Code; + ObsoleteReason = 'Replaced by the Business Activity Code field.'; + ObsoleteState = Pending; + ObsoleteTag = '29.0'; } +#endif field(12125; "Service Tariff No."; Code[10]) { Caption = 'Service Tariff No.'; diff --git a/src/Layers/IT/BaseApp/Finance/GeneralLedger/Journal/PurchaseJournal.Page.al b/src/Layers/IT/BaseApp/Finance/GeneralLedger/Journal/PurchaseJournal.Page.al index b6eb5d5f7e4..5b9d849b6e6 100644 --- a/src/Layers/IT/BaseApp/Finance/GeneralLedger/Journal/PurchaseJournal.Page.al +++ b/src/Layers/IT/BaseApp/Finance/GeneralLedger/Journal/PurchaseJournal.Page.al @@ -1,4 +1,4 @@ -// ------------------------------------------------------------------------------------------------ +// ------------------------------------------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. // ------------------------------------------------------------------------------------------------ @@ -521,7 +521,17 @@ page 254 "Purchase Journal" ApplicationArea = Basic, Suite; Visible = false; } +#if not CLEAN29 field("Activity Code"; Rec."Activity Code") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the code for the company''s primary activity.'; + ObsoleteReason = 'Replaced by the Business Activity Code field.'; + ObsoleteState = Pending; + ObsoleteTag = '29.0'; + } +#endif + field("Business Activity Code"; Rec."Business Activity Code") { ApplicationArea = Basic, Suite; ToolTip = 'Specifies the code for the company''s primary activity.'; diff --git a/src/Layers/IT/BaseApp/Finance/GeneralLedger/Journal/RecurringGeneralJournal.Page.al b/src/Layers/IT/BaseApp/Finance/GeneralLedger/Journal/RecurringGeneralJournal.Page.al index 0aa649ea27c..bf549150dfa 100644 --- a/src/Layers/IT/BaseApp/Finance/GeneralLedger/Journal/RecurringGeneralJournal.Page.al +++ b/src/Layers/IT/BaseApp/Finance/GeneralLedger/Journal/RecurringGeneralJournal.Page.al @@ -1,4 +1,4 @@ -// ------------------------------------------------------------------------------------------------ +// ------------------------------------------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. // ------------------------------------------------------------------------------------------------ @@ -230,7 +230,17 @@ page 283 "Recurring General Journal" ApplicationArea = Suite; Visible = false; } +#if not CLEAN29 field("Activity Code"; Rec."Activity Code") + { + ApplicationArea = Suite; + ToolTip = 'Specifies the code for the company''s primary activity.'; + ObsoleteReason = 'Replaced by the Business Activity Code field.'; + ObsoleteState = Pending; + ObsoleteTag = '29.0'; + } +#endif + field("Business Activity Code"; Rec."Business Activity Code") { ApplicationArea = Suite; ToolTip = 'Specifies the code for the company''s primary activity.'; diff --git a/src/Layers/IT/BaseApp/Finance/GeneralLedger/Journal/SalesJournal.Page.al b/src/Layers/IT/BaseApp/Finance/GeneralLedger/Journal/SalesJournal.Page.al index 6fc10681b81..f0012f053ae 100644 --- a/src/Layers/IT/BaseApp/Finance/GeneralLedger/Journal/SalesJournal.Page.al +++ b/src/Layers/IT/BaseApp/Finance/GeneralLedger/Journal/SalesJournal.Page.al @@ -1,4 +1,4 @@ -// ------------------------------------------------------------------------------------------------ +// ------------------------------------------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. // ------------------------------------------------------------------------------------------------ @@ -485,7 +485,17 @@ page 253 "Sales Journal" ApplicationArea = Basic, Suite; Visible = false; } +#if not CLEAN29 field("Activity Code"; Rec."Activity Code") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the code for the company''s primary activity.'; + ObsoleteReason = 'Replaced by the Business Activity Code field.'; + ObsoleteState = Pending; + ObsoleteTag = '29.0'; + } +#endif + field("Business Activity Code"; Rec."Business Activity Code") { ApplicationArea = Basic, Suite; ToolTip = 'Specifies the code for the company''s primary activity.'; diff --git a/src/Layers/IT/BaseApp/Finance/GeneralLedger/Posting/GenJnlPostBatch.Codeunit.al b/src/Layers/IT/BaseApp/Finance/GeneralLedger/Posting/GenJnlPostBatch.Codeunit.al index 7e2a7c52c3a..c692e97cd2c 100644 --- a/src/Layers/IT/BaseApp/Finance/GeneralLedger/Posting/GenJnlPostBatch.Codeunit.al +++ b/src/Layers/IT/BaseApp/Finance/GeneralLedger/Posting/GenJnlPostBatch.Codeunit.al @@ -1,4 +1,4 @@ -// ------------------------------------------------------------------------------------------------ +// ------------------------------------------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. // ------------------------------------------------------------------------------------------------ @@ -769,8 +769,12 @@ codeunit 13 "Gen. Jnl.-Post Batch" GenJnlLine2.CopyFromGenJnlAllocation(GenJnlAlloc); GenJnlLine2."Deductible %" := GenJnlAlloc."Deductible %"; GenJnlLine2."Operation Occurred Date" := AllocateGenJnlLine."Operation Occurred Date"; +#if not CLEAN29 if GLSetup."Use Activity Code" then GenJnlLine2."Activity Code" := AllocateGenJnlLine."Activity Code"; +#endif + if GLSetup."Use Business Activity Code" then + GenJnlLine2."Business Activity Code" := AllocateGenJnlLine."Business Activity Code"; GenJnlLine2."Allow Zero-Amount Posting" := true; UpdateDimBalBatchName(GenJnlLine2); OnPostAllocationsOnBeforePrepareGenJnlLineAddCurr(GenJnlLine2, AllocateGenJnlLine); diff --git a/src/Layers/IT/BaseApp/Finance/GeneralLedger/Setup/GeneralLedgerSetup.Page.al b/src/Layers/IT/BaseApp/Finance/GeneralLedger/Setup/GeneralLedgerSetup.Page.al index 4a894a6740a..e02ef7e1073 100644 --- a/src/Layers/IT/BaseApp/Finance/GeneralLedger/Setup/GeneralLedgerSetup.Page.al +++ b/src/Layers/IT/BaseApp/Finance/GeneralLedger/Setup/GeneralLedgerSetup.Page.al @@ -1,4 +1,4 @@ -// ------------------------------------------------------------------------------------------------ +// ------------------------------------------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. // ------------------------------------------------------------------------------------------------ @@ -168,10 +168,20 @@ page 118 "General Ledger Setup" ApplicationArea = Basic, Suite; ToolTip = 'Specifies if the VAT registration numbers for domestic customers, vendors, and contacts must be validated against the Italian regulations.'; } +#if not CLEAN29 field("Use Activity Code"; Rec."Use Activity Code") { ApplicationArea = Basic, Suite; ToolTip = 'Use activity code in purchase/sales headers'; + ObsoleteReason = 'Replaced by the Business Activity Code field.'; + ObsoleteState = Pending; + ObsoleteTag = '29.0'; + } +#endif + field("Use Business Activity Code"; Rec."Use Business Activity Code") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies whether to use business activity codes in purchase and sales headers.'; } field("Mark Cr. Memos as Corrections"; Rec."Mark Cr. Memos as Corrections") { diff --git a/src/Layers/IT/BaseApp/Finance/GeneralLedger/Setup/GeneralLedgerSetup.Table.al b/src/Layers/IT/BaseApp/Finance/GeneralLedger/Setup/GeneralLedgerSetup.Table.al index be0576de3a1..59d2b3a706c 100644 --- a/src/Layers/IT/BaseApp/Finance/GeneralLedger/Setup/GeneralLedgerSetup.Table.al +++ b/src/Layers/IT/BaseApp/Finance/GeneralLedger/Setup/GeneralLedgerSetup.Table.al @@ -1,4 +1,4 @@ -// ------------------------------------------------------------------------------------------------ +// ------------------------------------------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. // ------------------------------------------------------------------------------------------------ @@ -1267,7 +1267,7 @@ table 98 "General Ledger Setup" field(188; "Control VAT Period"; Enum "VAT Period Control") { Caption = 'Control VAT Period'; - ToolTip = 'Specifies a way of using VAT Date against VAT Return Periods. If you choose Block posting within closed and warn for released period, system will not allow postings in closed VAT Return Period, but if the period is not closed, but VAT returns are released or submitted, user will be warned what try to post an entry with VAT Date in this period. If you choose Block posting within closed period, system will still not allow postings in closed VAT Return Period, but there will be no warnings for release or submitted VAT returns. If you choose ˜Warn when posting in closed period, system will not block posting entry with VAT Date in the closed VAT return period, but it will show warning message before posting. And if you choose ˜Disabled options, system will allow you to post without any control regardless of VAT return or period status.'; + ToolTip = 'Specifies a way of using VAT Date against VAT Return Periods. If you choose Block posting within closed and warn for released period, system will not allow postings in closed VAT Return Period, but if the period is not closed, but VAT returns are released or submitted, user will be warned what try to post an entry with VAT Date in this period. If you choose Block posting within closed period, system will still not allow postings in closed VAT Return Period, but there will be no warnings for release or submitted VAT returns. If you choose Warn when posting in closed period, system will not block posting entry with VAT Date in the closed VAT return period, but it will show warning message before posting. And if you choose Disabled options, system will allow you to post without any control regardless of VAT return or period status.'; trigger OnValidate() begin @@ -1442,6 +1442,10 @@ table 98 "General Ledger Setup" Caption = 'Use Concurrent Posting'; ToolTip = 'Specifies whether to use concurrent posting when posting journals. Concurrent posting can reduce the time it takes to post journals by allowing multiple batches to be posted at the same time. Enabling this option requires additional configuration and setup, such as setting up a batch job to run the concurrent posting process and ensuring that your system has the necessary resources to support concurrent processing.'; } + field(395; "Use Business Activity Code"; Boolean) + { + Caption = 'Use Business Activity Code'; + } field(12100; "Use Document Date in Currency"; Boolean) { Caption = 'Use Document Date in Currency'; @@ -1514,10 +1518,15 @@ table 98 "General Ledger Setup" { Caption = 'Validate loc.VAT Reg. No.'; } +#if not CLEAN29 field(12131; "Use Activity Code"; Boolean) { Caption = 'Use Activity Code'; + ObsoleteReason = 'Replaced by the Use Business Activity Code field.'; + ObsoleteState = Pending; + ObsoleteTag = '29.0'; } +#endif } keys diff --git a/src/Layers/IT/BaseApp/Finance/VAT/Ledger/VATEntries.Page.al b/src/Layers/IT/BaseApp/Finance/VAT/Ledger/VATEntries.Page.al index d58d35e5973..560b80f8982 100644 --- a/src/Layers/IT/BaseApp/Finance/VAT/Ledger/VATEntries.Page.al +++ b/src/Layers/IT/BaseApp/Finance/VAT/Ledger/VATEntries.Page.al @@ -205,7 +205,17 @@ page 315 "VAT Entries" ApplicationArea = Basic, Suite; Visible = false; } +#if not CLEAN29 field("Activity Code"; Rec."Activity Code") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the code for the company''s primary activity.'; + ObsoleteReason = 'Replaced by the Business Activity Code field.'; + ObsoleteState = Pending; + ObsoleteTag = '29.0'; + } +#endif + field("Business Activity Code"; Rec."Business Activity Code") { ApplicationArea = Basic, Suite; ToolTip = 'Specifies the code for the company''s primary activity.'; diff --git a/src/Layers/IT/BaseApp/Finance/VAT/Ledger/VATEntry.Table.al b/src/Layers/IT/BaseApp/Finance/VAT/Ledger/VATEntry.Table.al index 92260408380..6b8fb379f96 100644 --- a/src/Layers/IT/BaseApp/Finance/VAT/Ledger/VATEntry.Table.al +++ b/src/Layers/IT/BaseApp/Finance/VAT/Ledger/VATEntry.Table.al @@ -781,6 +781,11 @@ table 254 "VAT Entry" TableRelation = "G/L Register"; ToolTip = 'Specifies the G/L register number that groups related G/L entries from the same posting.'; } + field(395; "Business Activity Code"; Code[10]) + { + Caption = 'Business Activity Code'; + TableRelation = "Business Activity".Code; + } /// /// Percentage of VAT that is non-deductible based on business use or regulatory restrictions. /// @@ -910,11 +915,16 @@ table 254 "VAT Entry" { Caption = 'Include in VAT Transac. Rep.'; } +#if not CLEAN29 field(12123; "Activity Code"; Code[6]) { Caption = 'Activity Code'; TableRelation = "Activity Code".Code; + ObsoleteReason = 'Replaced by the Business Activity Code field.'; + ObsoleteState = Pending; + ObsoleteTag = '29.0'; } +#endif field(12124; "Reverse Sales VAT"; Boolean) { Caption = 'Reverse Sales VAT'; @@ -1049,6 +1059,7 @@ table 254 "VAT Entry" { Clustered = true; } +#if not CLEAN29 key(Key2; Type, Closed, "VAT Bus. Posting Group", "VAT Prod. Posting Group", "Posting Date", "VAT Period", "Operation Occurred Date", "Activity Code", "Document Type", "VAT Registration No.") { SumIndexFields = Base, Amount, "Additional-Currency Base", "Additional-Currency Amount", "Remaining Unrealized Amount", "Remaining Unrealized Base", "Add.-Curr. Rem. Unreal. Amount", "Add.-Curr. Rem. Unreal. Base", "Nondeductible Amount", "Nondeductible Base", "Add. Curr. Nondeductible Amt.", "Add. Curr. Nondeductible Base"; @@ -1057,6 +1068,15 @@ table 254 "VAT Entry" { SumIndexFields = Base, Amount, "Nondeductible Base", "Nondeductible Amount", "Remaining Unrealized Base", "Remaining Unrealized Amount"; } +#endif + key(Key12189; Type, Closed, "VAT Bus. Posting Group", "VAT Prod. Posting Group", "Posting Date", "VAT Period", "Operation Occurred Date", "Business Activity Code", "Document Type", "VAT Registration No.") + { + SumIndexFields = Base, Amount, "Additional-Currency Base", "Additional-Currency Amount", "Remaining Unrealized Amount", "Remaining Unrealized Base", "Add.-Curr. Rem. Unreal. Amount", "Add.-Curr. Rem. Unreal. Base", "Nondeductible Amount", "Nondeductible Base", "Add. Curr. Nondeductible Amt.", "Add. Curr. Nondeductible Base"; + } + key(Key12190; Type, Closed, "Reverse Sales VAT", "EU Service", "Business Activity Code", "Document Type", "Bill-to/Pay-to No.", "VAT Bus. Posting Group", "VAT Prod. Posting Group", "VAT Period", "Operation Occurred Date", "Document Date", "Refers To Period") + { + SumIndexFields = Base, Amount, "Nondeductible Base", "Nondeductible Amount", "Remaining Unrealized Base", "Remaining Unrealized Amount"; + } key(Key4; Type, Closed, "VAT Bus. Posting Group", "VAT Prod. Posting Group", "Posting Date", "G/L Acc. No.", "VAT Reporting Date") { SumIndexFields = Base, Amount, "Additional-Currency Base", "Additional-Currency Amount", "Remaining Unrealized Amount", "Remaining Unrealized Base", "Add.-Curr. Rem. Unreal. Amount", "Add.-Curr. Rem. Unreal. Base"; diff --git a/src/Layers/IT/BaseApp/Finance/VAT/Reporting/VATStatement.Report.al b/src/Layers/IT/BaseApp/Finance/VAT/Reporting/VATStatement.Report.al index 117ce4a130e..9e5a9cf8112 100644 --- a/src/Layers/IT/BaseApp/Finance/VAT/Reporting/VATStatement.Report.al +++ b/src/Layers/IT/BaseApp/Finance/VAT/Reporting/VATStatement.Report.al @@ -1,4 +1,4 @@ -// ------------------------------------------------------------------------------------------------ +// ------------------------------------------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. // ------------------------------------------------------------------------------------------------ @@ -9,6 +9,7 @@ using Microsoft.Finance.GeneralLedger.Setup; using Microsoft.Finance.VAT.Calculation; using Microsoft.Finance.VAT.Ledger; using Microsoft.Foundation.Address; +using Microsoft.Foundation.AuditCodes; // using Microsoft.Foundation.Enums; using Microsoft.Utilities; #if not CLEAN27 @@ -253,13 +254,26 @@ report 12 "VAT Statement" end; } #endif - field(ActivityCode; ActivityCode) +#if not CLEAN29 + field("Activity Code"; ActivityCode) { ApplicationArea = Basic, Suite; Caption = 'Activity Code'; Importance = Additional; TableRelation = "Activity Code"; ToolTip = 'Specifies the activity code that is assigned to the VAT settlement transaction.'; + ObsoleteReason = 'Replaced by the Business Activity Code field.'; + ObsoleteState = Pending; + ObsoleteTag = '29.0'; + } +#endif + field("Business Activity Code"; ActivityCode) + { + ApplicationArea = Basic, Suite; + Caption = 'Business Activity Code'; + Importance = Additional; + TableRelation = "Business Activity"; + ToolTip = 'Specifies the business activity code that is assigned to the VAT settlement transaction.'; } field("Country/Region Filter"; CountryRegionFilter) { @@ -381,7 +395,7 @@ report 12 "VAT Statement" Selection: Enum "VAT Statement Report Selection"; TotalAmount: Decimal; UseAmtsInAddCurr: Boolean; - ActivityCode: Code[6]; + ActivityCode: Code[10]; CountryRegionFilter: Text; /// @@ -443,8 +457,12 @@ report 12 "VAT Statement" VATEntry.SetRange("Use Tax", VATStmtLine2."Use Tax"); end; VATEntry.SetRange(Type, VATStmtLine2."Gen. Posting Type"); - if GLSetup."Use Activity Code" then + if GLSetup."Use Business Activity Code" then + VATEntry.SetFilter("Business Activity Code", "VAT Statement Line".GetFilter("Business Activity Code Filter")); +#if not CLEAN29 + if GLSetup."Use Activity Code" and not GLSetup."Use Business Activity Code" then VATEntry.SetFilter("Activity Code", "VAT Statement Line".GetFilter("Activity Code Filter")); +#endif if (EndDateReq = 0D) and (StartDate = 0D) then VATEntry.SetRange("Operation Occurred Date") else @@ -569,7 +587,13 @@ report 12 "VAT Statement" PeriodVATSettlEntry.Reset(); PeriodVATSettlEntry.SetCurrentKey("VAT Period Closed"); PeriodVATSettlEntry.SetRange("VAT Period Closed", false); - PeriodVATSettlEntry.SetRange("Activity Code", ActivityCode); + if GLSetup."Use Business Activity Code" then + PeriodVATSettlEntry.SetRange("Business Activity Code", ActivityCode) +#if not CLEAN29 + else + PeriodVATSettlEntry.SetRange("Activity Code", ActivityCode) +#endif + ; end else begin PeriodicSettlVATEntry.Reset(); PeriodicSettlVATEntry.SetCurrentKey("VAT Period Closed"); @@ -589,7 +613,13 @@ report 12 "VAT Statement" if VATSettlementByActivityCodeIsEnabled then begin PeriodVATSettlEntry.Reset(); PeriodVATSettlEntry.SetRange("VAT Period", VATPeriod); - PeriodVATSettlEntry.SetRange("Activity Code", ActivityCode); + if GLSetup."Use Business Activity Code" then + PeriodVATSettlEntry.SetRange("Business Activity Code", ActivityCode) +#if not CLEAN29 + else + PeriodVATSettlEntry.SetRange("Activity Code", ActivityCode) +#endif + ; end else begin PeriodicSettlVATEntry.Reset(); PeriodicSettlVATEntry.SetRange("VAT Period", VATPeriod); diff --git a/src/Layers/IT/BaseApp/Finance/VAT/Reporting/VATStatementLine.Table.al b/src/Layers/IT/BaseApp/Finance/VAT/Reporting/VATStatementLine.Table.al index 84223b74541..df878b13531 100644 --- a/src/Layers/IT/BaseApp/Finance/VAT/Reporting/VATStatementLine.Table.al +++ b/src/Layers/IT/BaseApp/Finance/VAT/Reporting/VATStatementLine.Table.al @@ -9,6 +9,7 @@ using Microsoft.Finance.GeneralLedger.Journal; using Microsoft.Finance.SalesTax; using Microsoft.Finance.VAT.Ledger; using Microsoft.Finance.VAT.Setup; +using Microsoft.Foundation.AuditCodes; using Microsoft.Utilities; /// @@ -230,6 +231,11 @@ table 256 "VAT Statement Line" Caption = 'Box No.'; ToolTip = 'Specifies the number on the box that the VAT statement applies to.'; } + field(395; "Business Activity Code Filter"; Code[10]) + { + FieldClass = FlowFilter; + TableRelation = "Business Activity".Code; + } field(12100; "Round Factor"; Option) { Caption = 'Round Factor'; @@ -250,11 +256,16 @@ table 256 "VAT Statement Line" Print := true; end; } +#if not CLEAN29 field(12125; "Activity Code Filter"; Code[6]) { FieldClass = FlowFilter; TableRelation = "Activity Code".Code; + ObsoleteReason = 'Replaced by the Business Activity Code Filter field.'; + ObsoleteState = Pending; + ObsoleteTag = '29.0'; } +#endif field(12126; "Document Type"; Enum "Gen. Journal Document Type") { Caption = 'Document Type'; diff --git a/src/Layers/IT/BaseApp/Finance/VAT/Reporting/VATStatementName.Table.al b/src/Layers/IT/BaseApp/Finance/VAT/Reporting/VATStatementName.Table.al index ce280259697..949b45d1605 100644 --- a/src/Layers/IT/BaseApp/Finance/VAT/Reporting/VATStatementName.Table.al +++ b/src/Layers/IT/BaseApp/Finance/VAT/Reporting/VATStatementName.Table.al @@ -1,9 +1,10 @@ -// ------------------------------------------------------------------------------------------------ +// ------------------------------------------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. // ------------------------------------------------------------------------------------------------ namespace Microsoft.Finance.VAT.Reporting; +using Microsoft.Foundation.AuditCodes; using Microsoft.Utilities; /// @@ -52,11 +53,21 @@ table 257 "VAT Statement Name" Caption = 'Date Filter'; FieldClass = FlowFilter; } + field(395; "Business Activity Code Filter"; Code[10]) + { + FieldClass = FlowFilter; + TableRelation = "Business Activity".Code; + } +#if not CLEAN29 field(12125; "Activity Code Filter"; Code[6]) { FieldClass = FlowFilter; TableRelation = "Activity Code".Code; + ObsoleteReason = 'Replaced by the Business Activity Code Filter field.'; + ObsoleteState = Pending; + ObsoleteTag = '29.0'; } +#endif } keys diff --git a/src/Layers/IT/BaseApp/Finance/VAT/Reporting/VATStatementPreviewLine.Page.al b/src/Layers/IT/BaseApp/Finance/VAT/Reporting/VATStatementPreviewLine.Page.al index 0c4d4083908..1c27e386f28 100644 --- a/src/Layers/IT/BaseApp/Finance/VAT/Reporting/VATStatementPreviewLine.Page.al +++ b/src/Layers/IT/BaseApp/Finance/VAT/Reporting/VATStatementPreviewLine.Page.al @@ -1,4 +1,4 @@ -// ------------------------------------------------------------------------------------------------ +// ------------------------------------------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. // ------------------------------------------------------------------------------------------------ @@ -102,8 +102,12 @@ page 475 "VAT Statement Preview Line" VATEntry.SetRange("Use Tax", Rec."Use Tax"); VATEntry.SetRange("Operation Occurred Date"); GeneralLedgerSetup.GetRecordOnce(); - if GeneralLedgerSetup."Use Activity Code" then +#if not CLEAN29 + if GeneralLedgerSetup."Use Activity Code" and not GeneralLedgerSetup."Use Business Activity Code" then VATEntry.SetFilter("Activity Code", Rec.GetFilter("Activity Code Filter")); +#endif + if GeneralLedgerSetup."Use Business Activity Code" then + VATEntry.SetFilter("Business Activity Code", Rec.GetFilter("Business Activity Code Filter")); if Selection = Selection::Closed then if VATPeriod <> '' then VATEntry.SetRange("VAT Period", VATPeriod); @@ -207,8 +211,12 @@ page 475 "VAT Statement Preview Line" Rec.SetRange("Statement Name", VATStmtName.Name); VATStmtName.CopyFilter("Date Filter", Rec."Date Filter"); GeneralLedgerSetup.GetRecordOnce(); +#if not CLEAN29 if GeneralLedgerSetup."Use Activity Code" then VATStmtName.CopyFilter("Activity Code Filter", Rec."Activity Code Filter"); +#endif + if GeneralLedgerSetup."Use Business Activity Code" then + VATStmtName.CopyFilter("Business Activity Code Filter", Rec."Business Activity Code Filter"); Selection := NewSelection; PeriodSelection := NewPeriodSelection; UseAmtsInAddCurr := NewUseAmtsInAddCurr; diff --git a/src/Layers/IT/BaseApp/Finance/VAT/Setup/VATSetup.Page.al b/src/Layers/IT/BaseApp/Finance/VAT/Setup/VATSetup.Page.al index b4f51c16743..705c62a7fb6 100644 --- a/src/Layers/IT/BaseApp/Finance/VAT/Setup/VATSetup.Page.al +++ b/src/Layers/IT/BaseApp/Finance/VAT/Setup/VATSetup.Page.al @@ -254,7 +254,6 @@ page 187 "VAT Setup" } } - trigger OnOpenPage() var VATReportingDateMgt: Codeunit "VAT Reporting Date Mgt"; @@ -277,6 +276,5 @@ page 187 "VAT Setup" PerActivityCodeSettlEntryEnabled: Boolean; #endif IsVATDateEnabled: Boolean; - } diff --git a/src/Layers/IT/BaseApp/FixedAssets/FixedAsset/FixedAssetGLJournal.Page.al b/src/Layers/IT/BaseApp/FixedAssets/FixedAsset/FixedAssetGLJournal.Page.al index 8a53f51a1ee..11592c6e06e 100644 --- a/src/Layers/IT/BaseApp/FixedAssets/FixedAsset/FixedAssetGLJournal.Page.al +++ b/src/Layers/IT/BaseApp/FixedAssets/FixedAsset/FixedAssetGLJournal.Page.al @@ -418,7 +418,17 @@ page 5628 "Fixed Asset G/L Journal" ApplicationArea = FixedAssets; ToolTip = 'Specifies the number of a posted FA ledger entry to mark as an error entry.'; } +#if not CLEAN29 field("Activity Code"; Rec."Activity Code") + { + ApplicationArea = FixedAssets; + ToolTip = 'Specifies the code for the company''s primary activity.'; + ObsoleteReason = 'Replaced by the Business Activity Code field.'; + ObsoleteState = Pending; + ObsoleteTag = '29.0'; + } +#endif + field("Business Activity Code"; Rec."Business Activity Code") { ApplicationArea = FixedAssets; ToolTip = 'Specifies the code for the company''s primary activity.'; diff --git a/src/Layers/IT/BaseApp/Foundation/Company/CompanyInformation.Page.al b/src/Layers/IT/BaseApp/Foundation/Company/CompanyInformation.Page.al index 2cbe9b94346..75ed3d6b056 100644 --- a/src/Layers/IT/BaseApp/Foundation/Company/CompanyInformation.Page.al +++ b/src/Layers/IT/BaseApp/Foundation/Company/CompanyInformation.Page.al @@ -425,7 +425,17 @@ page 1 "Company Information" ApplicationArea = Basic, Suite; ToolTip = 'Specifies the company''s identification code assigned by the Finance and Economics Government Department.'; } +#if not CLEAN29 field("Activity Code"; Rec."Activity Code") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the code for the company''s primary activity.'; + ObsoleteReason = 'Replaced by the Business Activity Code field.'; + ObsoleteState = Pending; + ObsoleteTag = '29.0'; + } +#endif + field("Business Activity Code"; Rec."Business Activity Code") { ApplicationArea = Basic, Suite; ToolTip = 'Specifies the code for the company''s primary activity.'; diff --git a/src/Layers/IT/BaseApp/Foundation/Company/CompanyInformation.Table.al b/src/Layers/IT/BaseApp/Foundation/Company/CompanyInformation.Table.al index 8713b9c303f..894f917d782 100644 --- a/src/Layers/IT/BaseApp/Foundation/Company/CompanyInformation.Table.al +++ b/src/Layers/IT/BaseApp/Foundation/Company/CompanyInformation.Table.al @@ -10,6 +10,7 @@ using Microsoft.EServices.OnlineMap; using Microsoft.Finance.GeneralLedger.Setup; using Microsoft.Finance.VAT.Registration; using Microsoft.Foundation.Address; +using Microsoft.Foundation.AuditCodes; using Microsoft.Foundation.Calendar; using Microsoft.Foundation.Enums; using Microsoft.Inventory.Item; @@ -479,6 +480,11 @@ table 79 "Company Information" SetBrandColorValue(); end; } + field(395; "Business Activity Code"; Code[10]) + { + Caption = 'Business Activity Code'; + TableRelation = "Business Activity".Code; + } field(5700; "Responsibility Center"; Code[10]) { Caption = 'Responsibility Center'; @@ -618,11 +624,16 @@ table 79 "Company Information" Caption = 'Finance Manager No.'; TableRelation = "Company Officials"; } +#if not CLEAN29 field(12124; "Activity Code"; Code[6]) { Caption = 'Activity Code'; TableRelation = "Activity Code".Code; + ObsoleteReason = 'Replaced by the Business Activity Code field.'; + ObsoleteState = Pending; + ObsoleteTag = '29.0'; } +#endif field(12125; "Office Code"; Code[3]) { Caption = 'Office Code'; @@ -1085,4 +1096,4 @@ table 79 "Company Information" begin end; -} +} \ No newline at end of file diff --git a/src/Layers/IT/BaseApp/Local/Bank/Payment/VendorBillListPost.Codeunit.al b/src/Layers/IT/BaseApp/Local/Bank/Payment/VendorBillListPost.Codeunit.al index d25b9024c52..050abe7651d 100644 --- a/src/Layers/IT/BaseApp/Local/Bank/Payment/VendorBillListPost.Codeunit.al +++ b/src/Layers/IT/BaseApp/Local/Bank/Payment/VendorBillListPost.Codeunit.al @@ -1,4 +1,4 @@ -// ------------------------------------------------------------------------------------------------ +// ------------------------------------------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. // ------------------------------------------------------------------------------------------------ @@ -192,10 +192,10 @@ codeunit 12173 "Vendor Bill List - Post" GenJnlLine.Validate(Amount, VendorBillLine."Amount to Pay"); CurrencyCodeHandled := false; - OnPostVendorBillLineOnBeforeValidateCurrencyCode(GenJnlLine,VendorBillHeader,VendorBillLine,VendLedgEntry,Bill,AmountLCY,CurrencyCodeHandled); + OnPostVendorBillLineOnBeforeValidateCurrencyCode(GenJnlLine, VendorBillHeader, VendorBillLine, VendLedgEntry, Bill, AmountLCY, CurrencyCodeHandled); if not CurrencyCodeHandled then GenJnlLine.Validate("Currency Code", VendorBillHeader."Currency Code"); - + if not VendorBillLine."Manual Line" then begin GenJnlLine.Validate("Salespers./Purch. Code", VendLedgEntry."Purchaser Code"); ApplyInvAndUpdateLedgEntry(GenJnlLine, VendorBillLine, Tax::" "); @@ -273,8 +273,12 @@ codeunit 12173 "Vendor Bill List - Post" GenJnlLine.Validate(Amount, VendorBillHeader."Bank Expense"); if PurchInvHeader.GET(VendLedgEntry."Document No.") then begin GeneralLedgerSetup.GetRecordOnce(); +#if not CLEAN29 if GeneralLedgerSetup."Use Activity Code" then GenJnlLine.Validate("Activity Code", PurchInvHeader."Activity Code"); +#endif + if GeneralLedgerSetup."Use Business Activity Code" then + GenJnlLine.Validate("Business Activity Code", PurchInvHeader."Business Activity Code"); end; OnBeforePostExpense(GenJnlLine, VendorBillHeader, VendLedgEntry); @@ -441,7 +445,7 @@ codeunit 12173 "Vendor Bill List - Post" end; [IntegrationEvent(false, false)] - local procedure OnPostVendorBillLineOnBeforeValidateCurrencyCode(var GenJnlLine: Record "Gen. Journal Line"; VendorBillHeader: Record "Vendor Bill Header"; VendorBillLine: Record "Vendor Bill Line"; VendLedgEntry: Record "Vendor Ledger Entry"; Bill: Record Bill; var AmountLCY: Decimal;var IsHandled:Boolean) + local procedure OnPostVendorBillLineOnBeforeValidateCurrencyCode(var GenJnlLine: Record "Gen. Journal Line"; VendorBillHeader: Record "Vendor Bill Header"; VendorBillLine: Record "Vendor Bill Line"; VendLedgEntry: Record "Vendor Ledger Entry"; Bill: Record Bill; var AmountLCY: Decimal; var IsHandled: Boolean) begin end; } diff --git a/src/Layers/IT/BaseApp/Local/Finance/VAT/Reporting/AnnualVATComm2010.Report.al b/src/Layers/IT/BaseApp/Local/Finance/VAT/Reporting/AnnualVATComm2010.Report.al index 6fc22d54c33..01f69ba8cf6 100644 --- a/src/Layers/IT/BaseApp/Local/Finance/VAT/Reporting/AnnualVATComm2010.Report.al +++ b/src/Layers/IT/BaseApp/Local/Finance/VAT/Reporting/AnnualVATComm2010.Report.al @@ -1,10 +1,11 @@ -// ------------------------------------------------------------------------------------------------ +// ------------------------------------------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. // ------------------------------------------------------------------------------------------------ namespace Microsoft.Finance.VAT.Reporting; using Microsoft.Finance.GeneralLedger.Setup; +using Microsoft.Foundation.AuditCodes; using Microsoft.Foundation.Company; using Microsoft.Purchases.Vendor; using Microsoft.Utilities; @@ -381,12 +382,24 @@ report 12126 "Annual VAT Comm. - 2010" if ACTION::LookupOK = PAGE.RunModal(0, "VAT Statement Name", "VAT Statement Name".Name) then; end; } +#if not CLEAN29 field(ActivityCode; ActivityCode2.Code) { ApplicationArea = Basic, Suite; Caption = 'Activity Code'; TableRelation = "Activity Code".Code; ToolTip = 'Specifies a code that describes a primary activity for the company.'; + ObsoleteReason = 'Replaced by the Business Activity Code field.'; + ObsoleteState = Pending; + ObsoleteTag = '29.0'; + } +#endif + field(BusinessActivityCode; BusinessActivity.Code) + { + ApplicationArea = Basic, Suite; + Caption = 'Business Activity Code'; + TableRelation = "Business Activity".Code; + ToolTip = 'Specifies a code that describes a primary activity for the company.'; } field(SeparateLedger; SeparateLedger) { @@ -468,8 +481,12 @@ report 12126 "Annual VAT Comm. - 2010" Clear(AppointmentCode); "VAT Statement Name".SetRange("Statement Template Name", "VAT Statement Name"."Statement Template Name"); +#if not CLEAN29 if GeneralLedgerSetup."Use Activity Code" then "VAT Statement Line".SetFilter("Activity Code Filter", '%1', ActivityCode2.Code); +#endif + if GeneralLedgerSetup."Use Business Activity Code" then + "VAT Statement Line".SetFilter("Business Activity Code Filter", '%1', BusinessActivity.Code); "VAT Statement Line".SetRange("Date Filter", StartDate, EndDate); Selection := Selection::"Open and Closed"; @@ -483,7 +500,10 @@ report 12126 "Annual VAT Comm. - 2010" var Vendor: Record Vendor; AppointmentCode: Record "Appointment Code"; + BusinessActivity: Record "Business Activity"; +#if not CLEAN29 ActivityCode2: Record "Activity Code"; +#endif GeneralLedgerSetup: Record "General Ledger Setup"; CompanyInfo: Record "Company Information"; VATStatement: Report "VAT Statement"; @@ -509,7 +529,7 @@ report 12126 "Annual VAT Comm. - 2010" DATE2DMY_StartDate__3____1CaptionLbl: Label 'Fiscal Year'; CompanyInfo__VAT_Registration_No__CaptionLbl: Label 'VAT registration no.'; TAXPAYER__CaptionLbl: Label '- TAXPAYER -'; - ActivityCode_CodeCaptionLbl: Label 'Activity code'; + ActivityCode_CodeCaptionLbl: Label 'Business activity code'; SeparateLedgerTxtCaptionLbl: Label 'Separate accounting'; GroupSettlementTxtCaptionLbl: Label 'Communication by a company belonging to a VAT group'; ExceptionalEventTxtCaptionLbl: Label 'Special occurrences'; @@ -576,9 +596,10 @@ report 12126 "Annual VAT Comm. - 2010" [Scope('OnPrem')] procedure InitializeRequest(NewStatementTemplateName: Code[20]; NewStatementName: Code[20]; NewAppointmentCode: Code[2]; NewStartDate: Date; NewEndDate: Date) begin - InitializeRequestWithActivityCode(NewStatementTemplateName, NewStatementName, '', NewAppointmentCode, NewStartDate, NewEndDate); + InitializeRequestWithBusinessActivityCode(NewStatementTemplateName, NewStatementName, '', NewAppointmentCode, NewStartDate, NewEndDate); end; +#if not CLEAN29 [Scope('OnPrem')] procedure InitializeRequestWithActivityCode(NewStatementTemplateName: Code[20]; NewStatementName: Code[20]; NewActivityCode: Code[6]; NewAppointmentCode: Code[2]; NewStartDate: Date; NewEndDate: Date) begin @@ -589,5 +610,17 @@ report 12126 "Annual VAT Comm. - 2010" StartDate := NewStartDate; EndDate := NewEndDate; end; +#endif + + [Scope('OnPrem')] + procedure InitializeRequestWithBusinessActivityCode(NewStatementTemplateName: Code[20]; NewStatementName: Code[20]; NewBusinessActivityCode: Code[10]; NewAppointmentCode: Code[2]; NewStartDate: Date; NewEndDate: Date) + begin + "VAT Statement Name"."Statement Template Name" := NewStatementTemplateName; + "VAT Statement Name".Name := NewStatementName; + BusinessActivity.Code := NewBusinessActivityCode; + AppointmentCode.Code := NewAppointmentCode; + StartDate := NewStartDate; + EndDate := NewEndDate; + end; } diff --git a/src/Layers/IT/BaseApp/Local/Finance/VAT/Reporting/AnnualVATCommPreview.Page.al b/src/Layers/IT/BaseApp/Local/Finance/VAT/Reporting/AnnualVATCommPreview.Page.al index 4c280978f12..012d4fec2d9 100644 --- a/src/Layers/IT/BaseApp/Local/Finance/VAT/Reporting/AnnualVATCommPreview.Page.al +++ b/src/Layers/IT/BaseApp/Local/Finance/VAT/Reporting/AnnualVATCommPreview.Page.al @@ -1,9 +1,10 @@ -// ------------------------------------------------------------------------------------------------ +// ------------------------------------------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. // ------------------------------------------------------------------------------------------------ namespace Microsoft.Finance.VAT.Reporting; +using Microsoft.Foundation.AuditCodes; using Microsoft.Utilities; using System.Text; @@ -32,12 +33,16 @@ page 12127 "Annual VAT Comm. Preview" ApplicationArea = Basic, Suite; ToolTip = 'Specifies the name.'; } +#if not CLEAN29 field("Activity Code"; ActivityCode) { ApplicationArea = Basic, Suite; Caption = 'Activity Code'; TableRelation = "Activity Code".Code; ToolTip = 'Specifies a code that describes a primary activity for the company.'; + ObsoleteReason = 'Replaced by the Business Activity Code field.'; + ObsoleteState = Pending; + ObsoleteTag = '29.0'; trigger OnValidate() begin @@ -45,6 +50,20 @@ page 12127 "Annual VAT Comm. Preview" CurrPage.Update(); end; } +#endif + field("Business Activity Code"; ActivityCode) + { + ApplicationArea = Basic, Suite; + Caption = 'Business Activity Code'; + TableRelation = "Business Activity".Code; + ToolTip = 'Specifies a code that describes a primary activity for the company.'; + + trigger OnValidate() + begin + Rec.SetFilter("Business Activity Code Filter", ActivityCode); + CurrPage.Update(); + end; + } field("Date Filter"; DateFilter) { ApplicationArea = Basic, Suite; @@ -126,7 +145,7 @@ page 12127 "Annual VAT Comm. Preview" var Selection: Enum "VAT Statement Report Selection"; PeriodSelection: Enum "VAT Statement Report Period Selection"; - ActivityCode: Code[6]; + ActivityCode: Code[10]; DateFilter: Text; [Scope('OnPrem')] diff --git a/src/Layers/IT/BaseApp/Local/Finance/VAT/Reporting/ExpAnnualVATComm2010.Report.al b/src/Layers/IT/BaseApp/Local/Finance/VAT/Reporting/ExpAnnualVATComm2010.Report.al index b5df1f2d869..569a4bf21a3 100644 --- a/src/Layers/IT/BaseApp/Local/Finance/VAT/Reporting/ExpAnnualVATComm2010.Report.al +++ b/src/Layers/IT/BaseApp/Local/Finance/VAT/Reporting/ExpAnnualVATComm2010.Report.al @@ -1,10 +1,11 @@ -// ------------------------------------------------------------------------------------------------ +// ------------------------------------------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. // ------------------------------------------------------------------------------------------------ namespace Microsoft.Finance.VAT.Reporting; using Microsoft.Finance.GeneralLedger.Setup; +using Microsoft.Foundation.AuditCodes; using Microsoft.Foundation.Company; using Microsoft.Purchases.Vendor; using Microsoft.Utilities; @@ -337,6 +338,7 @@ report 12127 "Exp.Annual VAT Comm. - 2010" if (CompanyInfo."Tax Representative No." <> '') and (AppointmentCode = '') then Error(Text008, CompanyInfo.FieldCaption("Tax Representative No."), CompanyInfo.TableCaption()); +#if not CLEAN29 if GeneralLedgerSetup."Use Activity Code" then begin if VATStatementFilters.GetFilter("Activity Code Filter") = '' then Error(EmptyActivityCodeFilterErr, VATStatementFilters.FieldCaption("Activity Code Filter")); @@ -347,7 +349,20 @@ report 12127 "Exp.Annual VAT Comm. - 2010" VATStatementFilters.GetFilter("Activity Code Filter")); ActivityCode.FindFirst(); - VATStatementLine.SetFilter("Activity Code Filter", VATStatementFilters.GetFilter("Activity Code Filter")); + VATStatementFilters.CopyFilter("Activity Code Filter", VATStatementLine."Activity Code Filter"); + end; +#endif + if GeneralLedgerSetup."Use Business Activity Code" then begin + if VATStatementFilters.GetFilter("Business Activity Code Filter") = '' then + Error(EmptyActivityCodeFilterErr, VATStatementFilters.FieldCaption("Business Activity Code Filter")); + + BusinessActivity.SetFilter(Code, VATStatementFilters.GetFilter("Business Activity Code Filter")); + if BusinessActivity.Count() <> 1 then + Error(TooManyActivityCodesErr, VATStatementFilters.FieldCaption("Business Activity Code Filter"), BusinessActivity.TableCaption(), + VATStatementFilters.GetFilter("Business Activity Code Filter")); + BusinessActivity.FindFirst(); + + VATStatementFilters.CopyFilter("Business Activity Code Filter", VATStatementLine."Business Activity Code Filter"); end; @@ -366,7 +381,10 @@ report 12127 "Exp.Annual VAT Comm. - 2010" var Vendor: Record Vendor; CompanyInfo: Record "Company Information"; + BusinessActivity: Record "Business Activity"; +#if not CLEAN29 ActivityCode: Record "Activity Code"; +#endif VATStatementLine: Record "VAT Statement Line"; GeneralLedgerSetup: Record "General Ledger Setup"; FileManagement: Codeunit "File Management"; diff --git a/src/Layers/IT/BaseApp/Local/Finance/VAT/Reporting/ExpAnnualVATCommunication.Report.al b/src/Layers/IT/BaseApp/Local/Finance/VAT/Reporting/ExpAnnualVATCommunication.Report.al index 1d9fa8b9b1c..65cf526c797 100644 --- a/src/Layers/IT/BaseApp/Local/Finance/VAT/Reporting/ExpAnnualVATCommunication.Report.al +++ b/src/Layers/IT/BaseApp/Local/Finance/VAT/Reporting/ExpAnnualVATCommunication.Report.al @@ -1,10 +1,11 @@ -// ------------------------------------------------------------------------------------------------ +// ------------------------------------------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. // ------------------------------------------------------------------------------------------------ namespace Microsoft.Finance.VAT.Reporting; using Microsoft.Finance.GeneralLedger.Setup; +using Microsoft.Foundation.AuditCodes; using Microsoft.Foundation.Company; using Microsoft.Purchases.Vendor; using Microsoft.Utilities; @@ -266,12 +267,24 @@ report 12125 "Exp. Annual VAT Communication" if ACTION::LookupOK = PAGE.RunModal(0, VATStatementName, VATStatementName.Name) then; end; } +#if not CLEAN29 field("ActivityCode.Code"; ActivityCode.Code) { ApplicationArea = Basic, Suite; Caption = 'Activity Code'; TableRelation = "Activity Code".Code; ToolTip = 'Specifies a code that describes a primary activity for the company.'; + ObsoleteReason = 'Replaced by the Business Activity Code field.'; + ObsoleteState = Pending; + ObsoleteTag = '29.0'; + } +#endif + field("BusinessActivityCode.Code"; BusinessActivity.Code) + { + ApplicationArea = Basic, Suite; + Caption = 'Business Activity Code'; + TableRelation = "Business Activity".Code; + ToolTip = 'Specifies a code that describes a primary activity for the company.'; } field(SeparateLedger; SeparateLedger) { @@ -381,8 +394,12 @@ report 12125 "Exp. Annual VAT Communication" VATStatementLine.SetRange("Statement Name", VATStatementName.Name); VATStatementLine.SetFilter("Annual VAT Comm. Field", '<>%1', VATStatementLine."Annual VAT Comm. Field"::" "); VATStatementLine.FilterGroup := 0; +#if not CLEAN29 if GeneralLedgerSetup."Use Activity Code" then VATStatementLine.SetRange("Activity Code Filter", ActivityCode.Code); +#endif + if GeneralLedgerSetup."Use Business Activity Code" then + VATStatementLine.SetRange("Business Activity Code Filter", BusinessActivity.Code); VATStatementLine.SetRange("Date Filter", StartDate, EndDate); ExportFileName := RBMgt.ServerTempFileName(''); @@ -395,7 +412,10 @@ report 12125 "Exp. Annual VAT Communication" var Vendor: Record Vendor; CompanyInfo: Record "Company Information"; + BusinessActivity: Record "Business Activity"; +#if not CLEAN29 ActivityCode: Record "Activity Code"; +#endif AppointmentCode: Record "Appointment Code"; VATStatementLine: Record "VAT Statement Line"; VATStatementName: Record "VAT Statement Name"; @@ -410,7 +430,7 @@ report 12125 "Exp. Annual VAT Communication" SeparateLedger: Boolean; GroupSettlement: Boolean; ExceptionalEvent: Boolean; - InvalidActivityCodeFilterErr: Label 'The Activity Code Filter should contain exactly one Activity Code.'; + InvalidActivityCodeFilterErr: Label 'The Business Activity Code Filter should contain exactly one Business Activity Code.'; Text003: Label 'IVC Files (*.ivc)|*.ivc|Text Files (*.txt)|*.txt|All Files (*.*)|*.*'; Text004: Label 'default.ivc'; Text005: Label 'Export'; @@ -458,6 +478,7 @@ report 12125 "Exp. Annual VAT Communication" EndDate := VATStatementName.GetRangeMax("Date Filter"); end; +#if not CLEAN29 if GeneralLedgerSetup."Use Activity Code" then begin if VATStatementName.GetFilter("Activity Code Filter") <> '' then begin ActivityCode.SetFilter(Code, VATStatementName.GetFilter("Activity Code Filter")); @@ -468,7 +489,20 @@ report 12125 "Exp. Annual VAT Communication" end else Error(InvalidActivityCodeFilterErr); - VATStatementLine.SetFilter("Activity Code Filter", VATStatementName.GetFilter("Activity Code Filter")); + VATStatementName.CopyFilter("Activity Code Filter", VATStatementLine."Activity Code Filter"); + end; +#endif + if GeneralLedgerSetup."Use Business Activity Code" then begin + if VATStatementName.GetFilter("Business Activity Code Filter") <> '' then begin + BusinessActivity.SetFilter(Code, VATStatementName.GetFilter("Business Activity Code Filter")); + if BusinessActivity.Count() <> 1 then + Error(InvalidActivityCodeFilterErr); + + BusinessActivity.FindFirst(); + end else + Error(InvalidActivityCodeFilterErr); + + VATStatementName.CopyFilter("Business Activity Code Filter", VATStatementLine."Business Activity Code Filter"); end; VATStatementLine.SetFilter("Date Filter", VATStatementName.GetFilter("Date Filter")); diff --git a/src/Layers/IT/BaseApp/Local/Finance/VAT/Reporting/PeriodicVATSettlCard.Page.al b/src/Layers/IT/BaseApp/Local/Finance/VAT/Reporting/PeriodicVATSettlCard.Page.al index 42bfc897df7..4c7deaf861d 100644 --- a/src/Layers/IT/BaseApp/Local/Finance/VAT/Reporting/PeriodicVATSettlCard.Page.al +++ b/src/Layers/IT/BaseApp/Local/Finance/VAT/Reporting/PeriodicVATSettlCard.Page.al @@ -1,4 +1,4 @@ -// ------------------------------------------------------------------------------------------------ +// ------------------------------------------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. // ------------------------------------------------------------------------------------------------ @@ -46,10 +46,20 @@ page 12215 "Periodic VAT Settl. Card" Importance = Promoted; ToolTip = 'Specifies if the VAT period has been closed.'; } +#if not CLEAN29 field("Activity Code"; Rec."Activity Code") { ApplicationArea = Basic, Suite; ToolTip = 'Specifies the activity code that is assigned to the VAT settlement transaction.'; + ObsoleteReason = 'Replaced by the Business Activity Code field.'; + ObsoleteState = Pending; + ObsoleteTag = '29.0'; + } +#endif + field("Business Activity Code"; Rec."Business Activity Code") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the business activity code that is assigned to the VAT settlement transaction.'; } } group(Settlement) diff --git a/src/Layers/IT/BaseApp/Local/Finance/VAT/Reporting/PeriodicVATSettlList.Page.al b/src/Layers/IT/BaseApp/Local/Finance/VAT/Reporting/PeriodicVATSettlList.Page.al index 15a06b87167..8849e84bfd8 100644 --- a/src/Layers/IT/BaseApp/Local/Finance/VAT/Reporting/PeriodicVATSettlList.Page.al +++ b/src/Layers/IT/BaseApp/Local/Finance/VAT/Reporting/PeriodicVATSettlList.Page.al @@ -1,4 +1,4 @@ -// ------------------------------------------------------------------------------------------------ +// ------------------------------------------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. // ------------------------------------------------------------------------------------------------ @@ -32,10 +32,20 @@ page 12216 "Periodic VAT Settl. List" ApplicationArea = Basic, Suite; ToolTip = 'Specifies the period of time that defines the VAT period.'; } +#if not CLEAN29 field("Activity Code"; Rec."Activity Code") { ApplicationArea = Basic, Suite; ToolTip = 'Specifies the activity code that is assigned to the VAT settlement transaction.'; + ObsoleteReason = 'Replaced by the Business Activity Code field.'; + ObsoleteState = Pending; + ObsoleteTag = '29.0'; + } +#endif + field("Business Activity Code"; Rec."Business Activity Code") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the business activity code that is assigned to the VAT settlement transaction.'; } field("VAT Settlement"; Rec."VAT Settlement") { diff --git a/src/Layers/IT/BaseApp/Local/Finance/VAT/Reporting/PeriodicVATSettlement.Codeunit.al b/src/Layers/IT/BaseApp/Local/Finance/VAT/Reporting/PeriodicVATSettlement.Codeunit.al index e00ba9ee27a..480a7274461 100644 --- a/src/Layers/IT/BaseApp/Local/Finance/VAT/Reporting/PeriodicVATSettlement.Codeunit.al +++ b/src/Layers/IT/BaseApp/Local/Finance/VAT/Reporting/PeriodicVATSettlement.Codeunit.al @@ -4,6 +4,8 @@ // ------------------------------------------------------------------------------------------------ namespace Microsoft.Finance.VAT.Reporting; +using Microsoft.Finance.VAT.Setup; +using Microsoft.Foundation.AuditCodes; using Microsoft.Utilities; codeunit 12195 "Periodic VAT Settlement" @@ -13,25 +15,40 @@ codeunit 12195 "Periodic VAT Settlement" internal procedure CheckIfSplitIsNeeded(Period: Code[10]): Boolean var PeriodicVATSettlementEntry: Record "Periodic VAT Settlement Entry"; + VATSetup: Record "VAT Setup"; begin PeriodicVATSettlementEntry.SetRange("VAT Period", Period); - PeriodicVATSettlementEntry.SetRange("Activity Code", ''); + VATSetup.Get(); + if VATSetup."Per Activity Code Settl. Entry" then + PeriodicVATSettlementEntry.SetRange("Activity Code", ''); exit(not PeriodicVATSettlementEntry.IsEmpty()); end; internal procedure CreateSeparateEntries(Period: Code[10]) var + BusinessActivity: Record "Business Activity"; +#if not CLEAN29 ActivityCode: Record "Activity Code"; +#endif PeriodicVATSettlementEntry: Record "Periodic VAT Settlement Entry"; + VATSetup: Record "VAT Setup"; begin - if ActivityCode.Findset() then + VATSetup.Get(); + if VATSetup."Per Activity Code Settl. Entry" then begin + if BusinessActivity.FindSet() then + repeat + InsertPeriodicVATSettlementEntry(PeriodicVATSettlementEntry, Period, BusinessActivity.Code); + until BusinessActivity.Next() = 0; + exit; + end; + +#if not CLEAN29 + if ActivityCode.FindSet() then repeat - PeriodicVATSettlementEntry.Init(); - PeriodicVATSettlementEntry."VAT Period" := Period; - PeriodicVATSettlementEntry."Activity Code" := ActivityCode.Code; - if PeriodicVATSettlementEntry.Insert() then; + InsertPeriodicVATSettlementEntry(PeriodicVATSettlementEntry, Period, ActivityCode.Code); until ActivityCode.Next() = 0; +#endif end; @@ -39,13 +56,17 @@ codeunit 12195 "Periodic VAT Settlement" var PeriodicVATSettlementEntry: Record "Periodic VAT Settlement Entry"; PeriodicVATSettlementEntry2: Record "Periodic VAT Settlement Entry"; + VATSetup: Record "VAT Setup"; PriorPeriodOutputVAT, PriorPeriodInputVAT, AddCurrPriorPerInpVAT, AddCurrPriorPerOutVAT, PriorYearInputVAT, PriorYearOutputVAT : Decimal; begin + VATSetup.Get(); PeriodicVATSettlementEntry.SetRange("VAT Period", VATPeriod); - PeriodicVATSettlementEntry.SetRange("Activity Code", ''); + if VATSetup."Per Activity Code Settl. Entry" then + PeriodicVATSettlementEntry.SetRange("Activity Code", ''); PeriodicVATSettlementEntry.FindFirst(); PeriodicVATSettlementEntry2.SetRange("VAT Period", VATPeriod); - PeriodicVATSettlementEntry2.SetFilter("Activity Code", '<>%1', ''); + if VATSetup."Per Activity Code Settl. Entry" then + PeriodicVATSettlementEntry2.SetFilter("Activity Code", '<>%1', ''); if PeriodicVATSettlementEntry2.FindSet() then repeat PriorPeriodOutputVAT += PeriodicVATSettlementEntry2."Prior Period Output VAT"; @@ -63,6 +84,17 @@ codeunit 12195 "Periodic VAT Settlement" (PeriodicVATSettlementEntry."Prior Year Output VAT" = PriorYearOutputVAT); end; + local procedure InsertPeriodicVATSettlementEntry(var PeriodicVATSettlementEntry: Record "Periodic VAT Settlement Entry"; Period: Code[10]; BusinessActivityCode: Code[10]) + begin + PeriodicVATSettlementEntry.Init(); + PeriodicVATSettlementEntry."VAT Period" := Period; +#if not CLEAN29 + PeriodicVATSettlementEntry."Activity Code" := CopyStr(BusinessActivityCode, 1, MaxStrLen(PeriodicVATSettlementEntry."Activity Code")); +#endif + PeriodicVATSettlementEntry."Business Activity Code" := BusinessActivityCode; + if PeriodicVATSettlementEntry.Insert() then; + end; + #if not CLEAN28 [IntegrationEvent(false, false)] [Obsolete('This event is used only during data upgrade of the VAT Settlement Account Code feature, which will become mandatory one major version earlier.', '28.0')] diff --git a/src/Layers/IT/BaseApp/Local/Finance/VAT/Reporting/PeriodicVATSettlementEntry.Table.al b/src/Layers/IT/BaseApp/Local/Finance/VAT/Reporting/PeriodicVATSettlementEntry.Table.al index fec22427231..2ab3796c326 100644 --- a/src/Layers/IT/BaseApp/Local/Finance/VAT/Reporting/PeriodicVATSettlementEntry.Table.al +++ b/src/Layers/IT/BaseApp/Local/Finance/VAT/Reporting/PeriodicVATSettlementEntry.Table.al @@ -1,4 +1,4 @@ -// ------------------------------------------------------------------------------------------------ +// ------------------------------------------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. // ------------------------------------------------------------------------------------------------ @@ -17,6 +17,10 @@ table 12136 "Periodic VAT Settlement Entry" { Caption = 'Activity Code'; } + field(12189; "Business Activity Code"; Code[10]) + { + Caption = 'Business Activity Code'; + } field(2; "VAT Period"; Code[10]) { Caption = 'VAT Period'; @@ -190,11 +194,23 @@ table 12136 "Periodic VAT Settlement Entry" keys { +#if not CLEAN29 key(Key1; "VAT Period", "Activity Code") { Clustered = true; SumIndexFields = "VAT Settlement", "Add-Curr. VAT Settlement", "Prior Period Input VAT", "Prior Period Output VAT", "Add Curr. Prior Per. Inp. VAT", "Add Curr. Prior Per. Out VAT", "Advanced Amount", "Add-Curr. Paid. Amount", "Paid Amount", "Add-Curr. Advanced Amount", "Payable VAT Variation", "Deductible VAT Variation", "Tax Debit Variation", "Tax Credit Variation", "Unpaid VAT Previous Periods", "Tax Debit Variation Interest", "Omit VAT Payable Interest", "Credit VAT Compensation", "Special Credit"; } + key(Key12189; "VAT Period", "Business Activity Code") + { + SumIndexFields = "VAT Settlement", "Add-Curr. VAT Settlement", "Prior Period Input VAT", "Prior Period Output VAT", "Add Curr. Prior Per. Inp. VAT", "Add Curr. Prior Per. Out VAT", "Advanced Amount", "Add-Curr. Paid. Amount", "Paid Amount", "Add-Curr. Advanced Amount", "Payable VAT Variation", "Deductible VAT Variation", "Tax Debit Variation", "Tax Credit Variation", "Unpaid VAT Previous Periods", "Tax Debit Variation Interest", "Omit VAT Payable Interest", "Credit VAT Compensation", "Special Credit"; + } +#else + key(Key1; "VAT Period", "Business Activity Code") + { + Clustered = true; + SumIndexFields = "VAT Settlement", "Add-Curr. VAT Settlement", "Prior Period Input VAT", "Prior Period Output VAT", "Add Curr. Prior Per. Inp. VAT", "Add Curr. Prior Per. Out VAT", "Advanced Amount", "Add-Curr. Paid. Amount", "Paid Amount", "Add-Curr. Advanced Amount", "Payable VAT Variation", "Deductible VAT Variation", "Tax Debit Variation", "Tax Credit Variation", "Unpaid VAT Previous Periods", "Tax Debit Variation Interest", "Omit VAT Payable Interest", "Credit VAT Compensation", "Special Credit"; + } +#endif key(Key2; "VAT Period Closed") { SumIndexFields = "VAT Settlement", "Add-Curr. VAT Settlement", "Prior Period Input VAT", "Prior Period Output VAT", "Add Curr. Prior Per. Inp. VAT", "Add Curr. Prior Per. Out VAT", "Advanced Amount", "Add-Curr. Paid. Amount", "Paid Amount", "Add-Curr. Advanced Amount", "Payable VAT Variation", "Deductible VAT Variation", "Tax Debit Variation", "Tax Credit Variation", "Unpaid VAT Previous Periods", "Tax Debit Variation Interest", "Omit VAT Payable Interest", "Credit VAT Compensation", "Special Credit"; @@ -210,7 +226,10 @@ table 12136 "Periodic VAT Settlement Entry" PeriodicSettlementVATEntry: Record "Periodic VAT Settlement Entry"; begin PeriodicSettlementVATEntry.SetFilter("VAT Period", '<%1', Rec."VAT Period"); +#if not CLEAN29 PeriodicSettlementVATEntry.SetRange("Activity Code", Rec."Activity Code"); +#endif + PeriodicSettlementVATEntry.SetRange("Business Activity Code", Rec."Business Activity Code"); if PeriodicSettlementVATEntry.FindLast() then begin "Prior Period Input VAT" := PeriodicSettlementVATEntry."Prior Period Input VAT"; "Prior Period Output VAT" := PeriodicSettlementVATEntry."Prior Period Output VAT"; diff --git a/src/Layers/IT/BaseApp/Local/Finance/VAT/Reporting/PeriodicVATSplit.Page.al b/src/Layers/IT/BaseApp/Local/Finance/VAT/Reporting/PeriodicVATSplit.Page.al index 0a5e207407f..084c7cf2c4e 100644 --- a/src/Layers/IT/BaseApp/Local/Finance/VAT/Reporting/PeriodicVATSplit.Page.al +++ b/src/Layers/IT/BaseApp/Local/Finance/VAT/Reporting/PeriodicVATSplit.Page.al @@ -30,10 +30,20 @@ page 12217 "Periodic VAT Split" ApplicationArea = Basic, Suite; ToolTip = 'Specifies the period of time that defines the VAT period.'; } +#if not CLEAN29 field("Activity Code"; Rec."Activity Code") { ApplicationArea = Basic, Suite; ToolTip = 'Specifies the activity code that is assigned to the VAT settlement transaction.'; + ObsoleteReason = 'Replaced by the Business Activity Code field.'; + ObsoleteState = Pending; + ObsoleteTag = '29.0'; + } +#endif + field("Business Activity Code"; Rec."Business Activity Code") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the business activity code that is assigned to the VAT settlement transaction.'; } field("Prior Period Input VAT"; Rec."Prior Period Input VAT") { @@ -122,10 +132,16 @@ page 12217 "Periodic VAT Split" PriorPeriodOutputVAT, PriorPeriodInputVAT, AddCurrPriorPerInpVAT, AddCurrPriorPerOutVAT, PriorYearInputVAT, PriorYearOutputVAT : Decimal; begin PeriodicVATSettlementEntry.SetRange("VAT Period", VATPeriod); +#if not CLEAN29 PeriodicVATSettlementEntry.SetRange("Activity Code", ''); +#endif + PeriodicVATSettlementEntry.SetRange("Business Activity Code", ''); PeriodicVATSettlementEntry.FindFirst(); PeriodicVATSettlementEntry2.SetRange("VAT Period", VATPeriod); +#if not CLEAN29 PeriodicVATSettlementEntry2.SetFilter("Activity Code", '<>%1', ''); +#endif + PeriodicVATSettlementEntry2.SetFilter("Business Activity Code", '<>%1', ''); if PeriodicVATSettlementEntry2.FindSet() then repeat PriorPeriodOutputVAT += PeriodicVATSettlementEntry2."Prior Period Output VAT"; diff --git a/src/Layers/IT/BaseApp/Local/Finance/WithholdingTax/WithholdingTaxExport.Codeunit.al b/src/Layers/IT/BaseApp/Local/Finance/WithholdingTax/WithholdingTaxExport.Codeunit.al index 1ddd9a7b3b0..bb3897687fe 100644 --- a/src/Layers/IT/BaseApp/Local/Finance/WithholdingTax/WithholdingTaxExport.Codeunit.al +++ b/src/Layers/IT/BaseApp/Local/Finance/WithholdingTax/WithholdingTaxExport.Codeunit.al @@ -1,4 +1,4 @@ -// ------------------------------------------------------------------------------------------------ +// ------------------------------------------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. // ------------------------------------------------------------------------------------------------ @@ -442,11 +442,18 @@ codeunit 12132 "Withholding Tax Export" 'DA001008', ConstFormat::AN, FlatFileManagement.CleanPhoneNumber(CompanyInformation."Phone No.")); FlatFileManagement.WriteBlockValue('DA001009', ConstFormat::AN, CompanyInformation."E-Mail"); GeneralLedgerSetup.GetRecordOnce(); +#if not CLEAN29 if GeneralLedgerSetup."Use Activity Code" then begin TempErrorMessage.LogIfEmpty( CompanyInformation, CompanyInformation.FieldNo("Activity Code"), TempErrorMessage."Message Type"::Error); FlatFileManagement.WriteBlockValue('DA001010', ConstFormat::AN, CompanyInformation."Activity Code"); end; +#endif + if GeneralLedgerSetup."Use Business Activity Code" then begin + TempErrorMessage.LogIfEmpty( + CompanyInformation, CompanyInformation.FieldNo("Business Activity Code"), TempErrorMessage."Message Type"::Error); + FlatFileManagement.WriteBlockValue('DA001010', ConstFormat::AN, CompanyInformation."Business Activity Code"); + end; TempErrorMessage.LogIfEmpty(CompanyInformation, CompanyInformation.FieldNo("Office Code"), TempErrorMessage."Message Type"::Warning); FlatFileManagement.WriteBlockValue('DA001011', ConstFormat::AN, CompanyInformation."Office Code"); diff --git a/src/Layers/IT/BaseApp/Local/Manufacturing/Document/SubcontractingOrder.Page.al b/src/Layers/IT/BaseApp/Local/Manufacturing/Document/SubcontractingOrder.Page.al index b6b83535cc0..b0e351529bc 100644 --- a/src/Layers/IT/BaseApp/Local/Manufacturing/Document/SubcontractingOrder.Page.al +++ b/src/Layers/IT/BaseApp/Local/Manufacturing/Document/SubcontractingOrder.Page.al @@ -136,7 +136,16 @@ page 12152 "Subcontracting Order" { ToolTip = 'Specifies the operation type that is assigned to the purchase invoice.'; } +#if not CLEAN29 field("Activity Code"; Rec."Activity Code") + { + ToolTip = 'Specifies the code for the company''s primary activity.'; + ObsoleteReason = 'Replaced by the Business Activity Code field.'; + ObsoleteState = Pending; + ObsoleteTag = '29.0'; + } +#endif + field("Business Activity Code"; Rec."Business Activity Code") { ToolTip = 'Specifies the code for the company''s primary activity.'; } diff --git a/src/Layers/IT/BaseApp/Local/Utilities/ActivityCode.Table.al b/src/Layers/IT/BaseApp/Local/Utilities/ActivityCode.Table.al index bfbf4001fb6..456c5e86e77 100644 --- a/src/Layers/IT/BaseApp/Local/Utilities/ActivityCode.Table.al +++ b/src/Layers/IT/BaseApp/Local/Utilities/ActivityCode.Table.al @@ -1,7 +1,8 @@ -// ------------------------------------------------------------------------------------------------ +// ------------------------------------------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. // ------------------------------------------------------------------------------------------------ +#if not CLEAN29 namespace Microsoft.Utilities; table 12124 "Activity Code" @@ -9,6 +10,9 @@ table 12124 "Activity Code" Caption = 'Activity Code'; LookupPageID = 12124; DataClassification = CustomerContent; + ObsoleteReason = 'Replaced by the Business Activity Code table.'; + ObsoleteState = Pending; + ObsoleteTag = '29.0'; fields { @@ -35,4 +39,5 @@ table 12124 "Activity Code" { } } +#endif diff --git a/src/Layers/IT/BaseApp/Local/Utilities/ActivityCodes.Page.al b/src/Layers/IT/BaseApp/Local/Utilities/ActivityCodes.Page.al index 76c291529a1..5a8ffd92e11 100644 --- a/src/Layers/IT/BaseApp/Local/Utilities/ActivityCodes.Page.al +++ b/src/Layers/IT/BaseApp/Local/Utilities/ActivityCodes.Page.al @@ -1,7 +1,8 @@ -// ------------------------------------------------------------------------------------------------ +// ------------------------------------------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. // ------------------------------------------------------------------------------------------------ +#if not CLEAN29 namespace Microsoft.Utilities; page 12124 "Activity Codes" @@ -10,6 +11,9 @@ page 12124 "Activity Codes" PageType = List; SourceTable = "Activity Code"; UsageCategory = Lists; + ObsoleteReason = 'Replaced by the Business Activity Codes page.'; + ObsoleteState = Pending; + ObsoleteTag = '29.0'; layout { @@ -36,4 +40,5 @@ page 12124 "Activity Codes" { } } +#endif diff --git a/src/Layers/IT/BaseApp/Local/Utilities/BusinessActivityCodeValidatorIT.Codeunit.al b/src/Layers/IT/BaseApp/Local/Utilities/BusinessActivityCodeValidatorIT.Codeunit.al new file mode 100644 index 00000000000..edd8dc8aa4f --- /dev/null +++ b/src/Layers/IT/BaseApp/Local/Utilities/BusinessActivityCodeValidatorIT.Codeunit.al @@ -0,0 +1,27 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Foundation.AuditCodes; + +codeunit 12105 "Business Activity Validator IT" implements "Business Activity Validator" +{ + procedure Validate(Code: Code[10]) + begin + if StrLen(Code) > 6 then + Error(InvalidBusinessActivityCodeLengthErr, Code); + end; + + [EventSubscriber(ObjectType::Codeunit, Codeunit::"Business Activity Code Mgt.", OnGetValidator, '', false, false)] + local procedure SetItalianValidator(CountryRegionCode: Code[10]; var BusinessActivityValidator: Interface "Business Activity Validator"; var IsHandled: Boolean) + begin + if not (CountryRegionCode in ['', 'IT']) then + exit; + + BusinessActivityValidator := this; + IsHandled := true; + end; + + var + InvalidBusinessActivityCodeLengthErr: Label 'The business activity code %1 cannot be longer than 6 characters in Italy.', Comment = '%1 = Business activity code'; +} \ No newline at end of file diff --git a/src/Layers/IT/BaseApp/OtherCapabilities/Upgrade/UpgradeBaseApp.Codeunit.al b/src/Layers/IT/BaseApp/OtherCapabilities/Upgrade/UpgradeBaseApp.Codeunit.al index c70abbfcc28..cfdcbdac717 100644 --- a/src/Layers/IT/BaseApp/OtherCapabilities/Upgrade/UpgradeBaseApp.Codeunit.al +++ b/src/Layers/IT/BaseApp/OtherCapabilities/Upgrade/UpgradeBaseApp.Codeunit.al @@ -25,6 +25,8 @@ using Microsoft.Finance.GeneralLedger.Account; using Microsoft.Finance.GeneralLedger.Journal; using Microsoft.Finance.GeneralLedger.Setup; using Microsoft.Finance.VAT.Calculation; +using Microsoft.Finance.VAT.Ledger; +using Microsoft.Finance.VAT.Reporting; using Microsoft.Finance.VAT.Setup; using Microsoft.FixedAssets.Depreciation; using Microsoft.FixedAssets.FixedAsset; @@ -62,16 +64,22 @@ using Microsoft.Projects.Project.Job; using Microsoft.Projects.Project.Planning; using Microsoft.Projects.Project.Setup; using Microsoft.Projects.Resources.Resource; +using Microsoft.Purchases.Archive; using Microsoft.Purchases.Document; using Microsoft.Purchases.History; using Microsoft.Purchases.Setup; using Microsoft.Purchases.Vendor; +using Microsoft.Sales.Archive; using Microsoft.Sales.Customer; using Microsoft.Sales.Document; +using Microsoft.Sales.FinanceCharge; using Microsoft.Sales.History; using Microsoft.Sales.Receivables; using Microsoft.Sales.Reminder; using Microsoft.Sales.Setup; +using Microsoft.Service.Contract; +using Microsoft.Service.Document; +using Microsoft.Service.Archive; using Microsoft.Service.History; using Microsoft.Utilities; using Microsoft.Warehouse.Activity; @@ -233,6 +241,7 @@ codeunit 104000 "Upgrade - BaseApp" UpgradeInventorySetupAllowInvtAdjmt(); UpgradeNoSeriesIT(); #if not CLEAN29 + UpgradeBusinessActivityCodes(); UpgradeDirectTransferPostingToEnum(); #endif UpgradeDirectTransferOnTransferRoute(); @@ -3790,6 +3799,67 @@ codeunit 104000 "Upgrade - BaseApp" UpgradeTag.SetUpgradeTag(UpgradeTagDefinitions.GetInitShipToPhoneNoUpgradeTag()); end; +#if not CLEAN29 + local procedure UpgradeBusinessActivityCodes() + var + ActivityCode: Record "Activity Code"; + BusinessActivity: Record "Business Activity"; + UpgradeTag: Codeunit "Upgrade Tag"; + UpgradeTagDefinitions: Codeunit "Upgrade Tag Definitions"; + begin + if UpgradeTag.HasUpgradeTag(UpgradeTagDefinitions.GetBusinessActivityCodeUpgradeTag()) then + exit; + + if ActivityCode.FindSet() then + repeat + if not BusinessActivity.Get(ActivityCode.Code) then begin + BusinessActivity.Init(); + BusinessActivity.Code := ActivityCode.Code; + BusinessActivity.Description := ActivityCode.Description; + BusinessActivity.Insert(); + end; + until ActivityCode.Next() = 0; + + CopyBusinessActivityCodeField(Database::"Gen. Journal Line", 12123); + CopyBusinessActivityCodeField(Database::"Posted Gen. Journal Line", 12123); + CopyBusinessActivityCodeField(Database::"General Ledger Setup", 12131); + CopyBusinessActivityCodeField(Database::"VAT Entry", 12123); + CopyBusinessActivityCodeField(Database::"VAT Statement Line", 12125); + CopyBusinessActivityCodeField(Database::"VAT Statement Name", 12125); + CopyBusinessActivityCodeField(Database::"VAT Setup", 24); + CopyBusinessActivityCodeField(Database::"Company Information", 12124); + CopyBusinessActivityCodeField(Database::"Periodic VAT Settlement Entry", 1); + CopyBusinessActivityCodeField(Database::"Purchase Header Archive", 12123); + CopyBusinessActivityCodeField(Database::"Purchase Header", 12123); + CopyBusinessActivityCodeField(Database::"Purch. Cr. Memo Hdr.", 12123); + CopyBusinessActivityCodeField(Database::"Purch. Inv. Header", 12123); + CopyBusinessActivityCodeField(Database::"Sales Header Archive", 12123); + CopyBusinessActivityCodeField(Database::"Sales Header", 12123); + CopyBusinessActivityCodeField(Database::"Finance Charge Memo Header", 12123); + CopyBusinessActivityCodeField(Database::"Issued Fin. Charge Memo Header", 12123); + CopyBusinessActivityCodeField(Database::"Sales Cr.Memo Header", 12123); + CopyBusinessActivityCodeField(Database::"Sales Invoice Header", 12123); + CopyBusinessActivityCodeField(Database::"Service Header Archive", 12123); + CopyBusinessActivityCodeField(Database::"Filed Service Contract Header", 12123); + CopyBusinessActivityCodeField(Database::"Service Contract Header", 12123); + CopyBusinessActivityCodeField(Database::"Service Header", 12123); + CopyBusinessActivityCodeField(Database::"Service Cr.Memo Header", 12123); + CopyBusinessActivityCodeField(Database::"Service Invoice Header", 12123); + + UpgradeTag.SetUpgradeTag(UpgradeTagDefinitions.GetBusinessActivityCodeUpgradeTag()); + end; + + local procedure CopyBusinessActivityCodeField(TableId: Integer; ActivityCodeFieldId: Integer) + var + DataTransfer: DataTransfer; + begin + DataTransfer.SetTables(TableId, TableId); + DataTransfer.AddFieldValue(ActivityCodeFieldId, 12189); + DataTransfer.UpdateAuditFields := false; + DataTransfer.CopyFields(); + end; +#endif + local procedure UpgradeReminderTextMultilines() var ReminderAttachmentText: Record "Reminder Attachment Text"; diff --git a/src/Layers/IT/BaseApp/OtherCapabilities/Upgrade/UpgradeTagDefinitions.Codeunit.al b/src/Layers/IT/BaseApp/OtherCapabilities/Upgrade/UpgradeTagDefinitions.Codeunit.al index 5ced18adf2e..fb724b8905e 100644 --- a/src/Layers/IT/BaseApp/OtherCapabilities/Upgrade/UpgradeTagDefinitions.Codeunit.al +++ b/src/Layers/IT/BaseApp/OtherCapabilities/Upgrade/UpgradeTagDefinitions.Codeunit.al @@ -147,6 +147,7 @@ codeunit 9998 "Upgrade Tag Definitions" PerCompanyUpgradeTags.Add(GetLocationBinPolicySetupsUpgradeTag()); PerCompanyUpgradeTags.Add(GetAllowInventoryAdjmtUpgradeTag()); #if not CLEAN29 + PerCompanyUpgradeTags.Add(GetBusinessActivityCodeUpgradeTag()); PerCompanyUpgradeTags.Add(GetDirectTransferPostingToEnumUpgradeTag()); #endif PerCompanyUpgradeTags.Add(GetDirectTransferOnTransferRouteUpgradeTag()); @@ -1260,6 +1261,13 @@ codeunit 9998 "Upgrade Tag Definitions" exit('MS-579699-ServiceShptLineFieldsUpgradeTag-20250926'); end; +#if not CLEAN29 + internal procedure GetBusinessActivityCodeUpgradeTag(): Code[250] + begin + exit('MS-BusinessActivityCode-20260729'); + end; +#endif + internal procedure GetZeroClosedBankAccountLedgerEntriesUpgradeTag(): Code[250] begin exit('MS-621821-ZeroClosedBankAccountLedgerEntriesUpgradeTag-20260223'); diff --git a/src/Layers/IT/BaseApp/Permissions/local.permissionset.al b/src/Layers/IT/BaseApp/Permissions/local.permissionset.al index 62c65625ac8..0a208db4dcd 100644 --- a/src/Layers/IT/BaseApp/Permissions/local.permissionset.al +++ b/src/Layers/IT/BaseApp/Permissions/local.permissionset.al @@ -14,6 +14,7 @@ using Microsoft.Finance.VAT.Setup; using Microsoft.Finance.VAT.TransactionNature; using Microsoft.Finance.WithholdingTax; using Microsoft.FixedAssets.Depreciation; +using Microsoft.Foundation.AuditCodes; using Microsoft.Foundation.Company; using Microsoft.Foundation.PaymentTerms; using Microsoft.Inventory.Costing; @@ -34,7 +35,10 @@ permissionset 1001 "LOCAL" Caption = 'Country/region-specific func.'; Permissions = tabledata "ABI/CAB Codes" = RIMD, +#if not CLEAN29 tabledata "Activity Code" = RIMD, +#endif + tabledata "Business Activity" = RIMD, tabledata "Appointment Code" = RIMD, tabledata "Before Start Item Cost" = RIMD, tabledata Bill = RIMD, diff --git a/src/Layers/IT/BaseApp/Permissions/localread.permissionset.al b/src/Layers/IT/BaseApp/Permissions/localread.permissionset.al index 1e96b4145b5..32a4abfce3c 100644 --- a/src/Layers/IT/BaseApp/Permissions/localread.permissionset.al +++ b/src/Layers/IT/BaseApp/Permissions/localread.permissionset.al @@ -13,6 +13,7 @@ using Microsoft.Finance.VAT.Setup; using Microsoft.Finance.VAT.TransactionNature; using Microsoft.Finance.WithholdingTax; using Microsoft.FixedAssets.Depreciation; +using Microsoft.Foundation.AuditCodes; using Microsoft.Foundation.Company; using Microsoft.Foundation.PaymentTerms; using Microsoft.Inventory.Costing; @@ -31,7 +32,10 @@ permissionset 1002 "LOCAL READ" Caption = 'Country/region-specific read only access.'; Permissions = tabledata "ABI/CAB Codes" = R, +#if not CLEAN29 tabledata "Activity Code" = R, +#endif + tabledata "Business Activity" = R, tabledata "Appointment Code" = R, tabledata "Before Start Item Cost" = R, tabledata Bill = R, diff --git a/src/Layers/IT/BaseApp/Purchases/Archive/PurchaseHeaderArchive.Table.al b/src/Layers/IT/BaseApp/Purchases/Archive/PurchaseHeaderArchive.Table.al index 8c23dec4a32..231138e99a9 100644 --- a/src/Layers/IT/BaseApp/Purchases/Archive/PurchaseHeaderArchive.Table.al +++ b/src/Layers/IT/BaseApp/Purchases/Archive/PurchaseHeaderArchive.Table.al @@ -35,7 +35,6 @@ using Microsoft.Purchases.Payables; using Microsoft.Purchases.Vendor; using Microsoft.Sales.Customer; using Microsoft.Sales.History; -using Microsoft.Utilities; using System.Globalization; using System.Security.AccessControl; using System.Security.User; @@ -743,6 +742,11 @@ table 5109 "Purchase Header Archive" ToolTip = 'Specifies the telephone number of the company''s shipping address.'; ExtendedDatatype = PhoneNo; } + field(395; "Business Activity Code"; Code[10]) + { + Caption = 'Business Activity Code'; + TableRelation = "Business Activity".Code; + } field(480; "Dimension Set ID"; Integer) { Caption = 'Dimension Set ID'; @@ -938,11 +942,16 @@ table 5109 "Purchase Header Archive" Caption = 'Shipping Agent Code'; TableRelation = "Shipping Agent"; } +#if not CLEAN29 field(12123; "Activity Code"; Code[6]) { Caption = 'Activity Code'; - TableRelation = "Activity Code".Code; + TableRelation = Microsoft.Utilities."Activity Code".Code; + ObsoleteReason = 'Replaced by the Business Activity Code field.'; + ObsoleteState = Pending; + ObsoleteTag = '29.0'; } +#endif field(12125; "Service Tariff No."; Code[10]) { Caption = 'Service Tariff No.'; diff --git a/src/Layers/IT/BaseApp/Purchases/Document/BlanketPurchaseOrder.Page.al b/src/Layers/IT/BaseApp/Purchases/Document/BlanketPurchaseOrder.Page.al index 9d0fb68c30e..fb68f601d94 100644 --- a/src/Layers/IT/BaseApp/Purchases/Document/BlanketPurchaseOrder.Page.al +++ b/src/Layers/IT/BaseApp/Purchases/Document/BlanketPurchaseOrder.Page.al @@ -274,7 +274,18 @@ page 509 "Blanket Purchase Order" ApplicationArea = Suite; ToolTip = 'Specifies the operation type that is assigned to the purchase invoice.'; } +#if not CLEAN29 field("Activity Code"; Rec."Activity Code") + { + ApplicationArea = Suite; + ShowMandatory = IsActivityCodeMandatory; + ToolTip = 'Specifies the code for the company''s primary activity.'; + ObsoleteReason = 'Replaced by the Business Activity Code field.'; + ObsoleteState = Pending; + ObsoleteTag = '29.0'; + } +#endif + field("Business Activity Code"; Rec."Business Activity Code") { ApplicationArea = Suite; ShowMandatory = IsActivityCodeMandatory; @@ -1287,7 +1298,10 @@ page 509 "Blanket Purchase Order" GeneralLedgerSetup: Record "General Ledger Setup"; begin GeneralLedgerSetup.Get(); + #if not CLEAN29 IsActivityCodeMandatory := GeneralLedgerSetup."Use Activity Code"; + #endif + IsActivityCodeMandatory := IsActivityCodeMandatory or GeneralLedgerSetup."Use Business Activity Code"; end; local procedure SaveInvoiceDiscountAmount() diff --git a/src/Layers/IT/BaseApp/Purchases/Document/PurchaseCreditMemo.Page.al b/src/Layers/IT/BaseApp/Purchases/Document/PurchaseCreditMemo.Page.al index 48c6e2ef5eb..cb8c7e94945 100644 --- a/src/Layers/IT/BaseApp/Purchases/Document/PurchaseCreditMemo.Page.al +++ b/src/Layers/IT/BaseApp/Purchases/Document/PurchaseCreditMemo.Page.al @@ -1,4 +1,4 @@ -// ------------------------------------------------------------------------------------------------ +// ------------------------------------------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. // ------------------------------------------------------------------------------------------------ @@ -357,7 +357,18 @@ page 52 "Purchase Credit Memo" ShowMandatory = true; ToolTip = 'Specifies the operation type that is assigned to the purchase invoice.'; } +#if not CLEAN29 field("Activity Code"; Rec."Activity Code") + { + ApplicationArea = Basic, Suite; + ShowMandatory = IsActivityCodeMandatory; + ToolTip = 'Specifies the code for the company''s primary activity.'; + ObsoleteReason = 'Replaced by the Business Activity Code field.'; + ObsoleteState = Pending; + ObsoleteTag = '29.0'; + } +#endif + field("Business Activity Code"; Rec."Business Activity Code") { ApplicationArea = Basic, Suite; ShowMandatory = IsActivityCodeMandatory; @@ -1895,7 +1906,10 @@ page 52 "Purchase Credit Memo" GeneralLedgerSetup: Record "General Ledger Setup"; begin GeneralLedgerSetup.Get(); + #if not CLEAN29 IsActivityCodeMandatory := GeneralLedgerSetup."Use Activity Code"; + #endif + IsActivityCodeMandatory := IsActivityCodeMandatory or GeneralLedgerSetup."Use Business Activity Code"; end; procedure CallPostDocument(PostingCodeunitID: Integer; Navigate: Enum "Navigate After Posting") diff --git a/src/Layers/IT/BaseApp/Purchases/Document/PurchaseHeader.Table.al b/src/Layers/IT/BaseApp/Purchases/Document/PurchaseHeader.Table.al index d6814a99d14..8b48c44c089 100644 --- a/src/Layers/IT/BaseApp/Purchases/Document/PurchaseHeader.Table.al +++ b/src/Layers/IT/BaseApp/Purchases/Document/PurchaseHeader.Table.al @@ -1,4 +1,4 @@ -// ------------------------------------------------------------------------------------------------ +// ------------------------------------------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. // ------------------------------------------------------------------------------------------------ @@ -2390,6 +2390,11 @@ table 38 "Purchase Header" FieldClass = FlowField; AutoFormatType = 1; } + field(395; "Business Activity Code"; Code[10]) + { + Caption = 'Business Activity Code'; + TableRelation = "Business Activity".Code; + } field(480; "Dimension Set ID"; Integer) { Caption = 'Dimension Set ID'; @@ -3029,11 +3034,16 @@ table 38 "Purchase Header" end; end; } +#if not CLEAN29 field(12123; "Activity Code"; Code[6]) { Caption = 'Activity Code'; TableRelation = "Activity Code".Code; + ObsoleteReason = 'Replaced by the Business Activity Code field.'; + ObsoleteState = Pending; + ObsoleteTag = '29.0'; } +#endif field(12125; "Service Tariff No."; Code[10]) { Caption = 'Service Tariff No.'; diff --git a/src/Layers/IT/BaseApp/Purchases/Document/PurchaseInvoice.Page.al b/src/Layers/IT/BaseApp/Purchases/Document/PurchaseInvoice.Page.al index 0a3c99d5a79..37439ed0399 100644 --- a/src/Layers/IT/BaseApp/Purchases/Document/PurchaseInvoice.Page.al +++ b/src/Layers/IT/BaseApp/Purchases/Document/PurchaseInvoice.Page.al @@ -1,4 +1,4 @@ -// ------------------------------------------------------------------------------------------------ +// ------------------------------------------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. // ------------------------------------------------------------------------------------------------ @@ -335,7 +335,18 @@ page 51 "Purchase Invoice" Importance = Promoted; ToolTip = 'Specifies the operation type that is assigned to the purchase invoice.'; } +#if not CLEAN29 field("Activity Code"; Rec."Activity Code") + { + ApplicationArea = Basic, Suite; + ShowMandatory = IsActivityCodeMandatory; + ToolTip = 'Specifies the code for the company''s primary activity.'; + ObsoleteReason = 'Replaced by the Business Activity Code field.'; + ObsoleteState = Pending; + ObsoleteTag = '29.0'; + } +#endif + field("Business Activity Code"; Rec."Business Activity Code") { ApplicationArea = Basic, Suite; ShowMandatory = IsActivityCodeMandatory; @@ -2059,7 +2070,10 @@ page 51 "Purchase Invoice" GeneralLedgerSetup: Record "General Ledger Setup"; begin GeneralLedgerSetup.Get(); + #if not CLEAN29 IsActivityCodeMandatory := GeneralLedgerSetup."Use Activity Code"; + #endif + IsActivityCodeMandatory := IsActivityCodeMandatory or GeneralLedgerSetup."Use Business Activity Code"; end; procedure LineModified() diff --git a/src/Layers/IT/BaseApp/Purchases/Document/PurchaseOrder.Page.al b/src/Layers/IT/BaseApp/Purchases/Document/PurchaseOrder.Page.al index 0d070a02f3d..fba61f542d4 100644 --- a/src/Layers/IT/BaseApp/Purchases/Document/PurchaseOrder.Page.al +++ b/src/Layers/IT/BaseApp/Purchases/Document/PurchaseOrder.Page.al @@ -1,4 +1,4 @@ -// ------------------------------------------------------------------------------------------------ +// ------------------------------------------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. // ------------------------------------------------------------------------------------------------ @@ -362,7 +362,18 @@ page 50 "Purchase Order" Importance = Promoted; ToolTip = 'Specifies the operation type that is assigned to the purchase invoice.'; } +#if not CLEAN29 field("Activity Code"; Rec."Activity Code") + { + ApplicationArea = Basic, Suite; + ShowMandatory = IsActivityCodeMandatory; + ToolTip = 'Specifies the code for the company''s primary activity.'; + ObsoleteReason = 'Replaced by the Business Activity Code field.'; + ObsoleteState = Pending; + ObsoleteTag = '29.0'; + } +#endif + field("Business Activity Code"; Rec."Business Activity Code") { ApplicationArea = Basic, Suite; ShowMandatory = IsActivityCodeMandatory; @@ -2555,7 +2566,10 @@ page 50 "Purchase Order" GeneralLedgerSetup: Record "General Ledger Setup"; begin GeneralLedgerSetup.Get(); + #if not CLEAN29 IsActivityCodeMandatory := GeneralLedgerSetup."Use Activity Code"; + #endif + IsActivityCodeMandatory := IsActivityCodeMandatory or GeneralLedgerSetup."Use Business Activity Code"; end; procedure CallPostDocument(PostingCodeunitID: Integer; Navigate: Enum "Navigate After Posting") diff --git a/src/Layers/IT/BaseApp/Purchases/Document/PurchaseQuote.Page.al b/src/Layers/IT/BaseApp/Purchases/Document/PurchaseQuote.Page.al index a9ef26603e8..3e3d37c77fb 100644 --- a/src/Layers/IT/BaseApp/Purchases/Document/PurchaseQuote.Page.al +++ b/src/Layers/IT/BaseApp/Purchases/Document/PurchaseQuote.Page.al @@ -1,4 +1,4 @@ -// ------------------------------------------------------------------------------------------------ +// ------------------------------------------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. // ------------------------------------------------------------------------------------------------ @@ -318,7 +318,18 @@ page 49 "Purchase Quote" Importance = Promoted; ToolTip = 'Specifies the operation type that is assigned to the purchase invoice.'; } +#if not CLEAN29 field("Activity Code"; Rec."Activity Code") + { + ApplicationArea = Basic, Suite; + ShowMandatory = IsActivityCodeMandatory; + ToolTip = 'Specifies the code for the company''s primary activity.'; + ObsoleteReason = 'Replaced by the Business Activity Code field.'; + ObsoleteState = Pending; + ObsoleteTag = '29.0'; + } +#endif + field("Business Activity Code"; Rec."Business Activity Code") { ApplicationArea = Basic, Suite; ShowMandatory = IsActivityCodeMandatory; @@ -1639,7 +1650,10 @@ page 49 "Purchase Quote" GeneralLedgerSetup: Record "General Ledger Setup"; begin GeneralLedgerSetup.Get(); + #if not CLEAN29 IsActivityCodeMandatory := GeneralLedgerSetup."Use Activity Code"; + #endif + IsActivityCodeMandatory := IsActivityCodeMandatory or GeneralLedgerSetup."Use Business Activity Code"; end; local procedure ApproveCalcInvDisc() diff --git a/src/Layers/IT/BaseApp/Purchases/Document/PurchaseReturnOrder.Page.al b/src/Layers/IT/BaseApp/Purchases/Document/PurchaseReturnOrder.Page.al index 3fcebdc18e3..442ad33b6eb 100644 --- a/src/Layers/IT/BaseApp/Purchases/Document/PurchaseReturnOrder.Page.al +++ b/src/Layers/IT/BaseApp/Purchases/Document/PurchaseReturnOrder.Page.al @@ -1,4 +1,4 @@ -// ------------------------------------------------------------------------------------------------ +// ------------------------------------------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. // ------------------------------------------------------------------------------------------------ @@ -308,7 +308,18 @@ page 6640 "Purchase Return Order" ApplicationArea = PurchReturnOrder; ToolTip = 'Specifies the operation type that is assigned to the purchase invoice.'; } +#if not CLEAN29 field("Activity Code"; Rec."Activity Code") + { + ApplicationArea = PurchReturnOrder; + ShowMandatory = IsActivityCodeMandatory; + ToolTip = 'Specifies the code for the company''s primary activity.'; + ObsoleteReason = 'Replaced by the Business Activity Code field.'; + ObsoleteState = Pending; + ObsoleteTag = '29.0'; + } +#endif + field("Business Activity Code"; Rec."Business Activity Code") { ApplicationArea = PurchReturnOrder; ShowMandatory = IsActivityCodeMandatory; @@ -1944,7 +1955,10 @@ page 6640 "Purchase Return Order" GeneralLedgerSetup: Record "General Ledger Setup"; begin GeneralLedgerSetup.Get(); + #if not CLEAN29 IsActivityCodeMandatory := GeneralLedgerSetup."Use Activity Code"; + #endif + IsActivityCodeMandatory := IsActivityCodeMandatory or GeneralLedgerSetup."Use Business Activity Code"; end; procedure CallPostDocument(PostingCodeunitID: Integer) diff --git a/src/Layers/IT/BaseApp/Purchases/Document/ReleasePurchaseDocument.Codeunit.al b/src/Layers/IT/BaseApp/Purchases/Document/ReleasePurchaseDocument.Codeunit.al index 8125a298e33..45554121df9 100644 --- a/src/Layers/IT/BaseApp/Purchases/Document/ReleasePurchaseDocument.Codeunit.al +++ b/src/Layers/IT/BaseApp/Purchases/Document/ReleasePurchaseDocument.Codeunit.al @@ -77,8 +77,12 @@ codeunit 415 "Release Purchase Document" PurchaseHeader.TestField("Buy-from Vendor No."); GeneralLedgerSetup.GetRecordOnce(); +#if not CLEAN29 if GeneralLedgerSetup."Use Activity Code" then PurchaseHeader.TestField("Activity Code"); +#endif + if GeneralLedgerSetup."Use Business Activity Code" then + PurchaseHeader.TestField("Business Activity Code"); IsHandled := false; OnCodeOnAfterCheckPurchaseReleaseRestrictions(PurchaseHeader, IsHandled); diff --git a/src/Layers/IT/BaseApp/Purchases/History/PostedPurchaseCreditMemo.Page.al b/src/Layers/IT/BaseApp/Purchases/History/PostedPurchaseCreditMemo.Page.al index 471e883992b..2725a7c5dcf 100644 --- a/src/Layers/IT/BaseApp/Purchases/History/PostedPurchaseCreditMemo.Page.al +++ b/src/Layers/IT/BaseApp/Purchases/History/PostedPurchaseCreditMemo.Page.al @@ -1,4 +1,4 @@ -// ------------------------------------------------------------------------------------------------ +// ------------------------------------------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. // ------------------------------------------------------------------------------------------------ @@ -238,7 +238,18 @@ page 140 "Posted Purchase Credit Memo" Editable = false; Importance = Additional; } +#if not CLEAN29 field("Activity Code"; Rec."Activity Code") + { + ApplicationArea = Basic, Suite; + Editable = false; + ToolTip = 'Specifies the code for the company''s primary activity.'; + ObsoleteReason = 'Replaced by the Business Activity Code field.'; + ObsoleteState = Pending; + ObsoleteTag = '29.0'; + } +#endif + field("Business Activity Code"; Rec."Business Activity Code") { ApplicationArea = Basic, Suite; Editable = false; diff --git a/src/Layers/IT/BaseApp/Purchases/History/PostedPurchaseInvoice.Page.al b/src/Layers/IT/BaseApp/Purchases/History/PostedPurchaseInvoice.Page.al index aa0d0b45b52..e79e61f4c7d 100644 --- a/src/Layers/IT/BaseApp/Purchases/History/PostedPurchaseInvoice.Page.al +++ b/src/Layers/IT/BaseApp/Purchases/History/PostedPurchaseInvoice.Page.al @@ -1,4 +1,4 @@ -// ------------------------------------------------------------------------------------------------ +// ------------------------------------------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. // ------------------------------------------------------------------------------------------------ @@ -233,7 +233,18 @@ page 138 "Posted Purchase Invoice" Editable = false; Importance = Additional; } +#if not CLEAN29 field("Activity Code"; Rec."Activity Code") + { + ApplicationArea = Basic, Suite; + Editable = false; + ToolTip = 'Specifies the code for the company''s primary activity.'; + ObsoleteReason = 'Replaced by the Business Activity Code field.'; + ObsoleteState = Pending; + ObsoleteTag = '29.0'; + } +#endif + field("Business Activity Code"; Rec."Business Activity Code") { ApplicationArea = Basic, Suite; Editable = false; diff --git a/src/Layers/IT/BaseApp/Purchases/History/PurchCrMemoHdr.Table.al b/src/Layers/IT/BaseApp/Purchases/History/PurchCrMemoHdr.Table.al index b9f53d50bff..847d46ceeb3 100644 --- a/src/Layers/IT/BaseApp/Purchases/History/PurchCrMemoHdr.Table.al +++ b/src/Layers/IT/BaseApp/Purchases/History/PurchCrMemoHdr.Table.al @@ -1,4 +1,4 @@ -// ------------------------------------------------------------------------------------------------ +// ------------------------------------------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. // ------------------------------------------------------------------------------------------------ @@ -566,6 +566,12 @@ table 124 "Purch. Cr. Memo Hdr." ToolTip = 'Specifies the telephone number of the company''s shipping address.'; ExtendedDatatype = PhoneNo; } + field(395; "Business Activity Code"; Code[10]) + { + Caption = 'Business Activity Code'; + Editable = false; + TableRelation = "Business Activity".Code; + } field(480; "Dimension Set ID"; Integer) { Caption = 'Dimension Set ID'; @@ -680,12 +686,17 @@ table 124 "Purch. Cr. Memo Hdr." { Caption = 'Operation Occurred Date'; } +#if not CLEAN29 field(12123; "Activity Code"; Code[6]) { Caption = 'Activity Code'; Editable = false; TableRelation = "Activity Code".Code; + ObsoleteReason = 'Replaced by the Business Activity Code field.'; + ObsoleteState = Pending; + ObsoleteTag = '29.0'; } +#endif field(12125; "Service Tariff No."; Code[10]) { Caption = 'Service Tariff No.'; diff --git a/src/Layers/IT/BaseApp/Purchases/History/PurchInvHeader.Table.al b/src/Layers/IT/BaseApp/Purchases/History/PurchInvHeader.Table.al index 2a585cb6378..93d0f3861d9 100644 --- a/src/Layers/IT/BaseApp/Purchases/History/PurchInvHeader.Table.al +++ b/src/Layers/IT/BaseApp/Purchases/History/PurchInvHeader.Table.al @@ -1,4 +1,4 @@ -// ------------------------------------------------------------------------------------------------ +// ------------------------------------------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. // ------------------------------------------------------------------------------------------------ @@ -615,6 +615,12 @@ table 122 "Purch. Inv. Header" ToolTip = 'Specifies the telephone number of the company''s shipping address.'; ExtendedDatatype = PhoneNo; } + field(395; "Business Activity Code"; Code[10]) + { + Caption = 'Business Activity Code'; + Editable = false; + TableRelation = "Business Activity".Code; + } field(480; "Dimension Set ID"; Integer) { Caption = 'Dimension Set ID'; @@ -733,12 +739,17 @@ table 122 "Purch. Inv. Header" { Caption = 'Operation Occurred Date'; } +#if not CLEAN29 field(12123; "Activity Code"; Code[6]) { Caption = 'Activity Code'; Editable = false; TableRelation = "Activity Code".Code; + ObsoleteReason = 'Replaced by the Business Activity Code field.'; + ObsoleteState = Pending; + ObsoleteTag = '29.0'; } +#endif field(12125; "Service Tariff No."; Code[10]) { Caption = 'Service Tariff No.'; diff --git a/src/Layers/IT/BaseApp/Purchases/Posting/PurchPost.Codeunit.al b/src/Layers/IT/BaseApp/Purchases/Posting/PurchPost.Codeunit.al index 281623cbdff..788ee1f8de3 100644 --- a/src/Layers/IT/BaseApp/Purchases/Posting/PurchPost.Codeunit.al +++ b/src/Layers/IT/BaseApp/Purchases/Posting/PurchPost.Codeunit.al @@ -330,7 +330,11 @@ codeunit 90 "Purch.-Post" OnRunOnAfterPostInvoice(PurchHeader, PurchRcptHeader, ReturnShptHeader, PurchInvHeader, PurchCrMemoHeader, PreviewMode, Window, SrcCode, GenJnlLineDocType, GenJnlLineDocNo, GenJnlPostLine); if ICGenJnlLineNo > 0 then - PostICGenJnl(PurchHeader."Activity Code"); + PostICGenJnl( +#if not CLEAN29 + PurchHeader."Activity Code", +#endif + PurchHeader."Business Activity Code"); IsHandled := false; OnRunOnBeforeMakeInventoryAdjustment(PurchHeader, GenJnlPostLine, ItemJnlPostLine, PreviewMode, PurchRcptHeader, PurchInvHeader, IsHandled); if not IsHandled then @@ -5988,7 +5992,11 @@ codeunit 90 "Purch.-Post" end; end; - local procedure PostICGenJnl(ActivityCode: Code[6]) + local procedure PostICGenJnl( +#if not CLEAN29 + ActivityCode: Code[6]; +#endif + BusinessActivityCode: Code[10]) var ICInboxOutboxMgt: Codeunit ICInboxOutboxMgt; ICOutboxExport: Codeunit "IC Outbox Export"; @@ -6001,7 +6009,10 @@ codeunit 90 "Purch.-Post" ICInboxOutboxMgt.CreateOutboxJnlLine(ICTransactionNo, 1, TempICGenJnlLine); ICOutboxExport.ProcessAutoSendOutboxTransactionNo(ICTransactionNo); if TempICGenJnlLine.Amount <> 0 then begin +#if not CLEAN29 TempICGenJnlLine."Activity Code" := ActivityCode; +#endif + TempICGenJnlLine."Business Activity Code" := BusinessActivityCode; GenJnlPostLine.RunWithCheck(TempICGenJnlLine); end; until TempICGenJnlLine.Next() = 0; diff --git a/src/Layers/IT/BaseApp/Purchases/Posting/PurchPostInvoice.Codeunit.al b/src/Layers/IT/BaseApp/Purchases/Posting/PurchPostInvoice.Codeunit.al index bb82fdbfd1a..646b1c18411 100644 --- a/src/Layers/IT/BaseApp/Purchases/Posting/PurchPostInvoice.Codeunit.al +++ b/src/Layers/IT/BaseApp/Purchases/Posting/PurchPostInvoice.Codeunit.al @@ -591,8 +591,12 @@ codeunit 816 "Purch. Post Invoice" implements "Invoice Posting" InvoicePostingParameters."External Document No.", InvoicePostingParameters."Source Code", ''); GenJnlLine.CopyFromPurchHeader(PurchHeader); +#if not CLEAN29 if GLSetup."Use Activity Code" then GenJnlLine."Activity Code" := PurchHeader."Activity Code"; +#endif + if GLSetup."Use Business Activity Code" then + GenJnlLine."Business Activity Code" := PurchHeader."Business Activity Code"; GenJnlLine."Reverse Sales VAT No. Series" := PurchHeader."Reverse Sales VAT No. Series"; GenJnlLine."Reverse Sales VAT No." := PurchHeader."Reverse Sales VAT No."; GenJnlLine."Fiscal Code" := PurchHeader."Fiscal Code"; diff --git a/src/Layers/IT/BaseApp/Purchases/Posting/PurchasePostPrepayments.Codeunit.al b/src/Layers/IT/BaseApp/Purchases/Posting/PurchasePostPrepayments.Codeunit.al index a8466e93077..b72ce535869 100644 --- a/src/Layers/IT/BaseApp/Purchases/Posting/PurchasePostPrepayments.Codeunit.al +++ b/src/Layers/IT/BaseApp/Purchases/Posting/PurchasePostPrepayments.Codeunit.al @@ -418,8 +418,12 @@ codeunit 444 "Purchase-Post Prepayments" GLSetup.GetRecordOnce(); if GLSetup."Journal Templ. Name Mandatory" then PurchHeader.TestField("Journal Templ. Name"); +#if not CLEAN29 if GLSetup."Use Activity Code" then PurchHeader.TestField("Activity Code"); +#endif + if GLSetup."Use Business Activity Code" then + PurchHeader.TestField("Business Activity Code"); if PurchHeader."Operation Occurred Date" < GLSetup."Last Gen. Jour. Printing Date" then PurchHeader.FieldError("Operation Occurred Date", Text1130008); if PurchHeader."Applies-to Doc. No." <> '' then @@ -2125,7 +2129,7 @@ codeunit 444 "Purchase-Post Prepayments" end; [IntegrationEvent(false, false)] - local procedure OnCodeOnAfterUpdateHeaderAndLines(var PurchaseHeader: Record "Purchase Header"; var PurchInvHeader: Record "Purch. Inv. Header"; var PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr."; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line";DocumentType: Option Invoice,"Credit Memo"; PreviewMode: Boolean) + local procedure OnCodeOnAfterUpdateHeaderAndLines(var PurchaseHeader: Record "Purchase Header"; var PurchInvHeader: Record "Purch. Inv. Header"; var PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr."; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line"; DocumentType: Option Invoice,"Credit Memo"; PreviewMode: Boolean) begin end; diff --git a/src/Layers/IT/BaseApp/Sales/Archive/SalesHeaderArchive.Table.al b/src/Layers/IT/BaseApp/Sales/Archive/SalesHeaderArchive.Table.al index f3b2ed2c903..aee58432282 100644 --- a/src/Layers/IT/BaseApp/Sales/Archive/SalesHeaderArchive.Table.al +++ b/src/Layers/IT/BaseApp/Sales/Archive/SalesHeaderArchive.Table.al @@ -36,7 +36,6 @@ using Microsoft.Sales.Customer; using Microsoft.Sales.Document; using Microsoft.Sales.History; using Microsoft.Sales.Pricing; -using Microsoft.Utilities; using System.Globalization; using System.Reflection; using System.Security.AccessControl; @@ -1191,6 +1190,11 @@ table 5107 "Sales Header Archive" ExtendedDatatype = PhoneNo; ToolTip = 'Specifies the telephone number of the company''s shipping address.'; } + field(395; "Business Activity Code"; Code[10]) + { + Caption = 'Business Activity Code'; + TableRelation = "Business Activity".Code; + } /// /// Specifies the unique identifier for the combination of dimension values assigned to this document. /// @@ -1526,11 +1530,16 @@ table 5107 "Sales Header Archive" { Caption = 'Operation Occurred Date'; } +#if not CLEAN29 field(12123; "Activity Code"; Code[6]) { Caption = 'Activity Code'; - TableRelation = "Activity Code".Code; + TableRelation = Microsoft.Utilities."Activity Code".Code; + ObsoleteReason = 'Replaced by the Business Activity Code field.'; + ObsoleteState = Pending; + ObsoleteTag = '29.0'; } +#endif field(12125; "Service Tariff No."; Code[10]) { Caption = 'Service Tariff No.'; diff --git a/src/Layers/IT/BaseApp/Sales/Document/BlanketSalesOrder.Page.al b/src/Layers/IT/BaseApp/Sales/Document/BlanketSalesOrder.Page.al index d4f9a7deb95..e7d791d725d 100644 --- a/src/Layers/IT/BaseApp/Sales/Document/BlanketSalesOrder.Page.al +++ b/src/Layers/IT/BaseApp/Sales/Document/BlanketSalesOrder.Page.al @@ -274,7 +274,18 @@ page 507 "Blanket Sales Order" ApplicationArea = Suite; ToolTip = 'Specifies the operation type that is assigned to the sales order.'; } +#if not CLEAN29 field("Activity Code"; Rec."Activity Code") + { + ApplicationArea = Suite; + ShowMandatory = IsActivityCodeMandatory; + ToolTip = 'Specifies the code for the company''s primary activity.'; + ObsoleteReason = 'Replaced by the Business Activity Code field.'; + ObsoleteState = Pending; + ObsoleteTag = '29.0'; + } +#endif + field("Business Activity Code"; Rec."Business Activity Code") { ApplicationArea = Suite; ShowMandatory = IsActivityCodeMandatory; @@ -1440,7 +1451,10 @@ page 507 "Blanket Sales Order" GeneralLedgerSetup: Record "General Ledger Setup"; begin GeneralLedgerSetup.Get(); + #if not CLEAN29 IsActivityCodeMandatory := GeneralLedgerSetup."Use Activity Code"; + #endif + IsActivityCodeMandatory := IsActivityCodeMandatory or GeneralLedgerSetup."Use Business Activity Code"; end; local procedure SaveInvoiceDiscountAmount() diff --git a/src/Layers/IT/BaseApp/Sales/Document/CombineReturnReceipts.Report.al b/src/Layers/IT/BaseApp/Sales/Document/CombineReturnReceipts.Report.al index 57a6c3059da..b89f912d55e 100644 --- a/src/Layers/IT/BaseApp/Sales/Document/CombineReturnReceipts.Report.al +++ b/src/Layers/IT/BaseApp/Sales/Document/CombineReturnReceipts.Report.al @@ -341,7 +341,10 @@ report 6653 "Combine Return Receipts" SalesHeader.Insert(true); ValidateCustomerNoFromOrder(SalesHeader, SalesOrderHeader); SalesHeader.Validate("Operation Type", OperationType.Code); +#if not CLEAN29 SalesHeader.Validate("Activity Code", SalesOrderHeader."Activity Code"); +#endif + SalesHeader.Validate("Business Activity Code", SalesOrderHeader."Business Activity Code"); SalesHeader.Validate("Currency Code", SalesOrderHeader."Currency Code"); SalesHeader.Validate("Posting Date", PostingDateReq); SalesHeader.Validate("Document Date", DocDateReq); @@ -430,7 +433,12 @@ report 6653 "Combine Return Receipts" (SalesOrderHeader."Salesperson Code" <> SalesHeader."Salesperson Code") or (SalesOrderHeader."Payment Terms Code" <> SalesHeader."Payment Terms Code") or (SalesOrderHeader."Payment Method Code" <> SalesHeader."Payment Method Code") or +#if not CLEAN29 + (SalesOrderHeader."Business Activity Code" <> SalesHeader."Business Activity Code") or (SalesOrderHeader."Activity Code" <> SalesHeader."Activity Code"); +#else + (SalesOrderHeader."Business Activity Code" <> SalesHeader."Business Activity Code"); +#endif OnAfterShouldFinalizeSalesInvHeader(SalesOrderHeader, SalesHeader, Finalize, ReturnReceiptLine, "Return Receipt Header"); exit(Finalize); diff --git a/src/Layers/IT/BaseApp/Sales/Document/CombineShipments.Report.al b/src/Layers/IT/BaseApp/Sales/Document/CombineShipments.Report.al index 6266e5c729b..3baeebf52ca 100644 --- a/src/Layers/IT/BaseApp/Sales/Document/CombineShipments.Report.al +++ b/src/Layers/IT/BaseApp/Sales/Document/CombineShipments.Report.al @@ -467,7 +467,10 @@ report 295 "Combine Shipments" ValidateCustomerNo(SalesHeader, SalesOrderHeader); SalesHeader.Validate("Bank Account", SalesOrderHeader."Bank Account"); SalesHeader.Validate("Operation Type", OperationType.Code); +#if not CLEAN29 SalesHeader.Validate("Activity Code", SalesOrderHeader."Activity Code"); +#endif + SalesHeader.Validate("Business Activity Code", SalesOrderHeader."Business Activity Code"); SalesHeader.Validate("Posting Date", PostingDateReq); SalesHeader.Validate("Document Date", DocDateReq); SalesHeader.Validate("VAT Reporting Date", VATDateReq); @@ -600,7 +603,10 @@ report 295 "Combine Shipments" (SalesOrderHeader."Salesperson Code" <> SalesHeader."Salesperson Code") or (SalesOrderHeader."Payment Terms Code" <> SalesHeader."Payment Terms Code") or (SalesOrderHeader."Payment Method Code" <> SalesHeader."Payment Method Code") or +#if not CLEAN29 (SalesOrderHeader."Activity Code" <> SalesHeader."Activity Code") or +#endif + (SalesOrderHeader."Business Activity Code" <> SalesHeader."Business Activity Code") or (SalesOrderHeader."Bank Account" <> SalesHeader."Bank Account") or (SalesOrderHeader."Fattura Project Code" <> SalesHeader."Fattura Project Code") or (SalesOrderHeader."Fattura Tender Code" <> SalesHeader."Fattura Tender Code"); diff --git a/src/Layers/IT/BaseApp/Sales/Document/ReleaseSalesDocument.Codeunit.al b/src/Layers/IT/BaseApp/Sales/Document/ReleaseSalesDocument.Codeunit.al index 7c17bc54301..528883d84e2 100644 --- a/src/Layers/IT/BaseApp/Sales/Document/ReleaseSalesDocument.Codeunit.al +++ b/src/Layers/IT/BaseApp/Sales/Document/ReleaseSalesDocument.Codeunit.al @@ -139,8 +139,12 @@ codeunit 414 "Release Sales Document" ReleaseATOs(SalesHeader); OnAfterReleaseATOs(SalesHeader, SalesLine, PreviewMode); GeneralLedgerSetup.GetRecordOnce(); +#if not CLEAN29 if GeneralLedgerSetup."Use Activity Code" then SalesHeader.TestField("Activity Code"); +#endif + if GeneralLedgerSetup."Use Business Activity Code" then + SalesHeader.TestField("Business Activity Code"); SalesHeader.Modify(true); OnCodeOnAfterModifySalesDoc(SalesHeader, LinesWereModified); diff --git a/src/Layers/IT/BaseApp/Sales/Document/SalesCreditMemo.Page.al b/src/Layers/IT/BaseApp/Sales/Document/SalesCreditMemo.Page.al index 53ad28e17c6..d84626e8ef2 100644 --- a/src/Layers/IT/BaseApp/Sales/Document/SalesCreditMemo.Page.al +++ b/src/Layers/IT/BaseApp/Sales/Document/SalesCreditMemo.Page.al @@ -332,7 +332,18 @@ page 44 "Sales Credit Memo" ShowMandatory = true; ToolTip = 'Specifies the operation type that is assigned to the sales order.'; } +#if not CLEAN29 field("Activity Code"; Rec."Activity Code") + { + ApplicationArea = Basic, Suite; + ShowMandatory = IsActivityCodeMandatory; + ToolTip = 'Specifies the code for the company''s primary activity.'; + ObsoleteReason = 'Replaced by the Business Activity Code field.'; + ObsoleteState = Pending; + ObsoleteTag = '29.0'; + } +#endif + field("Business Activity Code"; Rec."Business Activity Code") { ApplicationArea = Basic, Suite; ShowMandatory = IsActivityCodeMandatory; @@ -1727,7 +1738,10 @@ page 44 "Sales Credit Memo" GeneralLedgerSetup: Record "General Ledger Setup"; begin GeneralLedgerSetup.Get(); + #if not CLEAN29 IsActivityCodeMandatory := GeneralLedgerSetup."Use Activity Code"; + #endif + IsActivityCodeMandatory := IsActivityCodeMandatory or GeneralLedgerSetup."Use Business Activity Code"; end; /// diff --git a/src/Layers/IT/BaseApp/Sales/Document/SalesHeader.Table.al b/src/Layers/IT/BaseApp/Sales/Document/SalesHeader.Table.al index 5670363edbb..5f4eb9e8622 100644 --- a/src/Layers/IT/BaseApp/Sales/Document/SalesHeader.Table.al +++ b/src/Layers/IT/BaseApp/Sales/Document/SalesHeader.Table.al @@ -1,4 +1,4 @@ -// ------------------------------------------------------------------------------------------------ +// ------------------------------------------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. // ------------------------------------------------------------------------------------------------ @@ -3003,6 +3003,11 @@ table 36 "Sales Header" Editable = false; FieldClass = FlowField; } + field(395; "Business Activity Code"; Code[10]) + { + Caption = 'Business Activity Code'; + TableRelation = "Business Activity".Code; + } /// /// Specifies the identifier for the combination of dimensions applied to the document. /// @@ -3770,11 +3775,16 @@ table 36 "Sales Header" UpdateSalesLinesByFieldNo(FieldNo("Sell-to Customer No."), false); end; } +#if not CLEAN29 field(12123; "Activity Code"; Code[6]) { Caption = 'Activity Code'; TableRelation = "Activity Code".Code; + ObsoleteReason = 'Replaced by the Business Activity Code field.'; + ObsoleteState = Pending; + ObsoleteTag = '29.0'; } +#endif field(12125; "Service Tariff No."; Code[10]) { Caption = 'Service Tariff No.'; diff --git a/src/Layers/IT/BaseApp/Sales/Document/SalesInvoice.Page.al b/src/Layers/IT/BaseApp/Sales/Document/SalesInvoice.Page.al index efe5bb32dca..cc3ddad1ee1 100644 --- a/src/Layers/IT/BaseApp/Sales/Document/SalesInvoice.Page.al +++ b/src/Layers/IT/BaseApp/Sales/Document/SalesInvoice.Page.al @@ -348,7 +348,18 @@ page 43 "Sales Invoice" Importance = Promoted; ToolTip = 'Specifies the operation type that is assigned to the sales order.'; } +#if not CLEAN29 field("Activity Code"; Rec."Activity Code") + { + ApplicationArea = Basic, Suite; + ShowMandatory = IsActivityCodeMandatory; + ToolTip = 'Specifies the code for the company''s primary activity.'; + ObsoleteReason = 'Replaced by the Business Activity Code field.'; + ObsoleteState = Pending; + ObsoleteTag = '29.0'; + } +#endif + field("Business Activity Code"; Rec."Business Activity Code") { ApplicationArea = Basic, Suite; ShowMandatory = IsActivityCodeMandatory; @@ -2132,7 +2143,10 @@ page 43 "Sales Invoice" GeneralLedgerSetup: Record "General Ledger Setup"; begin GeneralLedgerSetup.Get(); + #if not CLEAN29 IsActivityCodeMandatory := GeneralLedgerSetup."Use Activity Code"; + #endif + IsActivityCodeMandatory := IsActivityCodeMandatory or GeneralLedgerSetup."Use Business Activity Code"; end; /// diff --git a/src/Layers/IT/BaseApp/Sales/Document/SalesOrder.Page.al b/src/Layers/IT/BaseApp/Sales/Document/SalesOrder.Page.al index f0f738c3763..13d6f95547a 100644 --- a/src/Layers/IT/BaseApp/Sales/Document/SalesOrder.Page.al +++ b/src/Layers/IT/BaseApp/Sales/Document/SalesOrder.Page.al @@ -397,7 +397,18 @@ page 42 "Sales Order" Importance = Promoted; ToolTip = 'Specifies the operation type that is assigned to the sales order.'; } +#if not CLEAN29 field("Activity Code"; Rec."Activity Code") + { + ApplicationArea = Basic, Suite; + ShowMandatory = IsActivityCodeMandatory; + ToolTip = 'Specifies the code for the company''s primary activity.'; + ObsoleteReason = 'Replaced by the Business Activity Code field.'; + ObsoleteState = Pending; + ObsoleteTag = '29.0'; + } +#endif + field("Business Activity Code"; Rec."Business Activity Code") { ApplicationArea = Basic, Suite; ShowMandatory = IsActivityCodeMandatory; @@ -2863,7 +2874,10 @@ page 42 "Sales Order" GeneralLedgerSetup: Record "General Ledger Setup"; begin GeneralLedgerSetup.Get(); + #if not CLEAN29 IsActivityCodeMandatory := GeneralLedgerSetup."Use Activity Code"; + #endif + IsActivityCodeMandatory := IsActivityCodeMandatory or GeneralLedgerSetup."Use Business Activity Code"; end; protected procedure PostSalesOrder(PostingCodeunitID: Integer; Navigate: Enum "Navigate After Posting") diff --git a/src/Layers/IT/BaseApp/Sales/Document/SalesQuote.Page.al b/src/Layers/IT/BaseApp/Sales/Document/SalesQuote.Page.al index d9544047055..bebd3fc3d92 100644 --- a/src/Layers/IT/BaseApp/Sales/Document/SalesQuote.Page.al +++ b/src/Layers/IT/BaseApp/Sales/Document/SalesQuote.Page.al @@ -371,7 +371,18 @@ page 41 "Sales Quote" Importance = Promoted; ToolTip = 'Specifies the operation type that is assigned to the sales order.'; } +#if not CLEAN29 field("Activity Code"; Rec."Activity Code") + { + ApplicationArea = Basic, Suite; + ShowMandatory = IsActivityCodeMandatory; + ToolTip = 'Specifies the code for the company''s primary activity.'; + ObsoleteReason = 'Replaced by the Business Activity Code field.'; + ObsoleteState = Pending; + ObsoleteTag = '29.0'; + } +#endif + field("Business Activity Code"; Rec."Business Activity Code") { ApplicationArea = Basic, Suite; ShowMandatory = IsActivityCodeMandatory; @@ -1926,7 +1937,10 @@ page 41 "Sales Quote" GeneralLedgerSetup: Record "General Ledger Setup"; begin GeneralLedgerSetup.Get(); + #if not CLEAN29 IsActivityCodeMandatory := GeneralLedgerSetup."Use Activity Code"; + #endif + IsActivityCodeMandatory := IsActivityCodeMandatory or GeneralLedgerSetup."Use Business Activity Code"; end; local procedure ApproveCalcInvDisc() diff --git a/src/Layers/IT/BaseApp/Sales/Document/SalesReturnOrder.Page.al b/src/Layers/IT/BaseApp/Sales/Document/SalesReturnOrder.Page.al index 33a936bb7b9..84e6fce7baa 100644 --- a/src/Layers/IT/BaseApp/Sales/Document/SalesReturnOrder.Page.al +++ b/src/Layers/IT/BaseApp/Sales/Document/SalesReturnOrder.Page.al @@ -1,4 +1,4 @@ -// ------------------------------------------------------------------------------------------------ +// ------------------------------------------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. // ------------------------------------------------------------------------------------------------ @@ -316,7 +316,18 @@ page 6630 "Sales Return Order" ApplicationArea = SalesReturnOrder; ToolTip = 'Specifies the operation type that is assigned to the sales order.'; } +#if not CLEAN29 field("Activity Code"; Rec."Activity Code") + { + ApplicationArea = SalesReturnOrder; + ShowMandatory = IsActivityCodeMandatory; + ToolTip = 'Specifies the code for the company''s primary activity.'; + ObsoleteReason = 'Replaced by the Business Activity Code field.'; + ObsoleteState = Pending; + ObsoleteTag = '29.0'; + } +#endif + field("Business Activity Code"; Rec."Business Activity Code") { ApplicationArea = SalesReturnOrder; ShowMandatory = IsActivityCodeMandatory; @@ -1838,7 +1849,10 @@ page 6630 "Sales Return Order" GeneralLedgerSetup: Record "General Ledger Setup"; begin GeneralLedgerSetup.Get(); + #if not CLEAN29 IsActivityCodeMandatory := GeneralLedgerSetup."Use Activity Code"; + #endif + IsActivityCodeMandatory := IsActivityCodeMandatory or GeneralLedgerSetup."Use Business Activity Code"; end; /// diff --git a/src/Layers/IT/BaseApp/Sales/FinanceCharge/FinChrgMemoIssue.Codeunit.al b/src/Layers/IT/BaseApp/Sales/FinanceCharge/FinChrgMemoIssue.Codeunit.al index 8cfdc856c27..74c86282544 100644 --- a/src/Layers/IT/BaseApp/Sales/FinanceCharge/FinChrgMemoIssue.Codeunit.al +++ b/src/Layers/IT/BaseApp/Sales/FinanceCharge/FinChrgMemoIssue.Codeunit.al @@ -336,8 +336,12 @@ codeunit 395 "FinChrgMemo-Issue" TempGenJnlLine."System-Created Entry" := SystemCreatedEntry; TempGenJnlLine."Posting No. Series" := FinChrgMemoHeader."Issuing No. Series"; TempGenJnlLine."Salespers./Purch. Code" := ''; +#if not CLEAN29 if GLSetup."Use Activity Code" then TempGenJnlLine."Activity Code" := FinChrgMemoHeader."Activity Code"; +#endif + if GLSetup."Use Business Activity Code" then + TempGenJnlLine."Business Activity Code" := FinChrgMemoHeader."Business Activity Code"; OnAfterInitGenJnlLine(TempGenJnlLine, FinChrgMemoHeader, SrcCode); end; diff --git a/src/Layers/IT/BaseApp/Sales/FinanceCharge/FinanceChargeMemo.Page.al b/src/Layers/IT/BaseApp/Sales/FinanceCharge/FinanceChargeMemo.Page.al index fe4ea814d34..0dfc7a822c0 100644 --- a/src/Layers/IT/BaseApp/Sales/FinanceCharge/FinanceChargeMemo.Page.al +++ b/src/Layers/IT/BaseApp/Sales/FinanceCharge/FinanceChargeMemo.Page.al @@ -1,4 +1,4 @@ -// ------------------------------------------------------------------------------------------------ +// ------------------------------------------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. // ------------------------------------------------------------------------------------------------ @@ -132,7 +132,18 @@ page 446 "Finance Charge Memo" { ApplicationArea = Basic, Suite; } +#if not CLEAN29 field("Activity Code"; Rec."Activity Code") + { + ApplicationArea = Basic, Suite; + ShowMandatory = true; + ToolTip = 'Specifies the code for the company''s primary activity.'; + ObsoleteReason = 'Replaced by the Business Activity Code field.'; + ObsoleteState = Pending; + ObsoleteTag = '29.0'; + } +#endif + field("Business Activity Code"; Rec."Business Activity Code") { ApplicationArea = Basic, Suite; ShowMandatory = true; diff --git a/src/Layers/IT/BaseApp/Sales/FinanceCharge/FinanceChargeMemoHeader.Table.al b/src/Layers/IT/BaseApp/Sales/FinanceCharge/FinanceChargeMemoHeader.Table.al index 121e639d9f7..601257b810a 100644 --- a/src/Layers/IT/BaseApp/Sales/FinanceCharge/FinanceChargeMemoHeader.Table.al +++ b/src/Layers/IT/BaseApp/Sales/FinanceCharge/FinanceChargeMemoHeader.Table.al @@ -1,4 +1,4 @@ -// ------------------------------------------------------------------------------------------------ +// ------------------------------------------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. // ------------------------------------------------------------------------------------------------ @@ -18,7 +18,6 @@ using Microsoft.Foundation.NoSeries; using Microsoft.Foundation.Reporting; using Microsoft.Sales.Customer; using Microsoft.Sales.Setup; -using Microsoft.Utilities; using System.Globalization; using System.IO; using System.Security.User; @@ -583,6 +582,11 @@ table 302 "Finance Charge Memo Header" ToolTip = 'Specifies the bank account to use for bank information when the document is printed.'; TableRelation = "Bank Account" where("Currency Code" = field("Currency Code")); } + field(395; "Business Activity Code"; Code[10]) + { + Caption = 'Business Activity Code'; + TableRelation = "Business Activity".Code; + } /// /// Specifies the unique identifier for the combination of dimension values assigned to this memo. /// @@ -612,11 +616,16 @@ table 302 "Finance Charge Memo Header" DataClassification = EndUserIdentifiableInformation; TableRelation = "User Setup"; } +#if not CLEAN29 field(12123; "Activity Code"; Code[6]) { Caption = 'Activity Code'; - TableRelation = "Activity Code".Code; + TableRelation = Microsoft.Utilities."Activity Code".Code; + ObsoleteReason = 'Replaced by the Business Activity Code field.'; + ObsoleteState = Pending; + ObsoleteTag = '29.0'; } +#endif } keys @@ -660,9 +669,9 @@ table 302 "Finance Charge Memo Header" 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"); + if NoSeries.AreRelated("No. Series", xRec."No. Series") then + "No. Series" := xRec."No. Series"; + "No." := NoSeries.GetNextNo("No. Series", "Posting Date"); end; "Posting Description" := StrSubstNo(Text000, "No."); @@ -675,8 +684,8 @@ table 302 "Finance Charge Memo Header" then "Issuing No. Series" := "No. Series" else - if NoSeries.IsAutomatic(GetIssuingNoSeriesCode()) then - "Issuing No. Series" := GetIssuingNoSeriesCode(); + if NoSeries.IsAutomatic(GetIssuingNoSeriesCode()) then + "Issuing No. Series" := GetIssuingNoSeriesCode(); if "Posting Date" = 0D then "Posting Date" := WorkDate(); diff --git a/src/Layers/IT/BaseApp/Sales/FinanceCharge/IssuedFinChargeMemoHeader.Table.al b/src/Layers/IT/BaseApp/Sales/FinanceCharge/IssuedFinChargeMemoHeader.Table.al index 6ee6c6ac7c6..c82dcedbf0b 100644 --- a/src/Layers/IT/BaseApp/Sales/FinanceCharge/IssuedFinChargeMemoHeader.Table.al +++ b/src/Layers/IT/BaseApp/Sales/FinanceCharge/IssuedFinChargeMemoHeader.Table.al @@ -1,4 +1,4 @@ -// ------------------------------------------------------------------------------------------------ +// ------------------------------------------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. // ------------------------------------------------------------------------------------------------ @@ -16,7 +16,6 @@ using Microsoft.Foundation.Navigate; using Microsoft.Foundation.NoSeries; using Microsoft.Foundation.Reporting; using Microsoft.Sales.Customer; -using Microsoft.Utilities; using System.Globalization; using System.Security.AccessControl; using System.Text; @@ -178,7 +177,7 @@ table 304 "Issued Fin. Charge Memo Header" field(17; "Customer Posting Group"; Code[20]) { Caption = 'Customer Posting Group'; - ToolTip = 'Specifies the customer''s market type to link business transactions to.'; + ToolTip = 'Specifies the customer''s market type to link business transactions to.'; TableRelation = "Customer Posting Group"; } /// @@ -458,6 +457,11 @@ table 304 "Issued Fin. Charge Memo Header" ToolTip = 'Specifies the bank account to use for bank information when the document is printed.'; TableRelation = "Bank Account" where("Currency Code" = field("Currency Code")); } + field(395; "Business Activity Code"; Code[10]) + { + Caption = 'Business Activity Code'; + TableRelation = "Business Activity".Code; + } /// /// Specifies the unique identifier for the dimension values assigned to this memo. /// @@ -472,11 +476,16 @@ table 304 "Issued Fin. Charge Memo Header" Rec.ShowDimensions(); end; } +#if not CLEAN29 field(12123; "Activity Code"; Code[6]) { Caption = 'Activity Code'; - TableRelation = "Activity Code".Code; + TableRelation = Microsoft.Utilities."Activity Code".Code; + ObsoleteReason = 'Replaced by the Business Activity Code field.'; + ObsoleteState = Pending; + ObsoleteTag = '29.0'; } +#endif } keys diff --git a/src/Layers/IT/BaseApp/Sales/FinanceCharge/IssuedFinanceChargeMemo.Page.al b/src/Layers/IT/BaseApp/Sales/FinanceCharge/IssuedFinanceChargeMemo.Page.al index 69d14898ad1..574167e2bcd 100644 --- a/src/Layers/IT/BaseApp/Sales/FinanceCharge/IssuedFinanceChargeMemo.Page.al +++ b/src/Layers/IT/BaseApp/Sales/FinanceCharge/IssuedFinanceChargeMemo.Page.al @@ -124,7 +124,17 @@ page 450 "Issued Finance Charge Memo" { ApplicationArea = Basic, Suite; } +#if not CLEAN29 field("Activity Code"; Rec."Activity Code") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the code for the company''s primary activity.'; + ObsoleteReason = 'Replaced by the Business Activity Code field.'; + ObsoleteState = Pending; + ObsoleteTag = '29.0'; + } +#endif + field("Business Activity Code"; Rec."Business Activity Code") { ApplicationArea = Basic, Suite; ToolTip = 'Specifies the code for the company''s primary activity.'; diff --git a/src/Layers/IT/BaseApp/Sales/History/PostedSalesCreditMemo.Page.al b/src/Layers/IT/BaseApp/Sales/History/PostedSalesCreditMemo.Page.al index 562384bb006..01c9c09f45a 100644 --- a/src/Layers/IT/BaseApp/Sales/History/PostedSalesCreditMemo.Page.al +++ b/src/Layers/IT/BaseApp/Sales/History/PostedSalesCreditMemo.Page.al @@ -1,4 +1,4 @@ -// ------------------------------------------------------------------------------------------------ +// ------------------------------------------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. // ------------------------------------------------------------------------------------------------ @@ -261,7 +261,17 @@ page 134 "Posted Sales Credit Memo" Editable = false; Importance = Additional; } +#if not CLEAN29 field("Activity Code"; Rec."Activity Code") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the code for the company''s primary activity.'; + ObsoleteReason = 'Replaced by the Business Activity Code field.'; + ObsoleteState = Pending; + ObsoleteTag = '29.0'; + } +#endif + field("Business Activity Code"; Rec."Business Activity Code") { ApplicationArea = Basic, Suite; ToolTip = 'Specifies the code for the company''s primary activity.'; diff --git a/src/Layers/IT/BaseApp/Sales/History/PostedSalesInvoice.Page.al b/src/Layers/IT/BaseApp/Sales/History/PostedSalesInvoice.Page.al index 949192b2f1d..83cde8e7b81 100644 --- a/src/Layers/IT/BaseApp/Sales/History/PostedSalesInvoice.Page.al +++ b/src/Layers/IT/BaseApp/Sales/History/PostedSalesInvoice.Page.al @@ -267,7 +267,18 @@ page 132 "Posted Sales Invoice" Editable = false; Importance = Additional; } +#if not CLEAN29 field("Activity Code"; Rec."Activity Code") + { + ApplicationArea = Basic, Suite; + Editable = false; + ToolTip = 'Specifies the code for the company''s primary activity.'; + ObsoleteReason = 'Replaced by the Business Activity Code field.'; + ObsoleteState = Pending; + ObsoleteTag = '29.0'; + } +#endif + field("Business Activity Code"; Rec."Business Activity Code") { ApplicationArea = Basic, Suite; Editable = false; diff --git a/src/Layers/IT/BaseApp/Sales/History/SalesCrMemoHeader.Table.al b/src/Layers/IT/BaseApp/Sales/History/SalesCrMemoHeader.Table.al index 9f7f9bfc844..be8c44965ad 100644 --- a/src/Layers/IT/BaseApp/Sales/History/SalesCrMemoHeader.Table.al +++ b/src/Layers/IT/BaseApp/Sales/History/SalesCrMemoHeader.Table.al @@ -1,4 +1,4 @@ -// ------------------------------------------------------------------------------------------------ +// ------------------------------------------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. // ------------------------------------------------------------------------------------------------ @@ -940,6 +940,12 @@ table 114 "Sales Cr.Memo Header" ToolTip = 'Specifies the telephone number of the company''s shipping address.'; ExtendedDatatype = PhoneNo; } + field(395; "Business Activity Code"; Code[10]) + { + Caption = 'Business Activity Code'; + Editable = false; + TableRelation = "Business Activity".Code; + } /// /// Specifies the unique identifier for the dimension set applied to this credit memo. /// @@ -1152,12 +1158,17 @@ table 114 "Sales Cr.Memo Header" { Caption = 'Operation Occurred date'; } +#if not CLEAN29 field(12123; "Activity Code"; Code[6]) { Caption = 'Activity Code'; Editable = false; TableRelation = "Activity Code".Code; + ObsoleteReason = 'Replaced by the Business Activity Code field.'; + ObsoleteState = Pending; + ObsoleteTag = '29.0'; } +#endif field(12125; "Service Tariff No."; Code[10]) { Caption = 'Service Tariff No.'; diff --git a/src/Layers/IT/BaseApp/Sales/History/SalesInvoiceHeader.Table.al b/src/Layers/IT/BaseApp/Sales/History/SalesInvoiceHeader.Table.al index 3eeaad91e49..a574c50f23a 100644 --- a/src/Layers/IT/BaseApp/Sales/History/SalesInvoiceHeader.Table.al +++ b/src/Layers/IT/BaseApp/Sales/History/SalesInvoiceHeader.Table.al @@ -1,4 +1,4 @@ -// ------------------------------------------------------------------------------------------------ +// ------------------------------------------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. // ------------------------------------------------------------------------------------------------ @@ -1016,6 +1016,12 @@ table 112 "Sales Invoice Header" ToolTip = 'Specifies the telephone number of the company''s shipping address.'; ExtendedDatatype = PhoneNo; } + field(395; "Business Activity Code"; Code[10]) + { + Caption = 'Business Activity Code'; + Editable = false; + TableRelation = "Business Activity".Code; + } /// /// Specifies the unique identifier for the dimension set applied to this document. /// @@ -1293,12 +1299,17 @@ table 112 "Sales Invoice Header" { Caption = 'Operation Occurred Date'; } +#if not CLEAN29 field(12123; "Activity Code"; Code[6]) { Caption = 'Activity Code'; Editable = false; TableRelation = "Activity Code".Code; + ObsoleteReason = 'Replaced by the Business Activity Code field.'; + ObsoleteState = Pending; + ObsoleteTag = '29.0'; } +#endif field(12125; "Service Tariff No."; Code[10]) { Caption = 'Service Tariff No.'; diff --git a/src/Layers/IT/BaseApp/Sales/Posting/SalesPost.Codeunit.al b/src/Layers/IT/BaseApp/Sales/Posting/SalesPost.Codeunit.al index b3413fd550e..a2bd699a066 100644 --- a/src/Layers/IT/BaseApp/Sales/Posting/SalesPost.Codeunit.al +++ b/src/Layers/IT/BaseApp/Sales/Posting/SalesPost.Codeunit.al @@ -543,7 +543,11 @@ codeunit 80 "Sales-Post" OnRunOnBeforePostICGenJnl(SalesHeader, SalesInvHeader, SalesCrMemoHeader, GenJnlPostLine, SrcCode, GenJnlLineDocType, GenJnlLineDocNo, ReturnRcptHeader, PreviewMode); if ICGenJnlLineNo > 0 then - PostICGenJnl(SalesHeader."Activity Code"); + PostICGenJnl( +#if not CLEAN29 + SalesHeader."Activity Code", +#endif + SalesHeader."Business Activity Code"); SkipInventoryAdjustment := false; OnRunOnBeforeMakeInventoryAdjustment(SalesHeader, SalesInvHeader, GenJnlPostLine, ItemJnlPostLine, PreviewMode, SkipInventoryAdjustment); @@ -5961,7 +5965,11 @@ codeunit 80 "Sales-Post" end; end; - local procedure PostICGenJnl(ActivityCode: Code[6]) + local procedure PostICGenJnl( +#if not CLEAN29 + ActivityCode: Code[6]; +#endif + BusinessActivityCode: Code[10]) var ICInOutBoxMgt: Codeunit ICInboxOutboxMgt; ICOutboxExport: Codeunit "IC Outbox Export"; @@ -5974,7 +5982,10 @@ codeunit 80 "Sales-Post" ICTransactionNo := ICInOutBoxMgt.CreateOutboxJnlTransaction(TempICGenJnlLine, false); ICInOutBoxMgt.CreateOutboxJnlLine(ICTransactionNo, 1, TempICGenJnlLine); ICOutboxExport.ProcessAutoSendOutboxTransactionNo(ICTransactionNo); +#if not CLEAN29 TempICGenJnlLine."Activity Code" := ActivityCode; +#endif + TempICGenJnlLine."Business Activity Code" := BusinessActivityCode; if TempICGenJnlLine.Amount <> 0 then GenJnlPostLine.RunWithCheck(TempICGenJnlLine); until TempICGenJnlLine.Next() = 0; diff --git a/src/Layers/IT/BaseApp/Sales/Posting/SalesPostInvoice.Codeunit.al b/src/Layers/IT/BaseApp/Sales/Posting/SalesPostInvoice.Codeunit.al index 0eb49012bab..8cd430ec56f 100644 --- a/src/Layers/IT/BaseApp/Sales/Posting/SalesPostInvoice.Codeunit.al +++ b/src/Layers/IT/BaseApp/Sales/Posting/SalesPostInvoice.Codeunit.al @@ -518,8 +518,12 @@ codeunit 815 "Sales Post Invoice" implements "Invoice Posting" InvoicePostingParameters."External Document No.", InvoicePostingParameters."Source Code", ''); GenJnlLine.CopyFromSalesHeader(SalesHeader); +#if not CLEAN29 if GLSetup."Use Activity Code" then GenJnlLine."Activity Code" := SalesHeader."Activity Code"; +#endif + if GLSetup."Use Business Activity Code" then + GenJnlLine."Business Activity Code" := SalesHeader."Business Activity Code"; GenJnlLine."Fiscal Code" := SalesHeader."Fiscal Code"; GenJnlLine."Individual Person" := SalesHeader."Individual Person"; GenJnlLine.Resident := SalesHeader.Resident; diff --git a/src/Layers/IT/BaseApp/Sales/Posting/SalesPostPrepayments.Codeunit.al b/src/Layers/IT/BaseApp/Sales/Posting/SalesPostPrepayments.Codeunit.al index d8146950e75..7fdc5173038 100644 --- a/src/Layers/IT/BaseApp/Sales/Posting/SalesPostPrepayments.Codeunit.al +++ b/src/Layers/IT/BaseApp/Sales/Posting/SalesPostPrepayments.Codeunit.al @@ -470,8 +470,12 @@ codeunit 442 "Sales-Post Prepayments" GLSetup.GetRecordOnce(); if GLSetup."Journal Templ. Name Mandatory" then SalesHeader.TestField("Journal Templ. Name"); +#if not CLEAN29 if GLSetup."Use Activity Code" then SalesHeader.TestField("Activity Code"); +#endif + if GLSetup."Use Business Activity Code" then + SalesHeader.TestField("Business Activity Code"); if SalesHeader."Operation Occurred Date" < GLSetup."Last Gen. Jour. Printing Date" then SalesHeader.FieldError("Operation Occurred Date", Text1130007); if SalesHeader."Applies-to Doc. No." <> '' then diff --git a/src/Layers/IT/BaseApp/Service/Local/Archive/ServiceHeaderArchiveIT.TableExt.al b/src/Layers/IT/BaseApp/Service/Local/Archive/ServiceHeaderArchiveIT.TableExt.al index ac84b7011d6..f59fe24d289 100644 --- a/src/Layers/IT/BaseApp/Service/Local/Archive/ServiceHeaderArchiveIT.TableExt.al +++ b/src/Layers/IT/BaseApp/Service/Local/Archive/ServiceHeaderArchiveIT.TableExt.al @@ -27,12 +27,17 @@ tableextension 12140 "Service Header Archive IT" extends "Service Header Archive Caption = 'Operation Occurred Date'; DataClassification = CustomerContent; } +#if not CLEAN29 field(12123; "Activity Code"; Code[6]) { Caption = 'Activity Code'; DataClassification = CustomerContent; TableRelation = "Activity Code".Code; + ObsoleteReason = 'Replaced by the Business Activity Code field.'; + ObsoleteState = Pending; + ObsoleteTag = '29.0'; } +#endif field(12125; "Service Tariff No."; Code[10]) { Caption = 'Service Tariff No.'; diff --git a/src/Layers/IT/BaseApp/Service/Local/Archive/ServiceOrderArchiveIT.PageExt.al b/src/Layers/IT/BaseApp/Service/Local/Archive/ServiceOrderArchiveIT.PageExt.al index 9a17d0b1982..dcaff7d0d92 100644 --- a/src/Layers/IT/BaseApp/Service/Local/Archive/ServiceOrderArchiveIT.PageExt.al +++ b/src/Layers/IT/BaseApp/Service/Local/Archive/ServiceOrderArchiveIT.PageExt.al @@ -21,11 +21,16 @@ pageextension 12140 "Service Order Archive IT" extends "Service Order Archive" ApplicationArea = Service; ToolTip = 'Specifies the operation type that is assigned to the posted service shipment.'; } +#if not CLEAN29 field("Activity Code"; Rec."Activity Code") { ApplicationArea = Service; ToolTip = 'Specifies the code for the company''s primary activity.'; + ObsoleteReason = 'Replaced by the Business Activity Code field.'; + ObsoleteState = Pending; + ObsoleteTag = '29.0'; } +#endif } addlast(" Foreign Trade") { @@ -155,4 +160,4 @@ pageextension 12140 "Service Order Archive IT" extends "Service Order Archive" } } } -} \ No newline at end of file +} diff --git a/src/Layers/IT/BaseApp/Service/Local/Contract/FiledServContractHeaderIT.TableExt.al b/src/Layers/IT/BaseApp/Service/Local/Contract/FiledServContractHeaderIT.TableExt.al index 736825fb867..730f57cda76 100644 --- a/src/Layers/IT/BaseApp/Service/Local/Contract/FiledServContractHeaderIT.TableExt.al +++ b/src/Layers/IT/BaseApp/Service/Local/Contract/FiledServContractHeaderIT.TableExt.al @@ -10,11 +10,16 @@ tableextension 12150 "Filed Serv. Contract Header IT" extends "Filed Service Con { fields { +#if not CLEAN29 field(12123; "Activity Code"; Code[6]) { Caption = 'Activity Code'; DataClassification = CustomerContent; TableRelation = "Activity Code".Code; + ObsoleteReason = 'Replaced by the Business Activity Code field.'; + ObsoleteState = Pending; + ObsoleteTag = '29.0'; } +#endif } } \ No newline at end of file diff --git a/src/Layers/IT/BaseApp/Service/Local/Contract/FiledServiceContractIT.PageExt.al b/src/Layers/IT/BaseApp/Service/Local/Contract/FiledServiceContractIT.PageExt.al index a270859d642..ed6591617c6 100644 --- a/src/Layers/IT/BaseApp/Service/Local/Contract/FiledServiceContractIT.PageExt.al +++ b/src/Layers/IT/BaseApp/Service/Local/Contract/FiledServiceContractIT.PageExt.al @@ -10,11 +10,16 @@ pageextension 12150 "Filed Service Contract IT" extends "Filed Service Contract" { addafter("Change Status") { +#if not CLEAN29 field("Activity Code"; Rec."Activity Code") { ApplicationArea = Service; ToolTip = 'Specifies the code for the company''s primary activity.'; + ObsoleteReason = 'Replaced by the Business Activity Code field.'; + ObsoleteState = Pending; + ObsoleteTag = '29.0'; } +#endif } } -} \ No newline at end of file +} diff --git a/src/Layers/IT/BaseApp/Service/Local/Contract/ServiceContractHeaderIT.TableExt.al b/src/Layers/IT/BaseApp/Service/Local/Contract/ServiceContractHeaderIT.TableExt.al index b9d92877514..db261566c03 100644 --- a/src/Layers/IT/BaseApp/Service/Local/Contract/ServiceContractHeaderIT.TableExt.al +++ b/src/Layers/IT/BaseApp/Service/Local/Contract/ServiceContractHeaderIT.TableExt.al @@ -10,11 +10,16 @@ tableextension 12151 "Service Contract Header IT" extends "Service Contract Head { fields { +#if not CLEAN29 field(12123; "Activity Code"; Code[6]) { Caption = 'Activity Code'; DataClassification = CustomerContent; TableRelation = "Activity Code".Code; + ObsoleteReason = 'Replaced by the Business Activity Code field.'; + ObsoleteState = Pending; + ObsoleteTag = '29.0'; } +#endif } } \ No newline at end of file diff --git a/src/Layers/IT/BaseApp/Service/Local/Contract/ServiceContractIT.PageExt.al b/src/Layers/IT/BaseApp/Service/Local/Contract/ServiceContractIT.PageExt.al index 906be1c829c..5ced634712b 100644 --- a/src/Layers/IT/BaseApp/Service/Local/Contract/ServiceContractIT.PageExt.al +++ b/src/Layers/IT/BaseApp/Service/Local/Contract/ServiceContractIT.PageExt.al @@ -10,11 +10,16 @@ pageextension 12143 "Service Contract IT" extends "Service Contract" { addafter("Change Status") { +#if not CLEAN29 field("Activity Code"; Rec."Activity Code") { ApplicationArea = Service; ToolTip = 'Specifies the code for the company''s primary activity.'; + ObsoleteReason = 'Replaced by the Business Activity Code field.'; + ObsoleteState = Pending; + ObsoleteTag = '29.0'; } +#endif } } -} \ No newline at end of file +} diff --git a/src/Layers/IT/BaseApp/Service/Local/Document/ServDocumentMgtIT.Codeunit.al b/src/Layers/IT/BaseApp/Service/Local/Document/ServDocumentMgtIT.Codeunit.al index 21c3db39c98..b9afd3d5019 100644 --- a/src/Layers/IT/BaseApp/Service/Local/Document/ServDocumentMgtIT.Codeunit.al +++ b/src/Layers/IT/BaseApp/Service/Local/Document/ServDocumentMgtIT.Codeunit.al @@ -385,6 +385,7 @@ codeunit 12140 "Serv. Document Mgt. IT" end; +#if not CLEAN29 [EventSubscriber(ObjectType::Codeunit, Codeunit::"ServContractManagement", 'OnBeforeServHeaderModify', '', false, false)] local procedure ServiceContract_OnBeforeServHeaderModify(var ServiceHeader: Record "Service Header"; ServiceContractHeader: Record "Service Contract Header") var @@ -394,6 +395,7 @@ codeunit 12140 "Serv. Document Mgt. IT" if GeneralLedgerSetup."Use Activity Code" then ServiceHeader."Activity Code" := ServiceContractHeader."Activity Code"; end; +#endif // History diff --git a/src/Layers/IT/BaseApp/Service/Local/Document/ServiceCreditMemoIT.PageExt.al b/src/Layers/IT/BaseApp/Service/Local/Document/ServiceCreditMemoIT.PageExt.al index ac43f34dd42..755f4b64ec8 100644 --- a/src/Layers/IT/BaseApp/Service/Local/Document/ServiceCreditMemoIT.PageExt.al +++ b/src/Layers/IT/BaseApp/Service/Local/Document/ServiceCreditMemoIT.PageExt.al @@ -27,11 +27,16 @@ pageextension 12444 "Service Credit Memo IT" extends "Service Credit Memo" ApplicationArea = Service; ToolTip = 'Specifies the operation type that is assigned to the posted service shipment.'; } +#if not CLEAN29 field("Activity Code"; Rec."Activity Code") { ApplicationArea = Service; ToolTip = 'Specifies the code for the company''s primary activity.'; + ObsoleteReason = 'Replaced by the Business Activity Code field.'; + ObsoleteState = Pending; + ObsoleteTag = '29.0'; } +#endif } addafter("Prices Including VAT") { diff --git a/src/Layers/IT/BaseApp/Service/Local/Document/ServiceHeaderIT.TableExt.al b/src/Layers/IT/BaseApp/Service/Local/Document/ServiceHeaderIT.TableExt.al index a42083c6cc4..de3fc2c9b44 100644 --- a/src/Layers/IT/BaseApp/Service/Local/Document/ServiceHeaderIT.TableExt.al +++ b/src/Layers/IT/BaseApp/Service/Local/Document/ServiceHeaderIT.TableExt.al @@ -59,12 +59,17 @@ tableextension 12152 "Service Header IT" extends "Service Header" UpdateServLinesByFieldNo(FieldNo("Customer No."), false); end; } +#if not CLEAN29 field(12123; "Activity Code"; Code[6]) { Caption = 'Activity Code'; DataClassification = CustomerContent; TableRelation = "Activity Code".Code; + ObsoleteReason = 'Replaced by the Business Activity Code field.'; + ObsoleteState = Pending; + ObsoleteTag = '29.0'; } +#endif field(12125; "Service Tariff No."; Code[10]) { Caption = 'Service Tariff No.'; diff --git a/src/Layers/IT/BaseApp/Service/Local/Document/ServiceInvoiceIT.PageExt.al b/src/Layers/IT/BaseApp/Service/Local/Document/ServiceInvoiceIT.PageExt.al index bfdf44318e3..3d90dab4ad8 100644 --- a/src/Layers/IT/BaseApp/Service/Local/Document/ServiceInvoiceIT.PageExt.al +++ b/src/Layers/IT/BaseApp/Service/Local/Document/ServiceInvoiceIT.PageExt.al @@ -22,11 +22,16 @@ pageextension 12446 "Service Invoice IT" extends "Service Invoice" ApplicationArea = Service; ToolTip = 'Specifies the operation type that is assigned to the posted service shipment.'; } +#if not CLEAN29 field("Activity Code"; Rec."Activity Code") { ApplicationArea = Service; ToolTip = 'Specifies the code for the company''s primary activity.'; + ObsoleteReason = 'Replaced by the Business Activity Code field.'; + ObsoleteState = Pending; + ObsoleteTag = '29.0'; } +#endif } modify("Due Date") { diff --git a/src/Layers/IT/BaseApp/Service/Local/Document/ServiceOrderIT.PageExt.al b/src/Layers/IT/BaseApp/Service/Local/Document/ServiceOrderIT.PageExt.al index fba0ac2d891..38e534bb2b7 100644 --- a/src/Layers/IT/BaseApp/Service/Local/Document/ServiceOrderIT.PageExt.al +++ b/src/Layers/IT/BaseApp/Service/Local/Document/ServiceOrderIT.PageExt.al @@ -27,11 +27,16 @@ pageextension 12451 "Service Order IT" extends "Service Order" ApplicationArea = Service; ToolTip = 'Specifies the operation type that is assigned to the posted service shipment.'; } +#if not CLEAN29 field("Activity Code"; Rec."Activity Code") { ApplicationArea = Service; ToolTip = 'Specifies the code for the company''s primary activity.'; + ObsoleteReason = 'Replaced by the Business Activity Code field.'; + ObsoleteState = Pending; + ObsoleteTag = '29.0'; } +#endif } addafter("VAT Bus. Posting Group") { diff --git a/src/Layers/IT/BaseApp/Service/Local/History/ServiceCrMemoHeaderIT.TableExt.al b/src/Layers/IT/BaseApp/Service/Local/History/ServiceCrMemoHeaderIT.TableExt.al index 056ac2fdc3b..551f7062bda 100644 --- a/src/Layers/IT/BaseApp/Service/Local/History/ServiceCrMemoHeaderIT.TableExt.al +++ b/src/Layers/IT/BaseApp/Service/Local/History/ServiceCrMemoHeaderIT.TableExt.al @@ -24,12 +24,18 @@ tableextension 12454 "Service Cr.Memo Header IT" extends "Service Cr.Memo Header Caption = 'Operation Occurred Date'; DataClassification = CustomerContent; } +#if not CLEAN29 field(12123; "Activity Code"; Code[6]) { Caption = 'Activity Code'; DataClassification = CustomerContent; + Editable = false; TableRelation = "Activity Code".Code; + ObsoleteReason = 'Replaced by the Business Activity Code field.'; + ObsoleteState = Pending; + ObsoleteTag = '29.0'; } +#endif field(12125; "Service Tariff No."; Code[10]) { Caption = 'Service Tariff No.'; diff --git a/src/Layers/IT/BaseApp/Service/Local/History/ServiceInvoiceHeaderIT.tableExt.al b/src/Layers/IT/BaseApp/Service/Local/History/ServiceInvoiceHeaderIT.tableExt.al index 05ec0d36af9..e128ff911c5 100644 --- a/src/Layers/IT/BaseApp/Service/Local/History/ServiceInvoiceHeaderIT.tableExt.al +++ b/src/Layers/IT/BaseApp/Service/Local/History/ServiceInvoiceHeaderIT.tableExt.al @@ -24,12 +24,18 @@ tableextension 12456 "Service Invoice Header IT" extends "Service Invoice Header Caption = 'Operation Occurred Date'; DataClassification = CustomerContent; } +#if not CLEAN29 field(12123; "Activity Code"; Code[6]) { Caption = 'Activity Code'; DataClassification = CustomerContent; + Editable = false; TableRelation = "Activity Code".Code; + ObsoleteReason = 'Replaced by the Business Activity Code field.'; + ObsoleteState = Pending; + ObsoleteTag = '29.0'; } +#endif field(12125; "Service Tariff No."; Code[10]) { Caption = 'Service Tariff No.'; diff --git a/src/Layers/IT/BaseApp/Service/Posting/ServicePost.Codeunit.al b/src/Layers/IT/BaseApp/Service/Posting/ServicePost.Codeunit.al index 876bf1ee997..3caae806126 100644 --- a/src/Layers/IT/BaseApp/Service/Posting/ServicePost.Codeunit.al +++ b/src/Layers/IT/BaseApp/Service/Posting/ServicePost.Codeunit.al @@ -1,4 +1,4 @@ -// ------------------------------------------------------------------------------------------------ +// ------------------------------------------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. // ------------------------------------------------------------------------------------------------ @@ -481,8 +481,12 @@ codeunit 5980 "Service-Post" if (PassedServiceHeader."Document Type" = PassedServiceHeader."Document Type"::Invoice) or (PassedServiceHeader."Document Type" = PassedServiceHeader."Document Type"::"Credit Memo") or Invoice then ValidateIncludeInVATReport(PassedServiceHeader); GLSetup.GetRecordOnce(); +#if not CLEAN29 if GLSetup."Use Activity Code" then PassedServiceHeader.TestField("Activity Code", ErrorInfo.Create()); +#endif + if GLSetup."Use Business Activity Code" then + PassedServiceHeader.TestField("Business Activity Code", ErrorInfo.Create()); if PassedServiceHeader."Applies-to Doc. No." <> '' then if PassedServiceHeader."Applies-to Occurrence No." = 0 then diff --git a/src/Layers/IT/BaseApp/Service/Posting/ServicePostInvoice.Codeunit.al b/src/Layers/IT/BaseApp/Service/Posting/ServicePostInvoice.Codeunit.al index 7b8c0bc2062..95e49af6bfa 100644 --- a/src/Layers/IT/BaseApp/Service/Posting/ServicePostInvoice.Codeunit.al +++ b/src/Layers/IT/BaseApp/Service/Posting/ServicePostInvoice.Codeunit.al @@ -341,7 +341,10 @@ codeunit 817 "Service Post Invoice" implements "Invoice Posting" InvoicePostingBuffer."Dimension Set ID", ServiceHeader."Reason Code"); GenJnlLine.Validate(GenJnlLine."Document Date", ServiceHeader."Document Date"); GenJnlLine."Operation Occurred Date" := ServiceHeader."Operation Occurred Date"; +#if not CLEAN29 GenJnlLine."Activity Code" := ServiceHeader."Activity Code"; +#endif + GenJnlLine."Business Activity Code" := ServiceHeader."Business Activity Code"; GenJnlLine.CopyDocumentFields( InvoicePostingParameters."Document Type", InvoicePostingParameters."Document No.", diff --git a/src/Layers/IT/BaseApp/Utilities/DataClassEvalDataCountry.Codeunit.al b/src/Layers/IT/BaseApp/Utilities/DataClassEvalDataCountry.Codeunit.al index 766d11a18d0..1d4c9b47ed2 100644 --- a/src/Layers/IT/BaseApp/Utilities/DataClassEvalDataCountry.Codeunit.al +++ b/src/Layers/IT/BaseApp/Utilities/DataClassEvalDataCountry.Codeunit.al @@ -17,6 +17,7 @@ using Microsoft.Finance.VAT.Setup; using Microsoft.Finance.VAT.TransactionNature; using Microsoft.Finance.WithholdingTax; using Microsoft.FixedAssets.Depreciation; +using Microsoft.Foundation.AuditCodes; using Microsoft.Foundation.Company; using Microsoft.Foundation.PaymentTerms; using Microsoft.HumanResources.Absence; @@ -72,7 +73,10 @@ codeunit 1752 "Data Class. Eval. Data Country" DataClassificationEvalData.SetTableFieldsToNormal(DATABASE::"Customs Office"); DataClassificationEvalData.SetTableFieldsToNormal(DATABASE::"Customs Authority Vendor"); DataClassificationEvalData.SetTableFieldsToNormal(DATABASE::"Check Fiscal Code Setup"); +#if not CLEAN29 DataClassificationEvalData.SetTableFieldsToNormal(DATABASE::"Activity Code"); +#endif + DataClassificationEvalData.SetTableFieldsToNormal(DATABASE::"Business Activity"); DataClassificationEvalData.SetTableFieldsToNormal(DATABASE::"Appointment Code"); DataClassificationEvalData.SetTableFieldsToNormal(DATABASE::"Spesometro Appointment"); DataClassificationEvalData.SetTableFieldsToNormal(DATABASE::"Lifo Category"); diff --git a/src/Layers/IT/Tests/Local/ITActivityCode.Codeunit.al b/src/Layers/IT/Tests/Local/ITActivityCode.Codeunit.al index 90b80bdb340..bbec7429eea 100644 --- a/src/Layers/IT/Tests/Local/ITActivityCode.Codeunit.al +++ b/src/Layers/IT/Tests/Local/ITActivityCode.Codeunit.al @@ -1,11 +1,11 @@ -codeunit 144003 "IT - Activity Code" +codeunit 144003 "IT - Business Activity Code" { Subtype = Test; TestPermissions = Disabled; trigger OnRun() begin - // [FEATURE] [Activity Code] + // [FEATURE] [Business Activity Code] end; var @@ -25,16 +25,58 @@ codeunit 144003 "IT - Activity Code" [Test] [Scope('OnPrem')] - procedure MaximumLengthOfFieldActivityCodeOnActivityCodeTable() + procedure MaximumLengthOfBusinessActivityCodeField() + var + BusinessActivityCode: Record "Business Activity Code"; + begin + // [SCENARIO 338450] Business Activity Code table stores codes of length 10 + Initialize(); + + // [THEN] Verify the length of the Code field on Business Activity Code table. + Assert.AreEqual( + 10, LibraryUtility.GetFieldLength(Database::"Business Activity Code", 1), StrSubstNo(IncorrectFieldLengthErr, BusinessActivityCode.FieldCaption(Code), 10)); + end; + +#if not CLEAN29 + [Test] + [Scope('OnPrem')] + procedure LegacyActivityCodeFieldKeepsMaximumLength() var ActivityCode: Record "Activity Code"; begin - // [SCENARIO 338450] Activity Code's table has Activity Code field of length 6 Initialize(); - // [THEN] Verify the length of field 'Activity Code' on Activity Code table. Assert.AreEqual( - 6, LibraryUtility.GetFieldLength(12124, 1), StrSubstNo(IncorrectFieldLengthErr, ActivityCode.FieldCaption(Code), 6)); + 6, LibraryUtility.GetFieldLength(Database::"Activity Code", 1), StrSubstNo(IncorrectFieldLengthErr, ActivityCode.FieldCaption(Code), 6)); + end; +#endif + + [Test] + [Scope('OnPrem')] + procedure BusinessActivityCodeLongerThanSixCharactersIsNotValidInItaly() + var + BusinessActivityCode: Record "Business Activity Code"; + begin + Initialize(); + + asserterror BusinessActivityCode.Validate(Code, '1234567'); + + Assert.ExpectedError('cannot be longer than 6 characters in Italy'); + end; + + [Test] + [Scope('OnPrem')] + procedure BusinessActivityCodeCanHaveTenCharactersOutsideItaly() + var + BusinessActivityCode: Record "Business Activity Code"; + CompanyInformation: Record "Company Information"; + begin + Initialize(); + CompanyInformation.Get(); + CompanyInformation."Country/Region Code" := 'DE'; + CompanyInformation.Modify(); + + BusinessActivityCode.Validate(Code, '1234567890'); end; [Test] @@ -56,7 +98,7 @@ codeunit 144003 "IT - Activity Code" // [THEN] Activity code error appears Assert.ExpectedError( StrSubstNo( - MissingActivityCodeOnJournalErr, GenJournalLine.FieldCaption("Activity Code"), GenJournalLine.TableCaption(), GenJournalLine.FieldCaption("Journal Template Name"), + MissingActivityCodeOnJournalErr, GenJournalLine.FieldCaption("Business Activity Code"), GenJournalLine.TableCaption(), GenJournalLine.FieldCaption("Journal Template Name"), GenJournalLine."Journal Template Name", GenJournalLine.FieldCaption("Journal Batch Name"), GenJournalLine."Journal Batch Name", GenJournalLine.FieldCaption("Line No."), GenJournalLine."Line No.")); end; @@ -83,7 +125,7 @@ codeunit 144003 "IT - Activity Code" // [THEN] Activity code error appears Assert.ExpectedError( StrSubstNo( - MissingActivityCodeErr, PurchaseHeader.FieldCaption("Activity Code"), PurchaseHeader.TableCaption(), PurchaseHeader.FieldCaption("Document Type"), PurchaseHeader."Document Type", + MissingActivityCodeErr, PurchaseHeader.FieldCaption("Business Activity Code"), PurchaseHeader.TableCaption(), PurchaseHeader.FieldCaption("Document Type"), PurchaseHeader."Document Type", PurchaseHeader.FieldCaption("No."), PurchaseHeader."No.")); end; @@ -102,7 +144,7 @@ codeunit 144003 "IT - Activity Code" SalesHeader.Validate(Ship, true); SalesHeader.Validate(Receive, true); SalesHeader.Validate(Invoice, true); - SalesHeader.Validate("Activity Code", ''); + SalesHeader.Validate("Business Activity Code", ''); SalesHeader.Modify(true); // [WHEN] Try post the document @@ -111,7 +153,7 @@ codeunit 144003 "IT - Activity Code" // [THEN] Activity code error appears Assert.ExpectedError( StrSubstNo( - MissingActivityCodeErr, SalesHeader.FieldCaption("Activity Code"), SalesHeader.TableCaption(), SalesHeader.FieldCaption("Document Type"), SalesHeader."Document Type", + MissingActivityCodeErr, SalesHeader.FieldCaption("Business Activity Code"), SalesHeader.TableCaption(), SalesHeader.FieldCaption("Document Type"), SalesHeader."Document Type", SalesHeader.FieldCaption("No."), SalesHeader."No.")); end; @@ -134,7 +176,7 @@ codeunit 144003 "IT - Activity Code" // [THEN] Activity code error appears Assert.ExpectedError( StrSubstNo( - MissingActivityCodeErr, ServiceHeader.FieldCaption("Activity Code"), ServiceHeader.TableCaption(), ServiceHeader.FieldCaption("Document Type"), ServiceHeader."Document Type", + MissingActivityCodeErr, ServiceHeader.FieldCaption("Business Activity Code"), ServiceHeader.TableCaption(), ServiceHeader.FieldCaption("Document Type"), ServiceHeader."Document Type", ServiceHeader.FieldCaption("No."), ServiceHeader."No.")); end; @@ -150,14 +192,14 @@ codeunit 144003 "IT - Activity Code" // [GIVEN] General journal line was created with an activity code CreateGenJournalLine(GenJournalLine); - GenJournalLine.Validate("Activity Code", CreateActivityCode()); + GenJournalLine.Validate("Business Activity Code", CreateBusinessActivityCode()); GenJournalLine.Modify(); // [WHEN] Post Gen. Journal line LibraryERM.PostGeneralJnlLine(GenJournalLine); // [THEN] Document is posted and VAT Entry has activity code - VerifyActivityCodeOnVATEntry(GenJournalLine."Document No.", GenJournalLine."Activity Code"); + VerifyActivityCodeOnVATEntry(GenJournalLine."Document No.", GenJournalLine."Business Activity Code"); end; [Test] @@ -172,14 +214,14 @@ codeunit 144003 "IT - Activity Code" // [GIVEN] Recurring Gen. Journal line was created with an activity code CreateRecurringGenJournalLine(GenJournalLine); - GenJournalLine.Validate("Activity Code", CreateActivityCode()); + GenJournalLine.Validate("Business Activity Code", CreateBusinessActivityCode()); GenJournalLine.Modify(); // [WHEN] Post Gen. Journal line LibraryERM.PostGeneralJnlLine(GenJournalLine); // [THEN] Line is posted and VAT Entry has activity code - VerifyActivityCodeOnVATEntry(GenJournalLine."Document No.", GenJournalLine."Activity Code"); + VerifyActivityCodeOnVATEntry(GenJournalLine."Document No.", GenJournalLine."Business Activity Code"); end; [Test] @@ -195,15 +237,15 @@ codeunit 144003 "IT - Activity Code" // [GIVEN] Purchase header was created with an activity code CreatePurchaseDocument(PurchaseHeader); - PurchaseHeader.Validate("Activity Code", CreateActivityCode()); + PurchaseHeader.Validate("Business Activity Code", CreateBusinessActivityCode()); PurchaseHeader.Modify(); // [GIVEN] Purchase header was posted PostedDocumentNo := LibraryPurchase.PostPurchaseDocument(PurchaseHeader, true, true); // [THEN] Document is posted and VAT Entry has activity code - VerifyActivityCodeOnVATEntry(PostedDocumentNo, PurchaseHeader."Activity Code"); - VerifyActivityCodeOnPostedPurchaseInvoice(PostedDocumentNo, PurchaseHeader."Activity Code"); + VerifyActivityCodeOnVATEntry(PostedDocumentNo, PurchaseHeader."Business Activity Code"); + VerifyActivityCodeOnPostedPurchaseInvoice(PostedDocumentNo, PurchaseHeader."Business Activity Code"); end; [Test] @@ -219,15 +261,15 @@ codeunit 144003 "IT - Activity Code" // [GIVEN] Sales header was created with an activity code CreateSalesDocument(SalesHeader); - SalesHeader.Validate("Activity Code", CreateActivityCode()); + SalesHeader.Validate("Business Activity Code", CreateBusinessActivityCode()); SalesHeader.Modify(); // [WHEN] Pos sales header PostedDocumentNo := LibrarySales.PostSalesDocument(SalesHeader, true, true); // [THEN] Document is posted and VAT Entry has activity code - VerifyActivityCodeOnVATEntry(PostedDocumentNo, SalesHeader."Activity Code"); - VerifyActivityCodeOnPostedSalesInvoice(PostedDocumentNo, SalesHeader."Activity Code"); + VerifyActivityCodeOnVATEntry(PostedDocumentNo, SalesHeader."Business Activity Code"); + VerifyActivityCodeOnPostedSalesInvoice(PostedDocumentNo, SalesHeader."Business Activity Code"); end; [Test] @@ -243,7 +285,7 @@ codeunit 144003 "IT - Activity Code" // [GIVEN] Service header was created with an activity code CreateServiceDocument(ServiceHeader); - ServiceHeader.Validate("Activity Code", CreateActivityCode()); + ServiceHeader.Validate("Business Activity Code", CreateBusinessActivityCode()); ServiceHeader.Modify(); // [WHEN] Post service header @@ -252,7 +294,7 @@ codeunit 144003 "IT - Activity Code" CustLedgerEntry.FindFirst(); // [THEN] Document is posted and VAT Entry has activity code - VerifyActivityCodeOnVATEntry(CustLedgerEntry."Document No.", ServiceHeader."Activity Code"); + VerifyActivityCodeOnVATEntry(CustLedgerEntry."Document No.", ServiceHeader."Business Activity Code"); end; [Test] @@ -262,23 +304,23 @@ codeunit 144003 "IT - Activity Code" GenJournalLine: Record "Gen. Journal Line"; begin // [FEATURE] [General Journal] [Post] - // [SCENARIO 405435] VAT Entry has activity code even when "Use Activity Code" option is disabled + // [SCENARIO 405435] VAT Entry has a business activity code even when "Use Business Activity Code" is disabled Initialize(); - // [GIVEN] "Use Activity Code" is disabled in General Ledger Setup + // [GIVEN] "Use Business Activity Code" is disabled in General Ledger Setup SetUseActivityCodeOnGLSetup(false); // [GIVEN] General journal line was created with an activity code CreateGenJournalLine(GenJournalLine); - GenJournalLine.Validate("Activity Code", CreateActivityCode()); + GenJournalLine.Validate("Business Activity Code", CreateBusinessActivityCode()); GenJournalLine.Modify(); // [WHEN] Post Gen. Journal line LibraryERM.PostGeneralJnlLine(GenJournalLine); // [THEN] Document is posted and VAT Entry has activity code - VerifyActivityCodeOnVATEntry(GenJournalLine."Document No.", GenJournalLine."Activity Code"); + VerifyActivityCodeOnVATEntry(GenJournalLine."Document No.", GenJournalLine."Business Activity Code"); end; [Test] @@ -295,13 +337,13 @@ codeunit 144003 "IT - Activity Code" SetUseActivityCodeOnGLSetup(false); CreatePurchaseDocument(PurchaseHeader); - PurchaseHeader.Validate("Activity Code", CreateActivityCode()); + PurchaseHeader.Validate("Business Activity Code", CreateBusinessActivityCode()); PurchaseHeader.Modify(true); PostedDocumentNo := LibraryPurchase.PostPurchaseDocument(PurchaseHeader, true, true); - VerifyActivityCodeOnPostedPurchaseInvoice(PostedDocumentNo, PurchaseHeader."Activity Code"); - VerifyActivityCodeOnVATEntry(PostedDocumentNo, PurchaseHeader."Activity Code"); + VerifyActivityCodeOnPostedPurchaseInvoice(PostedDocumentNo, PurchaseHeader."Business Activity Code"); + VerifyActivityCodeOnVATEntry(PostedDocumentNo, PurchaseHeader."Business Activity Code"); end; [Test] @@ -318,13 +360,13 @@ codeunit 144003 "IT - Activity Code" SetUseActivityCodeOnGLSetup(false); CreateSalesDocument(SalesHeader); - SalesHeader.Validate("Activity Code", CreateActivityCode()); + SalesHeader.Validate("Business Activity Code", CreateBusinessActivityCode()); SalesHeader.Modify(); PostedDocumentNo := LibrarySales.PostSalesDocument(SalesHeader, true, true); - VerifyActivityCodeOnPostedSalesInvoice(PostedDocumentNo, SalesHeader."Activity Code"); - VerifyActivityCodeOnVATEntry(PostedDocumentNo, SalesHeader."Activity Code"); + VerifyActivityCodeOnPostedSalesInvoice(PostedDocumentNo, SalesHeader."Business Activity Code"); + VerifyActivityCodeOnVATEntry(PostedDocumentNo, SalesHeader."Business Activity Code"); end; local procedure Initialize() @@ -400,19 +442,18 @@ codeunit 144003 "IT - Activity Code" PurchaseLine, PurchaseHeader, PurchaseLine.Type::Item, Item."No.", LibraryRandom.RandInt(10)); end; - local procedure CreateActivityCode(): Code[6] + local procedure CreateBusinessActivityCode(): Code[10] var - ActivityCode: Record "Activity Code"; + BusinessActivityCode: Record "Business Activity Code"; begin - ActivityCode.Init(); - ActivityCode.Validate( + BusinessActivityCode.Init(); + BusinessActivityCode.Validate( Code, - CopyStr(LibraryUtility.GenerateRandomCode(ActivityCode.FieldNo(Code), DATABASE::"Activity Code"), - 1, LibraryUtility.GetFieldLength(DATABASE::"Activity Code", ActivityCode.FieldNo(Code)))); - ActivityCode.Insert(true); - ActivityCode.Validate(Description, ActivityCode.Code); - ActivityCode.Modify(true); - exit(ActivityCode.Code); + CopyStr(LibraryUtility.GenerateRandomCode(BusinessActivityCode.FieldNo(Code), DATABASE::"Business Activity Code"), 1, 6)); + BusinessActivityCode.Insert(true); + BusinessActivityCode.Validate(Description, BusinessActivityCode.Code); + BusinessActivityCode.Modify(true); + exit(BusinessActivityCode.Code); end; local procedure CreateRecurringGenJournalLine(var GenJournalLine: Record "Gen. Journal Line") @@ -473,35 +514,35 @@ codeunit 144003 "IT - Activity Code" GeneralLedgerSetup: Record "General Ledger Setup"; begin GeneralLedgerSetup.Get(); - GeneralLedgerSetup.Validate("Use Activity Code", NewActivityCode); + GeneralLedgerSetup.Validate("Use Business Activity Code", NewActivityCode); GeneralLedgerSetup.Modify(); end; - local procedure VerifyActivityCodeOnVATEntry(DocumentNo: Code[20]; ExpectedActivityCode: Code[6]) + local procedure VerifyActivityCodeOnVATEntry(DocumentNo: Code[20]; ExpectedActivityCode: Code[10]) var VATEntry: Record "VAT Entry"; begin VATEntry.SetRange("Document No.", DocumentNo); VATEntry.FindSet(); REPEAT - VATEntry.TestField("Activity Code", ExpectedActivityCode); + VATEntry.TestField("Business Activity Code", ExpectedActivityCode); UNTIL VATEntry.Next() = 0; end; - local procedure VerifyActivityCodeOnPostedPurchaseInvoice(DocumentNo: Code[20]; ExpectedActivityCode: Code[6]) + local procedure VerifyActivityCodeOnPostedPurchaseInvoice(DocumentNo: Code[20]; ExpectedActivityCode: Code[10]) var PurchInvHeader: Record "Purch. Inv. Header"; begin PurchInvHeader.Get(DocumentNo); - PurchInvHeader.TestField("Activity Code", ExpectedActivityCode); + PurchInvHeader.TestField("Business Activity Code", ExpectedActivityCode); end; - local procedure VerifyActivityCodeOnPostedSalesInvoice(DocumentNo: Code[20]; ExpectedActivityCode: Code[6]) + local procedure VerifyActivityCodeOnPostedSalesInvoice(DocumentNo: Code[20]; ExpectedActivityCode: Code[10]) var PurchInvHeader: Record "Sales Invoice Header"; begin PurchInvHeader.Get(DocumentNo); - PurchInvHeader.TestField("Activity Code", ExpectedActivityCode); + PurchInvHeader.TestField("Business Activity Code", ExpectedActivityCode); end; } diff --git a/src/Layers/IT/Tests/Local/ITCalcAndPostVATSettl.Codeunit.al b/src/Layers/IT/Tests/Local/ITCalcAndPostVATSettl.Codeunit.al index b853adaf6f9..c28f59f26b5 100644 --- a/src/Layers/IT/Tests/Local/ITCalcAndPostVATSettl.Codeunit.al +++ b/src/Layers/IT/Tests/Local/ITCalcAndPostVATSettl.Codeunit.al @@ -738,7 +738,7 @@ codeunit 144015 "IT - Calc. And Post VAT Settl." GeneralLedgerSetup: Record "General Ledger Setup"; begin GeneralLedgerSetup.Get(); - GeneralLedgerSetup.Validate("Use Activity Code", NewValue); + GeneralLedgerSetup.Validate("Use Business Activity Code", NewValue); GeneralLedgerSetup.Modify(); end; @@ -747,7 +747,7 @@ codeunit 144015 "IT - Calc. And Post VAT Settl." VATSetup: Record "VAT Setup"; begin VATSetup.Get(); - VATSetup.Validate("Per Activity Code Settl. Entry", NewValue); + VATSetup.Validate("Per Business Activity Code Settl. Entry", NewValue); VATSetup.Modify(); end; @@ -765,7 +765,7 @@ codeunit 144015 "IT - Calc. And Post VAT Settl." local procedure ClearEverything() var - ActivityCode: Record "Activity Code"; + ActivityCode: Record "Business Activity Code"; AccountingPeriod: Record "Accounting Period"; PeriodicVATSettlementEntry: Record "Periodic VAT Settlement Entry"; VATEntry: Record "VAT Entry"; @@ -841,7 +841,7 @@ codeunit 144015 "IT - Calc. And Post VAT Settl." NoSeriesLine.ModifyAll("Last Date Used", 0D); end; - local procedure CreateAndPostPurchInvoice(VendorNo: Code[20]; PostingDate: Date; GLAccountNo: Code[20]; UnitCost: Decimal; ActivityCode: Code[6]) VATAmount: Decimal + local procedure CreateAndPostPurchInvoice(VendorNo: Code[20]; PostingDate: Date; GLAccountNo: Code[20]; UnitCost: Decimal; ActivityCode: Code[10]) VATAmount: Decimal var PurchaseHeader: Record "Purchase Header"; PurchaseLine: Record "Purchase Line"; @@ -850,7 +850,7 @@ codeunit 144015 "IT - Calc. And Post VAT Settl." PurchaseHeader.Validate("Posting Date", PostingDate); PurchaseHeader.Validate("Document Date", PostingDate); PurchaseHeader.Validate("Operation Occurred Date", PostingDate); - PurchaseHeader.Validate("Activity Code", ActivityCode); + PurchaseHeader.Validate("Business Activity Code", ActivityCode); PurchaseHeader."Posting No. Series" := LibraryERM.CreateNoSeriesPurchaseCode(); PurchaseHeader.Modify(true); LibraryPurchase.CreatePurchaseLine(PurchaseLine, PurchaseHeader, PurchaseLine.Type::"G/L Account", GLAccountNo, 1); @@ -878,7 +878,7 @@ codeunit 144015 "IT - Calc. And Post VAT Settl." EndingDate := DateRecord."Period End"; end; - local procedure CreateAndPostSalesInvoice(VATPostingSetup: Record "VAT Posting Setup"; PostingDate: Date; ActivityCode: Code[6]; Amount: Decimal) VATAmount: Decimal + local procedure CreateAndPostSalesInvoice(VATPostingSetup: Record "VAT Posting Setup"; PostingDate: Date; ActivityCode: Code[10]; Amount: Decimal) VATAmount: Decimal var Customer: Record Customer; DummyGLAccount: Record "G/L Account"; @@ -887,7 +887,7 @@ codeunit 144015 "IT - Calc. And Post VAT Settl." VATAmount := CreateAndPostSalesInvoice(Customer, PostingDate, Amount, LibraryERM.CreateGLAccountWithVATPostingSetup(VATPostingSetup, DummyGLAccount."Gen. Posting Type"::Sale), ActivityCode); end; - local procedure CreateAndPostSalesInvoice(Customer: Record Customer; PostingDate: Date; UnitPrice: Decimal; GLAccountNo: Code[20]; ActivityCode: Code[6]) VATAmount: Decimal + local procedure CreateAndPostSalesInvoice(Customer: Record Customer; PostingDate: Date; UnitPrice: Decimal; GLAccountNo: Code[20]; ActivityCode: Code[10]) VATAmount: Decimal var SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line"; @@ -897,7 +897,7 @@ codeunit 144015 "IT - Calc. And Post VAT Settl." SalesHeader.Validate("Document Date", PostingDate); SalesHeader.Validate("Operation Occurred Date", PostingDate); SalesHeader.Validate("Posting Date", PostingDate); - SalesHeader.Validate("Activity Code", ActivityCode); + SalesHeader.Validate("Business Activity Code", ActivityCode); NoSeries.Init(); SalesHeader.Validate("Operation Type", LibraryERM.FindOperationType(NoSeries."No. Series Type"::Sales)); SalesHeader."Posting No. Series" := LibraryERM.CreateNoSeriesSalesCode(); @@ -958,14 +958,14 @@ codeunit 144015 "IT - Calc. And Post VAT Settl." PeriodicVATSettlementEntry.TestField("Prior Period Output VAT", ExpectedPriorPeriodOutputVAT); end; - local procedure MockPeriodicVATSettlementEntry(PeriodDate: Date; ActivityCode: Code[6]; InputAmount: Decimal; OutputAmount: Decimal) + local procedure MockPeriodicVATSettlementEntry(PeriodDate: Date; ActivityCode: Code[10]; InputAmount: Decimal; OutputAmount: Decimal) var PeriodicVATSettlementEntry: Record "Periodic VAT Settlement Entry"; VATPeriod: Code[10]; begin PeriodicVATSettlementEntry.Init(); VATPeriod := Format(Date2DMY(PeriodDate, 3)) + '/' + ConvertStr(Format(Date2DMY(PeriodDate, 2), 2), ' ', '0'); - PeriodicVATSettlementEntry.Validate("Activity Code", ActivityCode); + PeriodicVATSettlementEntry.Validate("Business Activity Code", ActivityCode); PeriodicVATSettlementEntry.Validate("VAT Period", VATPeriod); PeriodicVATSettlementEntry.Validate("Prior Period Input VAT", InputAmount); PeriodicVATSettlementEntry.Validate("Prior Period Output VAT", OutputAmount); @@ -974,13 +974,12 @@ codeunit 144015 "IT - Calc. And Post VAT Settl." local procedure CreateActivityCode(): Code[10] var - ActivityCode: Record "Activity Code"; + ActivityCode: Record "Business Activity Code"; begin ActivityCode.Init(); ActivityCode.Validate( Code, - CopyStr(LibraryUtility.GenerateRandomCode(ActivityCode.FieldNo(Code), DATABASE::"Activity Code"), - 1, LibraryUtility.GetFieldLength(DATABASE::"Activity Code", ActivityCode.FieldNo(Code)))); + CopyStr(LibraryUtility.GenerateRandomCode(ActivityCode.FieldNo(Code), DATABASE::"Business Activity Code"), 1, 6)); ActivityCode.Insert(true); ActivityCode.Validate(Description, ActivityCode.Code); // Validating description with code as value is not important. ActivityCode.Modify(true); diff --git a/src/Layers/IT/Tests/Local/UTVATSettlement.Codeunit.al b/src/Layers/IT/Tests/Local/UTVATSettlement.Codeunit.al index 3b07b235bf6..a011bb08a2a 100644 --- a/src/Layers/IT/Tests/Local/UTVATSettlement.Codeunit.al +++ b/src/Layers/IT/Tests/Local/UTVATSettlement.Codeunit.al @@ -186,11 +186,11 @@ codeunit 144186 "UT VAT Settlement" GeneralLedgerSetup: Record "General Ledger Setup"; begin GeneralLedgerSetup.Get(); - GeneralLedgerSetup.Validate("Use Activity Code", NewValue); + GeneralLedgerSetup.Validate("Use Business Activity Code", NewValue); GeneralLedgerSetup.Modify(); end; - local procedure CreateAndPostPurchInvoice(VendorNo: Code[20]; PostingDate: Date; GLAccountNo: Code[20]; UnitCost: Decimal; ActivityCode: Code[6]) VATAmount: Decimal + local procedure CreateAndPostPurchInvoice(VendorNo: Code[20]; PostingDate: Date; GLAccountNo: Code[20]; UnitCost: Decimal; ActivityCode: Code[10]) VATAmount: Decimal var PurchaseHeader: Record "Purchase Header"; PurchaseLine: Record "Purchase Line"; @@ -199,7 +199,7 @@ codeunit 144186 "UT VAT Settlement" PurchaseHeader.Validate("Posting Date", PostingDate); PurchaseHeader.Validate("Document Date", PostingDate); PurchaseHeader.Validate("Operation Occurred Date", PostingDate); - PurchaseHeader.Validate("Activity Code", ActivityCode); + PurchaseHeader.Validate("Business Activity Code", ActivityCode); PurchaseHeader."Posting No. Series" := LibraryERM.CreateNoSeriesPurchaseCode(); PurchaseHeader.Modify(true); LibraryPurchase.CreatePurchaseLine(PurchaseLine, PurchaseHeader, PurchaseLine.Type::"G/L Account", GLAccountNo, 1); @@ -211,7 +211,7 @@ codeunit 144186 "UT VAT Settlement" VATAmount := PurchaseLine."Amount Including VAT" - PurchaseLine.Amount; end; - local procedure CreateAndPostSalesInvoice(Customer: Record Customer; PostingDate: Date; UnitPrice: Decimal; GLAccountNo: Code[20]; ActivityCode: Code[6]) VATAmount: Decimal + local procedure CreateAndPostSalesInvoice(Customer: Record Customer; PostingDate: Date; UnitPrice: Decimal; GLAccountNo: Code[20]; ActivityCode: Code[10]) VATAmount: Decimal var SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line"; @@ -221,7 +221,7 @@ codeunit 144186 "UT VAT Settlement" SalesHeader.Validate("Document Date", PostingDate); SalesHeader.Validate("Operation Occurred Date", PostingDate); SalesHeader.Validate("Posting Date", PostingDate); - SalesHeader.Validate("Activity Code", ActivityCode); + SalesHeader.Validate("Business Activity Code", ActivityCode); NoSeries.Init(); SalesHeader.Validate("Operation Type", LibraryERM.FindOperationType(NoSeries."No. Series Type"::Sales)); SalesHeader."Posting No. Series" := LibraryERM.CreateNoSeriesSalesCode(); @@ -246,13 +246,12 @@ codeunit 144186 "UT VAT Settlement" local procedure CreateActivityCode(): Code[10] var - ActivityCode: Record "Activity Code"; + ActivityCode: Record "Business Activity Code"; begin ActivityCode.Init(); ActivityCode.Validate( Code, - CopyStr(LibraryUtility.GenerateRandomCode(ActivityCode.FieldNo(Code), DATABASE::"Activity Code"), - 1, LibraryUtility.GetFieldLength(DATABASE::"Activity Code", ActivityCode.FieldNo(Code)))); + CopyStr(LibraryUtility.GenerateRandomCode(ActivityCode.FieldNo(Code), DATABASE::"Business Activity Code"), 1, 6)); ActivityCode.Insert(true); ActivityCode.Validate(Description, ActivityCode.Code); // Validating description with code as value is not important. ActivityCode.Modify(true); diff --git a/src/Layers/IT/Tests/NewObjectTests-Internal/CloudMigCountryTables.Codeunit.al b/src/Layers/IT/Tests/NewObjectTests-Internal/CloudMigCountryTables.Codeunit.al index 859e854e60d..4e85b6c452a 100644 --- a/src/Layers/IT/Tests/NewObjectTests-Internal/CloudMigCountryTables.Codeunit.al +++ b/src/Layers/IT/Tests/NewObjectTests-Internal/CloudMigCountryTables.Codeunit.al @@ -3,7 +3,7 @@ codeunit 135161 "Cloud Mig Country Tables" procedure GetTablesThatShouldBeCloudMigrated(var ListOfTablesToMigrate: List of [Integer]) begin ListOfTablesToMigrate.Add(Database::"ABI/CAB Codes"); - ListOfTablesToMigrate.Add(Database::"Activity Code"); + ListOfTablesToMigrate.Add(Database::"Business Activity Code"); ListOfTablesToMigrate.Add(Database::"Appointment Code"); ListOfTablesToMigrate.Add(Database::"Before Start Item Cost"); ListOfTablesToMigrate.Add(Database::"Bill Posting Group"); diff --git a/src/Layers/NA/BaseApp/Finance/GeneralLedger/Journal/GenJournalLine.Table.al b/src/Layers/NA/BaseApp/Finance/GeneralLedger/Journal/GenJournalLine.Table.al index 90a27cef024..dd84a7b242d 100644 --- a/src/Layers/NA/BaseApp/Finance/GeneralLedger/Journal/GenJournalLine.Table.al +++ b/src/Layers/NA/BaseApp/Finance/GeneralLedger/Journal/GenJournalLine.Table.al @@ -2782,6 +2782,11 @@ table 81 "Gen. Journal Line" Editable = false; FieldClass = FlowField; } + field(395; "Business Activity Code"; Code[10]) + { + Caption = 'Business Activity Code'; + TableRelation = "Business Activity".Code; + } /// /// Dimension set identifier linking to dimension value combinations for analytical reporting and cost center tracking. /// diff --git a/src/Layers/NA/BaseApp/Finance/GeneralLedger/Journal/PostedGenJournalLine.Table.al b/src/Layers/NA/BaseApp/Finance/GeneralLedger/Journal/PostedGenJournalLine.Table.al index 59333299c90..39087f0d08f 100644 --- a/src/Layers/NA/BaseApp/Finance/GeneralLedger/Journal/PostedGenJournalLine.Table.al +++ b/src/Layers/NA/BaseApp/Finance/GeneralLedger/Journal/PostedGenJournalLine.Table.al @@ -1222,6 +1222,11 @@ table 181 "Posted Gen. Journal Line" Caption = 'Exported to Payment File'; Editable = false; } + field(395; "Business Activity Code"; Code[10]) + { + Caption = 'Business Activity Code'; + TableRelation = "Business Activity".Code; + } /// /// Dimension set identifier linking posted entries to dimension combinations for analytical reporting and financial analysis. /// diff --git a/src/Layers/NA/BaseApp/Finance/GeneralLedger/Setup/GeneralLedgerSetup.Table.al b/src/Layers/NA/BaseApp/Finance/GeneralLedger/Setup/GeneralLedgerSetup.Table.al index dcc458bf5d1..d2dc1ac19d8 100644 --- a/src/Layers/NA/BaseApp/Finance/GeneralLedger/Setup/GeneralLedgerSetup.Table.al +++ b/src/Layers/NA/BaseApp/Finance/GeneralLedger/Setup/GeneralLedgerSetup.Table.al @@ -1440,6 +1440,10 @@ table 98 "General Ledger Setup" Caption = 'Use Concurrent Posting'; ToolTip = 'Specifies whether to use concurrent posting when posting journals. Concurrent posting can reduce the time it takes to post journals by allowing multiple batches to be posted at the same time. Enabling this option requires additional configuration and setup, such as setting up a batch job to run the concurrent posting process and ensuring that your system has the necessary resources to support concurrent processing.'; } + field(395; "Use Business Activity Code"; Boolean) + { + Caption = 'Use Business Activity Code'; + } field(10001; "VAT in Use"; Boolean) { Caption = 'VAT in Use'; diff --git a/src/Layers/NA/BaseApp/Finance/VAT/Ledger/VATEntry.Table.al b/src/Layers/NA/BaseApp/Finance/VAT/Ledger/VATEntry.Table.al index 1f6679e0305..349660775a0 100644 --- a/src/Layers/NA/BaseApp/Finance/VAT/Ledger/VATEntry.Table.al +++ b/src/Layers/NA/BaseApp/Finance/VAT/Ledger/VATEntry.Table.al @@ -771,6 +771,11 @@ table 254 "VAT Entry" TableRelation = "G/L Register"; ToolTip = 'Specifies the G/L register number that groups related G/L entries from the same posting.'; } + field(395; "Business Activity Code"; Code[10]) + { + Caption = 'Business Activity Code'; + TableRelation = "Business Activity".Code; + } /// /// Percentage of VAT that is non-deductible based on business use or regulatory restrictions. /// diff --git a/src/Layers/NA/BaseApp/Foundation/Company/CompanyInformation.Table.al b/src/Layers/NA/BaseApp/Foundation/Company/CompanyInformation.Table.al index c2b7b5a106e..3e6abc80bcf 100644 --- a/src/Layers/NA/BaseApp/Foundation/Company/CompanyInformation.Table.al +++ b/src/Layers/NA/BaseApp/Foundation/Company/CompanyInformation.Table.al @@ -11,6 +11,7 @@ using Microsoft.Finance.GeneralLedger.Setup; using Microsoft.Finance.SalesTax; using Microsoft.Finance.VAT.Registration; using Microsoft.Foundation.Address; +using Microsoft.Foundation.AuditCodes; using Microsoft.Foundation.Calendar; using Microsoft.Foundation.Enums; using Microsoft.Inventory.Item; @@ -468,6 +469,11 @@ table 79 "Company Information" SetBrandColorValue(); end; } + field(395; "Business Activity Code"; Code[10]) + { + Caption = 'Business Activity Code'; + TableRelation = "Business Activity".Code; + } field(5700; "Responsibility Center"; Code[10]) { Caption = 'Responsibility Center'; @@ -1003,4 +1009,4 @@ table 79 "Company Information" begin end; -} +} \ No newline at end of file diff --git a/src/Layers/NA/BaseApp/Purchases/Archive/PurchaseHeaderArchive.Table.al b/src/Layers/NA/BaseApp/Purchases/Archive/PurchaseHeaderArchive.Table.al index feda969b622..3f0d776fb9c 100644 --- a/src/Layers/NA/BaseApp/Purchases/Archive/PurchaseHeaderArchive.Table.al +++ b/src/Layers/NA/BaseApp/Purchases/Archive/PurchaseHeaderArchive.Table.al @@ -741,6 +741,11 @@ table 5109 "Purchase Header Archive" ToolTip = 'Specifies the telephone number of the company''s shipping address.'; ExtendedDatatype = PhoneNo; } + field(395; "Business Activity Code"; Code[10]) + { + Caption = 'Business Activity Code'; + TableRelation = "Business Activity".Code; + } field(480; "Dimension Set ID"; Integer) { Caption = 'Dimension Set ID'; diff --git a/src/Layers/NA/BaseApp/Purchases/Document/PurchaseHeader.Table.al b/src/Layers/NA/BaseApp/Purchases/Document/PurchaseHeader.Table.al index 4e047a11aa5..cde405c6a38 100644 --- a/src/Layers/NA/BaseApp/Purchases/Document/PurchaseHeader.Table.al +++ b/src/Layers/NA/BaseApp/Purchases/Document/PurchaseHeader.Table.al @@ -2368,6 +2368,11 @@ table 38 "Purchase Header" FieldClass = FlowField; AutoFormatType = 1; } + field(395; "Business Activity Code"; Code[10]) + { + Caption = 'Business Activity Code'; + TableRelation = "Business Activity".Code; + } field(480; "Dimension Set ID"; Integer) { Caption = 'Dimension Set ID'; diff --git a/src/Layers/NA/BaseApp/Purchases/History/PurchCrMemoHdr.Table.al b/src/Layers/NA/BaseApp/Purchases/History/PurchCrMemoHdr.Table.al index 47aec8a2010..12e3c68b800 100644 --- a/src/Layers/NA/BaseApp/Purchases/History/PurchCrMemoHdr.Table.al +++ b/src/Layers/NA/BaseApp/Purchases/History/PurchCrMemoHdr.Table.al @@ -566,6 +566,12 @@ table 124 "Purch. Cr. Memo Hdr." ToolTip = 'Specifies the telephone number of the company''s shipping address.'; ExtendedDatatype = PhoneNo; } + field(395; "Business Activity Code"; Code[10]) + { + Caption = 'Business Activity Code'; + Editable = false; + TableRelation = "Business Activity".Code; + } field(480; "Dimension Set ID"; Integer) { Caption = 'Dimension Set ID'; diff --git a/src/Layers/NA/BaseApp/Purchases/History/PurchInvHeader.Table.al b/src/Layers/NA/BaseApp/Purchases/History/PurchInvHeader.Table.al index ba46cf7a83e..2e1e64aa64c 100644 --- a/src/Layers/NA/BaseApp/Purchases/History/PurchInvHeader.Table.al +++ b/src/Layers/NA/BaseApp/Purchases/History/PurchInvHeader.Table.al @@ -615,6 +615,12 @@ table 122 "Purch. Inv. Header" ToolTip = 'Specifies the telephone number of the company''s shipping address.'; ExtendedDatatype = PhoneNo; } + field(395; "Business Activity Code"; Code[10]) + { + Caption = 'Business Activity Code'; + Editable = false; + TableRelation = "Business Activity".Code; + } field(480; "Dimension Set ID"; Integer) { Caption = 'Dimension Set ID'; diff --git a/src/Layers/NA/BaseApp/Sales/Archive/SalesHeaderArchive.Table.al b/src/Layers/NA/BaseApp/Sales/Archive/SalesHeaderArchive.Table.al index 8faee1ab60b..e06689bd76c 100644 --- a/src/Layers/NA/BaseApp/Sales/Archive/SalesHeaderArchive.Table.al +++ b/src/Layers/NA/BaseApp/Sales/Archive/SalesHeaderArchive.Table.al @@ -1189,6 +1189,11 @@ table 5107 "Sales Header Archive" ExtendedDatatype = PhoneNo; ToolTip = 'Specifies the telephone number of the company''s shipping address.'; } + field(395; "Business Activity Code"; Code[10]) + { + Caption = 'Business Activity Code'; + TableRelation = "Business Activity".Code; + } /// /// Specifies the unique identifier for the combination of dimension values assigned to this document. /// diff --git a/src/Layers/NA/BaseApp/Sales/Document/SalesHeader.Table.al b/src/Layers/NA/BaseApp/Sales/Document/SalesHeader.Table.al index e31a92af8e9..b9a4fcb0217 100644 --- a/src/Layers/NA/BaseApp/Sales/Document/SalesHeader.Table.al +++ b/src/Layers/NA/BaseApp/Sales/Document/SalesHeader.Table.al @@ -2938,6 +2938,11 @@ table 36 "Sales Header" Editable = false; FieldClass = FlowField; } + field(395; "Business Activity Code"; Code[10]) + { + Caption = 'Business Activity Code'; + TableRelation = "Business Activity".Code; + } /// /// Specifies the identifier for the combination of dimensions applied to the document. /// diff --git a/src/Layers/NA/BaseApp/Sales/History/SalesCrMemoHeader.Table.al b/src/Layers/NA/BaseApp/Sales/History/SalesCrMemoHeader.Table.al index e89b54eae80..416c9ce28cd 100644 --- a/src/Layers/NA/BaseApp/Sales/History/SalesCrMemoHeader.Table.al +++ b/src/Layers/NA/BaseApp/Sales/History/SalesCrMemoHeader.Table.al @@ -942,6 +942,12 @@ table 114 "Sales Cr.Memo Header" ToolTip = 'Specifies the telephone number of the company''s shipping address.'; ExtendedDatatype = PhoneNo; } + field(395; "Business Activity Code"; Code[10]) + { + Caption = 'Business Activity Code'; + Editable = false; + TableRelation = "Business Activity".Code; + } /// /// Specifies the unique identifier for the dimension set applied to this credit memo. /// diff --git a/src/Layers/NA/BaseApp/Sales/History/SalesInvoiceHeader.Table.al b/src/Layers/NA/BaseApp/Sales/History/SalesInvoiceHeader.Table.al index 38d1b3c8f30..0811d086385 100644 --- a/src/Layers/NA/BaseApp/Sales/History/SalesInvoiceHeader.Table.al +++ b/src/Layers/NA/BaseApp/Sales/History/SalesInvoiceHeader.Table.al @@ -1017,6 +1017,12 @@ table 112 "Sales Invoice Header" ToolTip = 'Specifies the telephone number of the company''s shipping address.'; ExtendedDatatype = PhoneNo; } + field(395; "Business Activity Code"; Code[10]) + { + Caption = 'Business Activity Code'; + Editable = false; + TableRelation = "Business Activity".Code; + } /// /// Specifies the unique identifier for the dimension set applied to this document. /// diff --git a/src/Layers/NL/BaseApp/Finance/GeneralLedger/Journal/GenJournalLine.Table.al b/src/Layers/NL/BaseApp/Finance/GeneralLedger/Journal/GenJournalLine.Table.al index ed1ff8733b4..621c698be76 100644 --- a/src/Layers/NL/BaseApp/Finance/GeneralLedger/Journal/GenJournalLine.Table.al +++ b/src/Layers/NL/BaseApp/Finance/GeneralLedger/Journal/GenJournalLine.Table.al @@ -2748,6 +2748,11 @@ table 81 "Gen. Journal Line" Editable = false; FieldClass = FlowField; } + field(395; "Business Activity Code"; Code[10]) + { + Caption = 'Business Activity Code'; + TableRelation = "Business Activity".Code; + } /// /// Dimension set identifier linking to dimension value combinations for analytical reporting and cost center tracking. /// diff --git a/src/Layers/NL/BaseApp/Finance/GeneralLedger/Journal/PostedGenJournalLine.Table.al b/src/Layers/NL/BaseApp/Finance/GeneralLedger/Journal/PostedGenJournalLine.Table.al index 341523b3404..62ed7bbabae 100644 --- a/src/Layers/NL/BaseApp/Finance/GeneralLedger/Journal/PostedGenJournalLine.Table.al +++ b/src/Layers/NL/BaseApp/Finance/GeneralLedger/Journal/PostedGenJournalLine.Table.al @@ -1223,6 +1223,11 @@ table 181 "Posted Gen. Journal Line" Caption = 'Exported to Payment File'; Editable = false; } + field(395; "Business Activity Code"; Code[10]) + { + Caption = 'Business Activity Code'; + TableRelation = "Business Activity".Code; + } /// /// Dimension set identifier linking posted entries to dimension combinations for analytical reporting and financial analysis. /// diff --git a/src/Layers/NL/BaseApp/Finance/GeneralLedger/Setup/GeneralLedgerSetup.Table.al b/src/Layers/NL/BaseApp/Finance/GeneralLedger/Setup/GeneralLedgerSetup.Table.al index b64e8175b91..4670136d058 100644 --- a/src/Layers/NL/BaseApp/Finance/GeneralLedger/Setup/GeneralLedgerSetup.Table.al +++ b/src/Layers/NL/BaseApp/Finance/GeneralLedger/Setup/GeneralLedgerSetup.Table.al @@ -1442,6 +1442,10 @@ table 98 "General Ledger Setup" Caption = 'Use Concurrent Posting'; ToolTip = 'Specifies whether to use concurrent posting when posting journals. Concurrent posting can reduce the time it takes to post journals by allowing multiple batches to be posted at the same time. Enabling this option requires additional configuration and setup, such as setting up a batch job to run the concurrent posting process and ensuring that your system has the necessary resources to support concurrent processing.'; } + field(395; "Use Business Activity Code"; Boolean) + { + Caption = 'Use Business Activity Code'; + } field(11400; "Local SEPA Instr. Priority"; Boolean) { Caption = 'Local SEPA Instr. Priority'; diff --git a/src/Layers/NL/BaseApp/Finance/VAT/Ledger/VATEntry.Table.al b/src/Layers/NL/BaseApp/Finance/VAT/Ledger/VATEntry.Table.al index e373bfc1f98..294b57def81 100644 --- a/src/Layers/NL/BaseApp/Finance/VAT/Ledger/VATEntry.Table.al +++ b/src/Layers/NL/BaseApp/Finance/VAT/Ledger/VATEntry.Table.al @@ -771,6 +771,11 @@ table 254 "VAT Entry" TableRelation = "G/L Register"; ToolTip = 'Specifies the G/L register number that groups related G/L entries from the same posting.'; } + field(395; "Business Activity Code"; Code[10]) + { + Caption = 'Business Activity Code'; + TableRelation = "Business Activity".Code; + } /// /// Percentage of VAT that is non-deductible based on business use or regulatory restrictions. /// diff --git a/src/Layers/NL/BaseApp/Foundation/Company/CompanyInformation.Table.al b/src/Layers/NL/BaseApp/Foundation/Company/CompanyInformation.Table.al index 660e3b32eca..8939438215d 100644 --- a/src/Layers/NL/BaseApp/Foundation/Company/CompanyInformation.Table.al +++ b/src/Layers/NL/BaseApp/Foundation/Company/CompanyInformation.Table.al @@ -8,6 +8,7 @@ using Microsoft.Bank.Setup; using Microsoft.EServices.OnlineMap; using Microsoft.Finance.VAT.Registration; using Microsoft.Foundation.Address; +using Microsoft.Foundation.AuditCodes; using Microsoft.Foundation.Calendar; using Microsoft.Foundation.Enums; using Microsoft.Inventory.Item; @@ -471,6 +472,11 @@ table 79 "Company Information" SetBrandColorValue(); end; } + field(395; "Business Activity Code"; Code[10]) + { + Caption = 'Business Activity Code'; + TableRelation = "Business Activity".Code; + } field(5700; "Responsibility Center"; Code[10]) { Caption = 'Responsibility Center'; @@ -895,4 +901,4 @@ table 79 "Company Information" begin end; -} +} \ No newline at end of file diff --git a/src/Layers/NL/BaseApp/Purchases/Document/PurchaseHeader.Table.al b/src/Layers/NL/BaseApp/Purchases/Document/PurchaseHeader.Table.al index 9c62c1b69a4..d018533d760 100644 --- a/src/Layers/NL/BaseApp/Purchases/Document/PurchaseHeader.Table.al +++ b/src/Layers/NL/BaseApp/Purchases/Document/PurchaseHeader.Table.al @@ -2316,6 +2316,11 @@ table 38 "Purchase Header" FieldClass = FlowField; AutoFormatType = 1; } + field(395; "Business Activity Code"; Code[10]) + { + Caption = 'Business Activity Code'; + TableRelation = "Business Activity".Code; + } field(480; "Dimension Set ID"; Integer) { Caption = 'Dimension Set ID'; diff --git a/src/Layers/NL/BaseApp/Purchases/History/PurchCrMemoHdr.Table.al b/src/Layers/NL/BaseApp/Purchases/History/PurchCrMemoHdr.Table.al index 45148bd41da..67f2d90abd6 100644 --- a/src/Layers/NL/BaseApp/Purchases/History/PurchCrMemoHdr.Table.al +++ b/src/Layers/NL/BaseApp/Purchases/History/PurchCrMemoHdr.Table.al @@ -566,6 +566,12 @@ table 124 "Purch. Cr. Memo Hdr." ToolTip = 'Specifies the telephone number of the company''s shipping address.'; ExtendedDatatype = PhoneNo; } + field(395; "Business Activity Code"; Code[10]) + { + Caption = 'Business Activity Code'; + Editable = false; + TableRelation = "Business Activity".Code; + } field(480; "Dimension Set ID"; Integer) { Caption = 'Dimension Set ID'; diff --git a/src/Layers/NL/BaseApp/Purchases/History/PurchInvHeader.Table.al b/src/Layers/NL/BaseApp/Purchases/History/PurchInvHeader.Table.al index 6fceed08502..a45babd8f07 100644 --- a/src/Layers/NL/BaseApp/Purchases/History/PurchInvHeader.Table.al +++ b/src/Layers/NL/BaseApp/Purchases/History/PurchInvHeader.Table.al @@ -615,6 +615,12 @@ table 122 "Purch. Inv. Header" ToolTip = 'Specifies the telephone number of the company''s shipping address.'; ExtendedDatatype = PhoneNo; } + field(395; "Business Activity Code"; Code[10]) + { + Caption = 'Business Activity Code'; + Editable = false; + TableRelation = "Business Activity".Code; + } field(480; "Dimension Set ID"; Integer) { Caption = 'Dimension Set ID'; diff --git a/src/Layers/NL/BaseApp/Sales/Document/SalesHeader.Table.al b/src/Layers/NL/BaseApp/Sales/Document/SalesHeader.Table.al index ba03e063fbd..dd9a404d092 100644 --- a/src/Layers/NL/BaseApp/Sales/Document/SalesHeader.Table.al +++ b/src/Layers/NL/BaseApp/Sales/Document/SalesHeader.Table.al @@ -2932,6 +2932,11 @@ table 36 "Sales Header" Editable = false; FieldClass = FlowField; } + field(395; "Business Activity Code"; Code[10]) + { + Caption = 'Business Activity Code'; + TableRelation = "Business Activity".Code; + } /// /// Specifies the identifier for the combination of dimensions applied to the document. /// diff --git a/src/Layers/NL/BaseApp/Sales/History/SalesCrMemoHeader.Table.al b/src/Layers/NL/BaseApp/Sales/History/SalesCrMemoHeader.Table.al index 1284c76960f..1412f829dbf 100644 --- a/src/Layers/NL/BaseApp/Sales/History/SalesCrMemoHeader.Table.al +++ b/src/Layers/NL/BaseApp/Sales/History/SalesCrMemoHeader.Table.al @@ -939,6 +939,12 @@ table 114 "Sales Cr.Memo Header" ToolTip = 'Specifies the telephone number of the company''s shipping address.'; ExtendedDatatype = PhoneNo; } + field(395; "Business Activity Code"; Code[10]) + { + Caption = 'Business Activity Code'; + Editable = false; + TableRelation = "Business Activity".Code; + } /// /// Specifies the unique identifier for the dimension set applied to this credit memo. /// diff --git a/src/Layers/NL/BaseApp/Sales/History/SalesInvoiceHeader.Table.al b/src/Layers/NL/BaseApp/Sales/History/SalesInvoiceHeader.Table.al index 4824df58fc6..82a22d7d9c2 100644 --- a/src/Layers/NL/BaseApp/Sales/History/SalesInvoiceHeader.Table.al +++ b/src/Layers/NL/BaseApp/Sales/History/SalesInvoiceHeader.Table.al @@ -1015,6 +1015,12 @@ table 112 "Sales Invoice Header" ToolTip = 'Specifies the telephone number of the company''s shipping address.'; ExtendedDatatype = PhoneNo; } + field(395; "Business Activity Code"; Code[10]) + { + Caption = 'Business Activity Code'; + Editable = false; + TableRelation = "Business Activity".Code; + } /// /// Specifies the unique identifier for the dimension set applied to this document. /// diff --git a/src/Layers/NO/BaseApp/Finance/GeneralLedger/Journal/GenJournalLine.Table.al b/src/Layers/NO/BaseApp/Finance/GeneralLedger/Journal/GenJournalLine.Table.al index 6167bcd4673..25c662a8cd0 100644 --- a/src/Layers/NO/BaseApp/Finance/GeneralLedger/Journal/GenJournalLine.Table.al +++ b/src/Layers/NO/BaseApp/Finance/GeneralLedger/Journal/GenJournalLine.Table.al @@ -2760,6 +2760,11 @@ table 81 "Gen. Journal Line" Editable = false; FieldClass = FlowField; } + field(395; "Business Activity Code"; Code[10]) + { + Caption = 'Business Activity Code'; + TableRelation = "Business Activity".Code; + } /// /// Dimension set identifier linking to dimension value combinations for analytical reporting and cost center tracking. /// diff --git a/src/Layers/NO/BaseApp/Finance/GeneralLedger/Journal/PostedGenJournalLine.Table.al b/src/Layers/NO/BaseApp/Finance/GeneralLedger/Journal/PostedGenJournalLine.Table.al index ee455f437d7..6f9215c561c 100644 --- a/src/Layers/NO/BaseApp/Finance/GeneralLedger/Journal/PostedGenJournalLine.Table.al +++ b/src/Layers/NO/BaseApp/Finance/GeneralLedger/Journal/PostedGenJournalLine.Table.al @@ -1224,6 +1224,11 @@ table 181 "Posted Gen. Journal Line" Caption = 'Exported to Payment File'; Editable = false; } + field(395; "Business Activity Code"; Code[10]) + { + Caption = 'Business Activity Code'; + TableRelation = "Business Activity".Code; + } /// /// Dimension set identifier linking posted entries to dimension combinations for analytical reporting and financial analysis. /// diff --git a/src/Layers/NO/BaseApp/Finance/GeneralLedger/Setup/GeneralLedgerSetup.Table.al b/src/Layers/NO/BaseApp/Finance/GeneralLedger/Setup/GeneralLedgerSetup.Table.al index 659166de867..801d6484207 100644 --- a/src/Layers/NO/BaseApp/Finance/GeneralLedger/Setup/GeneralLedgerSetup.Table.al +++ b/src/Layers/NO/BaseApp/Finance/GeneralLedger/Setup/GeneralLedgerSetup.Table.al @@ -1442,6 +1442,10 @@ table 98 "General Ledger Setup" Caption = 'Use Concurrent Posting'; ToolTip = 'Specifies whether to use concurrent posting when posting journals. Concurrent posting can reduce the time it takes to post journals by allowing multiple batches to be posted at the same time. Enabling this option requires additional configuration and setup, such as setting up a batch job to run the concurrent posting process and ensuring that your system has the necessary resources to support concurrent processing.'; } + field(395; "Use Business Activity Code"; Boolean) + { + Caption = 'Use Business Activity Code'; + } field(10600; "Application always Allowed"; Boolean) { Caption = 'Application always Allowed'; diff --git a/src/Layers/NO/BaseApp/Finance/VAT/Ledger/VATEntry.Table.al b/src/Layers/NO/BaseApp/Finance/VAT/Ledger/VATEntry.Table.al index 38fcdee4a5f..5998893f819 100644 --- a/src/Layers/NO/BaseApp/Finance/VAT/Ledger/VATEntry.Table.al +++ b/src/Layers/NO/BaseApp/Finance/VAT/Ledger/VATEntry.Table.al @@ -772,6 +772,11 @@ table 254 "VAT Entry" TableRelation = "G/L Register"; ToolTip = 'Specifies the G/L register number that groups related G/L entries from the same posting.'; } + field(395; "Business Activity Code"; Code[10]) + { + Caption = 'Business Activity Code'; + TableRelation = "Business Activity".Code; + } /// /// Percentage of VAT that is non-deductible based on business use or regulatory restrictions. /// diff --git a/src/Layers/NO/BaseApp/Finance/VAT/Reporting/VATStatementLine.Table.al b/src/Layers/NO/BaseApp/Finance/VAT/Reporting/VATStatementLine.Table.al index e9b215ea63b..41296d606e2 100644 --- a/src/Layers/NO/BaseApp/Finance/VAT/Reporting/VATStatementLine.Table.al +++ b/src/Layers/NO/BaseApp/Finance/VAT/Reporting/VATStatementLine.Table.al @@ -1,4 +1,4 @@ -// ------------------------------------------------------------------------------------------------ +// ------------------------------------------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. // ------------------------------------------------------------------------------------------------ diff --git a/src/Layers/NO/BaseApp/Finance/VAT/Setup/VATSetup.Page.al b/src/Layers/NO/BaseApp/Finance/VAT/Setup/VATSetup.Page.al index 6fe4c284b7d..42d1cb81616 100644 --- a/src/Layers/NO/BaseApp/Finance/VAT/Setup/VATSetup.Page.al +++ b/src/Layers/NO/BaseApp/Finance/VAT/Setup/VATSetup.Page.al @@ -253,7 +253,6 @@ page 187 "VAT Setup" end; end; - var IsVATDateEnabled: Boolean; } diff --git a/src/Layers/NO/BaseApp/Foundation/Company/CompanyInformation.Table.al b/src/Layers/NO/BaseApp/Foundation/Company/CompanyInformation.Table.al index d64ba0384dc..8d20ecb7555 100644 --- a/src/Layers/NO/BaseApp/Foundation/Company/CompanyInformation.Table.al +++ b/src/Layers/NO/BaseApp/Foundation/Company/CompanyInformation.Table.al @@ -8,6 +8,7 @@ using Microsoft.Bank.Setup; using Microsoft.EServices.OnlineMap; using Microsoft.Finance.VAT.Registration; using Microsoft.Foundation.Address; +using Microsoft.Foundation.AuditCodes; using Microsoft.Foundation.Calendar; using Microsoft.Foundation.Enums; using Microsoft.Intercompany.GLAccount; @@ -476,6 +477,11 @@ table 79 "Company Information" SetBrandColorValue(); end; } + field(395; "Business Activity Code"; Code[10]) + { + Caption = 'Business Activity Code'; + TableRelation = "Business Activity".Code; + } field(5700; "Responsibility Center"; Code[10]) { Caption = 'Responsibility Center'; @@ -904,4 +910,4 @@ table 79 "Company Information" begin end; -} +} \ No newline at end of file diff --git a/src/Layers/NO/BaseApp/Purchases/Document/PurchaseHeader.Table.al b/src/Layers/NO/BaseApp/Purchases/Document/PurchaseHeader.Table.al index 082af6a07e0..76c7c244668 100644 --- a/src/Layers/NO/BaseApp/Purchases/Document/PurchaseHeader.Table.al +++ b/src/Layers/NO/BaseApp/Purchases/Document/PurchaseHeader.Table.al @@ -2319,6 +2319,11 @@ table 38 "Purchase Header" FieldClass = FlowField; AutoFormatType = 1; } + field(395; "Business Activity Code"; Code[10]) + { + Caption = 'Business Activity Code'; + TableRelation = "Business Activity".Code; + } field(480; "Dimension Set ID"; Integer) { Caption = 'Dimension Set ID'; diff --git a/src/Layers/NO/BaseApp/Purchases/History/PurchInvHeader.Table.al b/src/Layers/NO/BaseApp/Purchases/History/PurchInvHeader.Table.al index bf2964c9ab7..9f5c3bb554f 100644 --- a/src/Layers/NO/BaseApp/Purchases/History/PurchInvHeader.Table.al +++ b/src/Layers/NO/BaseApp/Purchases/History/PurchInvHeader.Table.al @@ -615,6 +615,12 @@ table 122 "Purch. Inv. Header" ToolTip = 'Specifies the telephone number of the company''s shipping address.'; ExtendedDatatype = PhoneNo; } + field(395; "Business Activity Code"; Code[10]) + { + Caption = 'Business Activity Code'; + Editable = false; + TableRelation = "Business Activity".Code; + } field(480; "Dimension Set ID"; Integer) { Caption = 'Dimension Set ID'; diff --git a/src/Layers/NO/BaseApp/Sales/Archive/SalesHeaderArchive.Table.al b/src/Layers/NO/BaseApp/Sales/Archive/SalesHeaderArchive.Table.al index 0f74823621c..a9eb0082db5 100644 --- a/src/Layers/NO/BaseApp/Sales/Archive/SalesHeaderArchive.Table.al +++ b/src/Layers/NO/BaseApp/Sales/Archive/SalesHeaderArchive.Table.al @@ -1189,6 +1189,11 @@ table 5107 "Sales Header Archive" ExtendedDatatype = PhoneNo; ToolTip = 'Specifies the telephone number of the company''s shipping address.'; } + field(395; "Business Activity Code"; Code[10]) + { + Caption = 'Business Activity Code'; + TableRelation = "Business Activity".Code; + } /// /// Specifies the unique identifier for the combination of dimension values assigned to this document. /// diff --git a/src/Layers/NO/BaseApp/Sales/Document/SalesHeader.Table.al b/src/Layers/NO/BaseApp/Sales/Document/SalesHeader.Table.al index abe07a72686..d4ac56555c8 100644 --- a/src/Layers/NO/BaseApp/Sales/Document/SalesHeader.Table.al +++ b/src/Layers/NO/BaseApp/Sales/Document/SalesHeader.Table.al @@ -2938,6 +2938,11 @@ table 36 "Sales Header" Editable = false; FieldClass = FlowField; } + field(395; "Business Activity Code"; Code[10]) + { + Caption = 'Business Activity Code'; + TableRelation = "Business Activity".Code; + } /// /// Specifies the identifier for the combination of dimensions applied to the document. /// diff --git a/src/Layers/NO/BaseApp/Sales/FinanceCharge/FinanceChargeMemoHeader.Table.al b/src/Layers/NO/BaseApp/Sales/FinanceCharge/FinanceChargeMemoHeader.Table.al index 6cb634d9f90..9e17af2deb1 100644 --- a/src/Layers/NO/BaseApp/Sales/FinanceCharge/FinanceChargeMemoHeader.Table.al +++ b/src/Layers/NO/BaseApp/Sales/FinanceCharge/FinanceChargeMemoHeader.Table.al @@ -590,6 +590,11 @@ table 302 "Finance Charge Memo Header" ToolTip = 'Specifies the bank account to use for bank information when the document is printed.'; TableRelation = "Bank Account" where("Currency Code" = field("Currency Code")); } + field(395; "Business Activity Code"; Code[10]) + { + Caption = 'Business Activity Code'; + TableRelation = "Business Activity".Code; + } /// /// Specifies the unique identifier for the combination of dimension values assigned to this memo. /// diff --git a/src/Layers/NO/BaseApp/Sales/FinanceCharge/IssuedFinChargeMemoHeader.Table.al b/src/Layers/NO/BaseApp/Sales/FinanceCharge/IssuedFinChargeMemoHeader.Table.al index 407ba32cb3c..987a119c202 100644 --- a/src/Layers/NO/BaseApp/Sales/FinanceCharge/IssuedFinChargeMemoHeader.Table.al +++ b/src/Layers/NO/BaseApp/Sales/FinanceCharge/IssuedFinChargeMemoHeader.Table.al @@ -457,6 +457,11 @@ table 304 "Issued Fin. Charge Memo Header" ToolTip = 'Specifies the bank account to use for bank information when the document is printed.'; TableRelation = "Bank Account" where("Currency Code" = field("Currency Code")); } + field(395; "Business Activity Code"; Code[10]) + { + Caption = 'Business Activity Code'; + TableRelation = "Business Activity".Code; + } /// /// Specifies the unique identifier for the dimension values assigned to this memo. /// diff --git a/src/Layers/NO/BaseApp/Sales/History/SalesCrMemoHeader.Table.al b/src/Layers/NO/BaseApp/Sales/History/SalesCrMemoHeader.Table.al index 7e73b05c944..f24514873bb 100644 --- a/src/Layers/NO/BaseApp/Sales/History/SalesCrMemoHeader.Table.al +++ b/src/Layers/NO/BaseApp/Sales/History/SalesCrMemoHeader.Table.al @@ -939,6 +939,12 @@ table 114 "Sales Cr.Memo Header" ToolTip = 'Specifies the telephone number of the company''s shipping address.'; ExtendedDatatype = PhoneNo; } + field(395; "Business Activity Code"; Code[10]) + { + Caption = 'Business Activity Code'; + Editable = false; + TableRelation = "Business Activity".Code; + } /// /// Specifies the unique identifier for the dimension set applied to this credit memo. /// diff --git a/src/Layers/NO/BaseApp/Sales/History/SalesInvoiceHeader.Table.al b/src/Layers/NO/BaseApp/Sales/History/SalesInvoiceHeader.Table.al index 7a6f13e2951..ca7ac765529 100644 --- a/src/Layers/NO/BaseApp/Sales/History/SalesInvoiceHeader.Table.al +++ b/src/Layers/NO/BaseApp/Sales/History/SalesInvoiceHeader.Table.al @@ -1015,6 +1015,12 @@ table 112 "Sales Invoice Header" ToolTip = 'Specifies the telephone number of the company''s shipping address.'; ExtendedDatatype = PhoneNo; } + field(395; "Business Activity Code"; Code[10]) + { + Caption = 'Business Activity Code'; + Editable = false; + TableRelation = "Business Activity".Code; + } /// /// Specifies the unique identifier for the dimension set applied to this document. /// diff --git a/src/Layers/RU/BaseApp/Finance/GeneralLedger/Journal/GenJournalLine.Table.al b/src/Layers/RU/BaseApp/Finance/GeneralLedger/Journal/GenJournalLine.Table.al index 294de8032e2..bb31d9bbbbb 100644 --- a/src/Layers/RU/BaseApp/Finance/GeneralLedger/Journal/GenJournalLine.Table.al +++ b/src/Layers/RU/BaseApp/Finance/GeneralLedger/Journal/GenJournalLine.Table.al @@ -2820,6 +2820,11 @@ table 81 "Gen. Journal Line" Editable = false; FieldClass = FlowField; } + field(395; "Business Activity Code"; Code[10]) + { + Caption = 'Business Activity Code'; + TableRelation = "Business Activity".Code; + } /// /// Dimension set identifier linking to dimension value combinations for analytical reporting and cost center tracking. /// diff --git a/src/Layers/RU/BaseApp/Finance/GeneralLedger/Journal/PostedGenJournalLine.Table.al b/src/Layers/RU/BaseApp/Finance/GeneralLedger/Journal/PostedGenJournalLine.Table.al index 4aec13d2b6a..66ecc478e11 100644 --- a/src/Layers/RU/BaseApp/Finance/GeneralLedger/Journal/PostedGenJournalLine.Table.al +++ b/src/Layers/RU/BaseApp/Finance/GeneralLedger/Journal/PostedGenJournalLine.Table.al @@ -1221,6 +1221,11 @@ table 181 "Posted Gen. Journal Line" Caption = 'Exported to Payment File'; Editable = false; } + field(395; "Business Activity Code"; Code[10]) + { + Caption = 'Business Activity Code'; + TableRelation = "Business Activity".Code; + } /// /// Dimension set identifier linking posted entries to dimension combinations for analytical reporting and financial analysis. /// diff --git a/src/Layers/RU/BaseApp/Finance/GeneralLedger/Setup/GeneralLedgerSetup.Table.al b/src/Layers/RU/BaseApp/Finance/GeneralLedger/Setup/GeneralLedgerSetup.Table.al index b4615e1c2fa..268e7e70718 100644 --- a/src/Layers/RU/BaseApp/Finance/GeneralLedger/Setup/GeneralLedgerSetup.Table.al +++ b/src/Layers/RU/BaseApp/Finance/GeneralLedger/Setup/GeneralLedgerSetup.Table.al @@ -1444,6 +1444,10 @@ table 98 "General Ledger Setup" Caption = 'Use Concurrent Posting'; ToolTip = 'Specifies whether to use concurrent posting when posting journals. Concurrent posting can reduce the time it takes to post journals by allowing multiple batches to be posted at the same time. Enabling this option requires additional configuration and setup, such as setting up a batch job to run the concurrent posting process and ensuring that your system has the necessary resources to support concurrent processing.'; } + field(395; "Use Business Activity Code"; Boolean) + { + Caption = 'Use Business Activity Code'; + } field(12401; "VAT Purch. Ledger No. Series"; Code[20]) { Caption = 'VAT Purch. Ledger No. Series'; diff --git a/src/Layers/RU/BaseApp/Finance/VAT/Ledger/VATEntry.Table.al b/src/Layers/RU/BaseApp/Finance/VAT/Ledger/VATEntry.Table.al index ed3e2fc1f1b..2ddfb47eb06 100644 --- a/src/Layers/RU/BaseApp/Finance/VAT/Ledger/VATEntry.Table.al +++ b/src/Layers/RU/BaseApp/Finance/VAT/Ledger/VATEntry.Table.al @@ -776,6 +776,11 @@ table 254 "VAT Entry" TableRelation = "G/L Register"; ToolTip = 'Specifies the G/L register number that groups related G/L entries from the same posting.'; } + field(395; "Business Activity Code"; Code[10]) + { + Caption = 'Business Activity Code'; + TableRelation = "Business Activity".Code; + } /// /// Percentage of VAT that is non-deductible based on business use or regulatory restrictions. /// diff --git a/src/Layers/RU/BaseApp/Foundation/Company/CompanyInformation.Table.al b/src/Layers/RU/BaseApp/Foundation/Company/CompanyInformation.Table.al index e1ad00d4e07..4607f6223b8 100644 --- a/src/Layers/RU/BaseApp/Foundation/Company/CompanyInformation.Table.al +++ b/src/Layers/RU/BaseApp/Foundation/Company/CompanyInformation.Table.al @@ -8,6 +8,7 @@ using Microsoft.Bank.Setup; using Microsoft.EServices.OnlineMap; using Microsoft.Finance.VAT.Registration; using Microsoft.Foundation.Address; +using Microsoft.Foundation.AuditCodes; using Microsoft.Foundation.Calendar; using Microsoft.Foundation.Enums; using Microsoft.HumanResources.Employee; @@ -466,6 +467,11 @@ table 79 "Company Information" SetBrandColorValue(); end; } + field(395; "Business Activity Code"; Code[10]) + { + Caption = 'Business Activity Code'; + TableRelation = "Business Activity".Code; + } field(5700; "Responsibility Center"; Code[10]) { Caption = 'Responsibility Center'; @@ -1196,4 +1202,4 @@ table 79 "Company Information" begin end; -} +} \ No newline at end of file diff --git a/src/Layers/RU/BaseApp/Purchases/Archive/PurchaseHeaderArchive.Table.al b/src/Layers/RU/BaseApp/Purchases/Archive/PurchaseHeaderArchive.Table.al index 7429dadf9e9..82d65a0690a 100644 --- a/src/Layers/RU/BaseApp/Purchases/Archive/PurchaseHeaderArchive.Table.al +++ b/src/Layers/RU/BaseApp/Purchases/Archive/PurchaseHeaderArchive.Table.al @@ -742,6 +742,11 @@ table 5109 "Purchase Header Archive" ToolTip = 'Specifies the telephone number of the company''s shipping address.'; ExtendedDatatype = PhoneNo; } + field(395; "Business Activity Code"; Code[10]) + { + Caption = 'Business Activity Code'; + TableRelation = "Business Activity".Code; + } field(480; "Dimension Set ID"; Integer) { Caption = 'Dimension Set ID'; @@ -750,7 +755,7 @@ table 5109 "Purchase Header Archive" trigger OnLookup() begin - ShowDimensions(); + Rec.ShowDimensions(); end; } field(3998; "Source Doc. Exists"; Boolean) diff --git a/src/Layers/RU/BaseApp/Purchases/Document/PurchaseHeader.Table.al b/src/Layers/RU/BaseApp/Purchases/Document/PurchaseHeader.Table.al index 375f3311cc0..234c2072a8d 100644 --- a/src/Layers/RU/BaseApp/Purchases/Document/PurchaseHeader.Table.al +++ b/src/Layers/RU/BaseApp/Purchases/Document/PurchaseHeader.Table.al @@ -2321,6 +2321,11 @@ table 38 "Purchase Header" FieldClass = FlowField; AutoFormatType = 1; } + field(395; "Business Activity Code"; Code[10]) + { + Caption = 'Business Activity Code'; + TableRelation = "Business Activity".Code; + } field(480; "Dimension Set ID"; Integer) { Caption = 'Dimension Set ID'; diff --git a/src/Layers/RU/BaseApp/Purchases/History/PurchCrMemoHdr.Table.al b/src/Layers/RU/BaseApp/Purchases/History/PurchCrMemoHdr.Table.al index c2c927e5d5f..245d83039d4 100644 --- a/src/Layers/RU/BaseApp/Purchases/History/PurchCrMemoHdr.Table.al +++ b/src/Layers/RU/BaseApp/Purchases/History/PurchCrMemoHdr.Table.al @@ -567,6 +567,12 @@ table 124 "Purch. Cr. Memo Hdr." ToolTip = 'Specifies the telephone number of the company''s shipping address.'; ExtendedDatatype = PhoneNo; } + field(395; "Business Activity Code"; Code[10]) + { + Caption = 'Business Activity Code'; + Editable = false; + TableRelation = "Business Activity".Code; + } field(480; "Dimension Set ID"; Integer) { Caption = 'Dimension Set ID'; diff --git a/src/Layers/RU/BaseApp/Purchases/History/PurchInvHeader.Table.al b/src/Layers/RU/BaseApp/Purchases/History/PurchInvHeader.Table.al index fd400b5d57c..2f12ba9b139 100644 --- a/src/Layers/RU/BaseApp/Purchases/History/PurchInvHeader.Table.al +++ b/src/Layers/RU/BaseApp/Purchases/History/PurchInvHeader.Table.al @@ -616,6 +616,12 @@ table 122 "Purch. Inv. Header" ToolTip = 'Specifies the telephone number of the company''s shipping address.'; ExtendedDatatype = PhoneNo; } + field(395; "Business Activity Code"; Code[10]) + { + Caption = 'Business Activity Code'; + Editable = false; + TableRelation = "Business Activity".Code; + } field(480; "Dimension Set ID"; Integer) { Caption = 'Dimension Set ID'; diff --git a/src/Layers/RU/BaseApp/Sales/Archive/SalesHeaderArchive.Table.al b/src/Layers/RU/BaseApp/Sales/Archive/SalesHeaderArchive.Table.al index 96e83ffa147..9b3f35ea71a 100644 --- a/src/Layers/RU/BaseApp/Sales/Archive/SalesHeaderArchive.Table.al +++ b/src/Layers/RU/BaseApp/Sales/Archive/SalesHeaderArchive.Table.al @@ -1189,6 +1189,11 @@ table 5107 "Sales Header Archive" ExtendedDatatype = PhoneNo; ToolTip = 'Specifies the telephone number of the company''s shipping address.'; } + field(395; "Business Activity Code"; Code[10]) + { + Caption = 'Business Activity Code'; + TableRelation = "Business Activity".Code; + } /// /// Specifies the unique identifier for the combination of dimension values assigned to this document. /// diff --git a/src/Layers/RU/BaseApp/Sales/Document/SalesHeader.Table.al b/src/Layers/RU/BaseApp/Sales/Document/SalesHeader.Table.al index ba1098b16a8..4ac660943ed 100644 --- a/src/Layers/RU/BaseApp/Sales/Document/SalesHeader.Table.al +++ b/src/Layers/RU/BaseApp/Sales/Document/SalesHeader.Table.al @@ -2947,6 +2947,11 @@ table 36 "Sales Header" Editable = false; FieldClass = FlowField; } + field(395; "Business Activity Code"; Code[10]) + { + Caption = 'Business Activity Code'; + TableRelation = "Business Activity".Code; + } /// /// Specifies the identifier for the combination of dimensions applied to the document. /// diff --git a/src/Layers/RU/BaseApp/Sales/History/SalesCrMemoHeader.Table.al b/src/Layers/RU/BaseApp/Sales/History/SalesCrMemoHeader.Table.al index 4ee73b1c5d0..14ce933a605 100644 --- a/src/Layers/RU/BaseApp/Sales/History/SalesCrMemoHeader.Table.al +++ b/src/Layers/RU/BaseApp/Sales/History/SalesCrMemoHeader.Table.al @@ -941,6 +941,12 @@ table 114 "Sales Cr.Memo Header" ToolTip = 'Specifies the telephone number of the company''s shipping address.'; ExtendedDatatype = PhoneNo; } + field(395; "Business Activity Code"; Code[10]) + { + Caption = 'Business Activity Code'; + Editable = false; + TableRelation = "Business Activity".Code; + } /// /// Specifies the unique identifier for the dimension set applied to this credit memo. /// diff --git a/src/Layers/RU/BaseApp/Sales/History/SalesInvoiceHeader.Table.al b/src/Layers/RU/BaseApp/Sales/History/SalesInvoiceHeader.Table.al index a508579e9c6..0d6b0818517 100644 --- a/src/Layers/RU/BaseApp/Sales/History/SalesInvoiceHeader.Table.al +++ b/src/Layers/RU/BaseApp/Sales/History/SalesInvoiceHeader.Table.al @@ -1016,6 +1016,12 @@ table 112 "Sales Invoice Header" ToolTip = 'Specifies the telephone number of the company''s shipping address.'; ExtendedDatatype = PhoneNo; } + field(395; "Business Activity Code"; Code[10]) + { + Caption = 'Business Activity Code'; + Editable = false; + TableRelation = "Business Activity".Code; + } /// /// Specifies the unique identifier for the dimension set applied to this document. /// diff --git a/src/Layers/SE/BaseApp/Finance/GeneralLedger/Journal/GenJournalLine.Table.al b/src/Layers/SE/BaseApp/Finance/GeneralLedger/Journal/GenJournalLine.Table.al index ea17c40685f..fb128e9623e 100644 --- a/src/Layers/SE/BaseApp/Finance/GeneralLedger/Journal/GenJournalLine.Table.al +++ b/src/Layers/SE/BaseApp/Finance/GeneralLedger/Journal/GenJournalLine.Table.al @@ -2749,6 +2749,11 @@ table 81 "Gen. Journal Line" Editable = false; FieldClass = FlowField; } + field(395; "Business Activity Code"; Code[10]) + { + Caption = 'Business Activity Code'; + TableRelation = "Business Activity".Code; + } /// /// Dimension set identifier linking to dimension value combinations for analytical reporting and cost center tracking. /// diff --git a/src/Layers/SE/BaseApp/Finance/GeneralLedger/Journal/PostedGenJournalLine.Table.al b/src/Layers/SE/BaseApp/Finance/GeneralLedger/Journal/PostedGenJournalLine.Table.al index 6cf727c38d2..325b685740f 100644 --- a/src/Layers/SE/BaseApp/Finance/GeneralLedger/Journal/PostedGenJournalLine.Table.al +++ b/src/Layers/SE/BaseApp/Finance/GeneralLedger/Journal/PostedGenJournalLine.Table.al @@ -1223,6 +1223,11 @@ table 181 "Posted Gen. Journal Line" Caption = 'Exported to Payment File'; Editable = false; } + field(395; "Business Activity Code"; Code[10]) + { + Caption = 'Business Activity Code'; + TableRelation = "Business Activity".Code; + } /// /// Dimension set identifier linking posted entries to dimension combinations for analytical reporting and financial analysis. /// diff --git a/src/Layers/SE/BaseApp/Finance/GeneralLedger/Setup/GeneralLedgerSetup.Table.al b/src/Layers/SE/BaseApp/Finance/GeneralLedger/Setup/GeneralLedgerSetup.Table.al index 8788ebcb322..82f8757cb99 100644 --- a/src/Layers/SE/BaseApp/Finance/GeneralLedger/Setup/GeneralLedgerSetup.Table.al +++ b/src/Layers/SE/BaseApp/Finance/GeneralLedger/Setup/GeneralLedgerSetup.Table.al @@ -1442,6 +1442,10 @@ table 98 "General Ledger Setup" Caption = 'Use Concurrent Posting'; ToolTip = 'Specifies whether to use concurrent posting when posting journals. Concurrent posting can reduce the time it takes to post journals by allowing multiple batches to be posted at the same time. Enabling this option requires additional configuration and setup, such as setting up a batch job to run the concurrent posting process and ensuring that your system has the necessary resources to support concurrent processing.'; } + field(395; "Use Business Activity Code"; Boolean) + { + Caption = 'Use Business Activity Code'; + } } keys diff --git a/src/Layers/SE/BaseApp/Finance/VAT/Reporting/VATStatementLine.Table.al b/src/Layers/SE/BaseApp/Finance/VAT/Reporting/VATStatementLine.Table.al index 8aa6a1217df..e344b7bb637 100644 --- a/src/Layers/SE/BaseApp/Finance/VAT/Reporting/VATStatementLine.Table.al +++ b/src/Layers/SE/BaseApp/Finance/VAT/Reporting/VATStatementLine.Table.al @@ -1,4 +1,4 @@ -// ------------------------------------------------------------------------------------------------ +// ------------------------------------------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. // ------------------------------------------------------------------------------------------------ @@ -220,7 +220,6 @@ table 256 "VAT Statement Line" Caption = 'Box No.'; ToolTip = 'Specifies the number on the box that the VAT statement applies to.'; } - #if not CLEANSCHEMA26 field(11200; "EU 3-Party Trade"; Boolean) { diff --git a/src/Layers/SE/BaseApp/Foundation/Company/CompanyInformation.Table.al b/src/Layers/SE/BaseApp/Foundation/Company/CompanyInformation.Table.al index b27040b74a2..8b2633e155f 100644 --- a/src/Layers/SE/BaseApp/Foundation/Company/CompanyInformation.Table.al +++ b/src/Layers/SE/BaseApp/Foundation/Company/CompanyInformation.Table.al @@ -8,6 +8,7 @@ using Microsoft.Bank.Setup; using Microsoft.EServices.OnlineMap; using Microsoft.Finance.VAT.Registration; using Microsoft.Foundation.Address; +using Microsoft.Foundation.AuditCodes; using Microsoft.Foundation.Calendar; using Microsoft.Foundation.Enums; using Microsoft.Inventory.Item; @@ -465,6 +466,11 @@ table 79 "Company Information" SetBrandColorValue(); end; } + field(395; "Business Activity Code"; Code[10]) + { + Caption = 'Business Activity Code'; + TableRelation = "Business Activity".Code; + } field(5700; "Responsibility Center"; Code[10]) { Caption = 'Responsibility Center'; @@ -882,4 +888,4 @@ table 79 "Company Information" begin end; -} +} \ No newline at end of file diff --git a/src/Layers/SE/BaseApp/Purchases/Document/PurchaseHeader.Table.al b/src/Layers/SE/BaseApp/Purchases/Document/PurchaseHeader.Table.al index d555836661b..97e83b96154 100644 --- a/src/Layers/SE/BaseApp/Purchases/Document/PurchaseHeader.Table.al +++ b/src/Layers/SE/BaseApp/Purchases/Document/PurchaseHeader.Table.al @@ -2312,6 +2312,11 @@ table 38 "Purchase Header" FieldClass = FlowField; AutoFormatType = 1; } + field(395; "Business Activity Code"; Code[10]) + { + Caption = 'Business Activity Code'; + TableRelation = "Business Activity".Code; + } field(480; "Dimension Set ID"; Integer) { Caption = 'Dimension Set ID'; diff --git a/src/Layers/SE/BaseApp/Purchases/History/PurchCrMemoHdr.Table.al b/src/Layers/SE/BaseApp/Purchases/History/PurchCrMemoHdr.Table.al index ccbd0059b13..7610bf1c158 100644 --- a/src/Layers/SE/BaseApp/Purchases/History/PurchCrMemoHdr.Table.al +++ b/src/Layers/SE/BaseApp/Purchases/History/PurchCrMemoHdr.Table.al @@ -566,6 +566,12 @@ table 124 "Purch. Cr. Memo Hdr." ToolTip = 'Specifies the telephone number of the company''s shipping address.'; ExtendedDatatype = PhoneNo; } + field(395; "Business Activity Code"; Code[10]) + { + Caption = 'Business Activity Code'; + Editable = false; + TableRelation = "Business Activity".Code; + } field(480; "Dimension Set ID"; Integer) { Caption = 'Dimension Set ID'; diff --git a/src/Layers/SE/BaseApp/Purchases/History/PurchInvHeader.Table.al b/src/Layers/SE/BaseApp/Purchases/History/PurchInvHeader.Table.al index 5ab1e10e801..5bdb75519d2 100644 --- a/src/Layers/SE/BaseApp/Purchases/History/PurchInvHeader.Table.al +++ b/src/Layers/SE/BaseApp/Purchases/History/PurchInvHeader.Table.al @@ -615,6 +615,12 @@ table 122 "Purch. Inv. Header" ToolTip = 'Specifies the telephone number of the company''s shipping address.'; ExtendedDatatype = PhoneNo; } + field(395; "Business Activity Code"; Code[10]) + { + Caption = 'Business Activity Code'; + Editable = false; + TableRelation = "Business Activity".Code; + } field(480; "Dimension Set ID"; Integer) { Caption = 'Dimension Set ID'; diff --git a/src/Layers/SE/BaseApp/Sales/Document/SalesHeader.Table.al b/src/Layers/SE/BaseApp/Sales/Document/SalesHeader.Table.al index 550bc2503dd..8cab29a4ca4 100644 --- a/src/Layers/SE/BaseApp/Sales/Document/SalesHeader.Table.al +++ b/src/Layers/SE/BaseApp/Sales/Document/SalesHeader.Table.al @@ -2931,6 +2931,11 @@ table 36 "Sales Header" Editable = false; FieldClass = FlowField; } + field(395; "Business Activity Code"; Code[10]) + { + Caption = 'Business Activity Code'; + TableRelation = "Business Activity".Code; + } /// /// Specifies the identifier for the combination of dimensions applied to the document. /// diff --git a/src/Layers/SE/BaseApp/Sales/History/SalesCrMemoHeader.Table.al b/src/Layers/SE/BaseApp/Sales/History/SalesCrMemoHeader.Table.al index 0e24531a521..ea934070d53 100644 --- a/src/Layers/SE/BaseApp/Sales/History/SalesCrMemoHeader.Table.al +++ b/src/Layers/SE/BaseApp/Sales/History/SalesCrMemoHeader.Table.al @@ -939,6 +939,12 @@ table 114 "Sales Cr.Memo Header" ToolTip = 'Specifies the telephone number of the company''s shipping address.'; ExtendedDatatype = PhoneNo; } + field(395; "Business Activity Code"; Code[10]) + { + Caption = 'Business Activity Code'; + Editable = false; + TableRelation = "Business Activity".Code; + } /// /// Specifies the unique identifier for the dimension set applied to this credit memo. /// diff --git a/src/Layers/SE/BaseApp/Sales/History/SalesInvoiceHeader.Table.al b/src/Layers/SE/BaseApp/Sales/History/SalesInvoiceHeader.Table.al index 075c57ac74b..6b3c163d7cb 100644 --- a/src/Layers/SE/BaseApp/Sales/History/SalesInvoiceHeader.Table.al +++ b/src/Layers/SE/BaseApp/Sales/History/SalesInvoiceHeader.Table.al @@ -1014,6 +1014,12 @@ table 112 "Sales Invoice Header" ToolTip = 'Specifies the telephone number of the company''s shipping address.'; ExtendedDatatype = PhoneNo; } + field(395; "Business Activity Code"; Code[10]) + { + Caption = 'Business Activity Code'; + Editable = false; + TableRelation = "Business Activity".Code; + } /// /// Specifies the unique identifier for the dimension set applied to this document. /// diff --git a/src/Layers/W1/BaseApp/Finance/GeneralLedger/Journal/GenJournalLine.Table.al b/src/Layers/W1/BaseApp/Finance/GeneralLedger/Journal/GenJournalLine.Table.al index c6d568df999..be8fc2c0ea7 100644 --- a/src/Layers/W1/BaseApp/Finance/GeneralLedger/Journal/GenJournalLine.Table.al +++ b/src/Layers/W1/BaseApp/Finance/GeneralLedger/Journal/GenJournalLine.Table.al @@ -2748,6 +2748,11 @@ table 81 "Gen. Journal Line" Editable = false; FieldClass = FlowField; } + field(395; "Business Activity Code"; Code[10]) + { + Caption = 'Business Activity Code'; + TableRelation = "Business Activity".Code; + } /// /// Dimension set identifier linking to dimension value combinations for analytical reporting and cost center tracking. /// diff --git a/src/Layers/W1/BaseApp/Finance/GeneralLedger/Journal/PostedGenJournalLine.Table.al b/src/Layers/W1/BaseApp/Finance/GeneralLedger/Journal/PostedGenJournalLine.Table.al index fec6d6bcf38..f8e383233a9 100644 --- a/src/Layers/W1/BaseApp/Finance/GeneralLedger/Journal/PostedGenJournalLine.Table.al +++ b/src/Layers/W1/BaseApp/Finance/GeneralLedger/Journal/PostedGenJournalLine.Table.al @@ -1222,6 +1222,11 @@ table 181 "Posted Gen. Journal Line" Caption = 'Exported to Payment File'; Editable = false; } + field(395; "Business Activity Code"; Code[10]) + { + Caption = 'Business Activity Code'; + TableRelation = "Business Activity".Code; + } /// /// Dimension set identifier linking posted entries to dimension combinations for analytical reporting and financial analysis. /// diff --git a/src/Layers/W1/BaseApp/Finance/GeneralLedger/Setup/GeneralLedgerSetup.Table.al b/src/Layers/W1/BaseApp/Finance/GeneralLedger/Setup/GeneralLedgerSetup.Table.al index 8788ebcb322..82f8757cb99 100644 --- a/src/Layers/W1/BaseApp/Finance/GeneralLedger/Setup/GeneralLedgerSetup.Table.al +++ b/src/Layers/W1/BaseApp/Finance/GeneralLedger/Setup/GeneralLedgerSetup.Table.al @@ -1442,6 +1442,10 @@ table 98 "General Ledger Setup" Caption = 'Use Concurrent Posting'; ToolTip = 'Specifies whether to use concurrent posting when posting journals. Concurrent posting can reduce the time it takes to post journals by allowing multiple batches to be posted at the same time. Enabling this option requires additional configuration and setup, such as setting up a batch job to run the concurrent posting process and ensuring that your system has the necessary resources to support concurrent processing.'; } + field(395; "Use Business Activity Code"; Boolean) + { + Caption = 'Use Business Activity Code'; + } } keys diff --git a/src/Layers/W1/BaseApp/Finance/VAT/Ledger/VATEntry.Table.al b/src/Layers/W1/BaseApp/Finance/VAT/Ledger/VATEntry.Table.al index 035e77c8fc9..2b8d1c0cca1 100644 --- a/src/Layers/W1/BaseApp/Finance/VAT/Ledger/VATEntry.Table.al +++ b/src/Layers/W1/BaseApp/Finance/VAT/Ledger/VATEntry.Table.al @@ -771,6 +771,11 @@ table 254 "VAT Entry" TableRelation = "G/L Register"; ToolTip = 'Specifies the G/L register number that groups related G/L entries from the same posting.'; } + field(395; "Business Activity Code"; Code[10]) + { + Caption = 'Business Activity Code'; + TableRelation = "Business Activity".Code; + } /// /// Percentage of VAT that is non-deductible based on business use or regulatory restrictions. /// diff --git a/src/Layers/W1/BaseApp/Finance/VAT/Setup/VATSetup.Page.al b/src/Layers/W1/BaseApp/Finance/VAT/Setup/VATSetup.Page.al index b17223f22cc..a3b7c5033bf 100644 --- a/src/Layers/W1/BaseApp/Finance/VAT/Setup/VATSetup.Page.al +++ b/src/Layers/W1/BaseApp/Finance/VAT/Setup/VATSetup.Page.al @@ -252,7 +252,6 @@ page 187 "VAT Setup" end; end; - var IsVATDateEnabled: Boolean; } diff --git a/src/Layers/W1/BaseApp/Foundation/AuditCodes/BusActivityValidatorDef.Codeunit.al b/src/Layers/W1/BaseApp/Foundation/AuditCodes/BusActivityValidatorDef.Codeunit.al new file mode 100644 index 00000000000..2e74f90f4aa --- /dev/null +++ b/src/Layers/W1/BaseApp/Foundation/AuditCodes/BusActivityValidatorDef.Codeunit.al @@ -0,0 +1,12 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Foundation.AuditCodes; + +codeunit 555 "Bus. Activity Validator Def." implements "Business Activity Validator" +{ + procedure Validate(Code: Code[10]) + begin + end; +} \ No newline at end of file diff --git a/src/Layers/W1/BaseApp/Foundation/AuditCodes/BusinessActivities.Page.al b/src/Layers/W1/BaseApp/Foundation/AuditCodes/BusinessActivities.Page.al new file mode 100644 index 00000000000..b698eaf49a6 --- /dev/null +++ b/src/Layers/W1/BaseApp/Foundation/AuditCodes/BusinessActivities.Page.al @@ -0,0 +1,35 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Foundation.AuditCodes; + +page 410 "Business Activities" +{ + ApplicationArea = Basic, Suite; + Caption = 'Business Activities'; + PageType = List; + SourceTable = "Business Activity"; + UsageCategory = Lists; + + layout + { + area(Content) + { + repeater(Control1) + { + ShowCaption = false; + field(Code; Rec.Code) + { + ApplicationArea = All; + ToolTip = 'Specifies the code that identifies the company''s business activity.'; + } + field(Description; Rec.Description) + { + ApplicationArea = All; + ToolTip = 'Specifies a description of the business activity code.'; + } + } + } + } +} \ No newline at end of file diff --git a/src/Layers/W1/BaseApp/Foundation/AuditCodes/BusinessActivity.Table.al b/src/Layers/W1/BaseApp/Foundation/AuditCodes/BusinessActivity.Table.al new file mode 100644 index 00000000000..7bf7b07cc16 --- /dev/null +++ b/src/Layers/W1/BaseApp/Foundation/AuditCodes/BusinessActivity.Table.al @@ -0,0 +1,40 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Foundation.AuditCodes; + +table 395 "Business Activity" +{ + Caption = 'Business Activity Code'; + DataClassification = CustomerContent; + LookupPageID = "Business Activities"; + + fields + { + field(1; Code; Code[10]) + { + Caption = 'Code'; + NotBlank = true; + + trigger OnValidate() + var + BusinessActivityCodeMgt: Codeunit "Business Activity Code Mgt."; + begin + BusinessActivityCodeMgt.Validate(Code); + end; + } + field(2; Description; Text[100]) + { + Caption = 'Description'; + } + } + + keys + { + key(Key1; Code) + { + Clustered = true; + } + } +} \ No newline at end of file diff --git a/src/Layers/W1/BaseApp/Foundation/AuditCodes/BusinessActivityCodeMgt.Codeunit.al b/src/Layers/W1/BaseApp/Foundation/AuditCodes/BusinessActivityCodeMgt.Codeunit.al new file mode 100644 index 00000000000..77782b94604 --- /dev/null +++ b/src/Layers/W1/BaseApp/Foundation/AuditCodes/BusinessActivityCodeMgt.Codeunit.al @@ -0,0 +1,33 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Foundation.AuditCodes; + +using Microsoft.Foundation.Company; + +codeunit 12102 "Business Activity Code Mgt." +{ + procedure Validate(Code: Code[10]) + var + CompanyInformation: Record "Company Information"; + BusActivityValidatorDef: Codeunit "Bus. Activity Validator Def."; + BusinessActivityValidator: Interface "Business Activity Validator"; + IsHandled: Boolean; + begin + if Code = '' then + exit; + + CompanyInformation.Get(); + OnGetValidator(CompanyInformation."Country/Region Code", BusinessActivityValidator, IsHandled); + if not IsHandled then + BusinessActivityValidator := BusActivityValidatorDef; + + BusinessActivityValidator.Validate(Code); + end; + + [IntegrationEvent(false, false)] + internal procedure OnGetValidator(CountryRegionCode: Code[10]; var BusinessActivityValidator: Interface "Business Activity Validator"; var IsHandled: Boolean) + begin + end; +} \ No newline at end of file diff --git a/src/Layers/W1/BaseApp/Foundation/AuditCodes/BusinessActivityValidator.Interface.al b/src/Layers/W1/BaseApp/Foundation/AuditCodes/BusinessActivityValidator.Interface.al new file mode 100644 index 00000000000..0ba2cfa5045 --- /dev/null +++ b/src/Layers/W1/BaseApp/Foundation/AuditCodes/BusinessActivityValidator.Interface.al @@ -0,0 +1,10 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Foundation.AuditCodes; + +interface "Business Activity Validator" +{ + procedure Validate(Code: Code[10]); +} \ No newline at end of file diff --git a/src/Layers/W1/BaseApp/Foundation/Company/CompanyInformation.Table.al b/src/Layers/W1/BaseApp/Foundation/Company/CompanyInformation.Table.al index e9ebc49f5cc..cf592f24974 100644 --- a/src/Layers/W1/BaseApp/Foundation/Company/CompanyInformation.Table.al +++ b/src/Layers/W1/BaseApp/Foundation/Company/CompanyInformation.Table.al @@ -8,6 +8,7 @@ using Microsoft.Bank.Setup; using Microsoft.EServices.OnlineMap; using Microsoft.Finance.VAT.Registration; using Microsoft.Foundation.Address; +using Microsoft.Foundation.AuditCodes; using Microsoft.Foundation.Calendar; using Microsoft.Foundation.Enums; using Microsoft.Inventory.Item; @@ -464,6 +465,11 @@ table 79 "Company Information" SetBrandColorValue(); end; } + field(395; "Business Activity Code"; Code[10]) + { + Caption = 'Business Activity Code'; + TableRelation = "Business Activity".Code; + } field(5700; "Responsibility Center"; Code[10]) { Caption = 'Responsibility Center'; diff --git a/src/Layers/W1/BaseApp/Purchases/Archive/PurchaseHeaderArchive.Table.al b/src/Layers/W1/BaseApp/Purchases/Archive/PurchaseHeaderArchive.Table.al index 07a783aa704..3b19c706080 100644 --- a/src/Layers/W1/BaseApp/Purchases/Archive/PurchaseHeaderArchive.Table.al +++ b/src/Layers/W1/BaseApp/Purchases/Archive/PurchaseHeaderArchive.Table.al @@ -741,6 +741,11 @@ table 5109 "Purchase Header Archive" ToolTip = 'Specifies the telephone number of the company''s shipping address.'; ExtendedDatatype = PhoneNo; } + field(395; "Business Activity Code"; Code[10]) + { + Caption = 'Business Activity Code'; + TableRelation = "Business Activity".Code; + } field(480; "Dimension Set ID"; Integer) { Caption = 'Dimension Set ID'; diff --git a/src/Layers/W1/BaseApp/Purchases/Document/PurchaseHeader.Table.al b/src/Layers/W1/BaseApp/Purchases/Document/PurchaseHeader.Table.al index 47c629ab9d0..0ca17397a8d 100644 --- a/src/Layers/W1/BaseApp/Purchases/Document/PurchaseHeader.Table.al +++ b/src/Layers/W1/BaseApp/Purchases/Document/PurchaseHeader.Table.al @@ -2312,6 +2312,11 @@ table 38 "Purchase Header" FieldClass = FlowField; AutoFormatType = 1; } + field(395; "Business Activity Code"; Code[10]) + { + Caption = 'Business Activity Code'; + TableRelation = "Business Activity".Code; + } field(480; "Dimension Set ID"; Integer) { Caption = 'Dimension Set ID'; diff --git a/src/Layers/W1/BaseApp/Purchases/History/PurchCrMemoHdr.Table.al b/src/Layers/W1/BaseApp/Purchases/History/PurchCrMemoHdr.Table.al index d81b440a5a0..7e4810686f5 100644 --- a/src/Layers/W1/BaseApp/Purchases/History/PurchCrMemoHdr.Table.al +++ b/src/Layers/W1/BaseApp/Purchases/History/PurchCrMemoHdr.Table.al @@ -566,6 +566,12 @@ table 124 "Purch. Cr. Memo Hdr." ToolTip = 'Specifies the telephone number of the company''s shipping address.'; ExtendedDatatype = PhoneNo; } + field(395; "Business Activity Code"; Code[10]) + { + Caption = 'Business Activity Code'; + Editable = false; + TableRelation = "Business Activity".Code; + } field(480; "Dimension Set ID"; Integer) { Caption = 'Dimension Set ID'; diff --git a/src/Layers/W1/BaseApp/Purchases/History/PurchInvHeader.Table.al b/src/Layers/W1/BaseApp/Purchases/History/PurchInvHeader.Table.al index d50658038fd..82b0d442ba8 100644 --- a/src/Layers/W1/BaseApp/Purchases/History/PurchInvHeader.Table.al +++ b/src/Layers/W1/BaseApp/Purchases/History/PurchInvHeader.Table.al @@ -615,6 +615,12 @@ table 122 "Purch. Inv. Header" ToolTip = 'Specifies the telephone number of the company''s shipping address.'; ExtendedDatatype = PhoneNo; } + field(395; "Business Activity Code"; Code[10]) + { + Caption = 'Business Activity Code'; + Editable = false; + TableRelation = "Business Activity".Code; + } field(480; "Dimension Set ID"; Integer) { Caption = 'Dimension Set ID'; diff --git a/src/Layers/W1/BaseApp/Sales/Archive/SalesHeaderArchive.Table.al b/src/Layers/W1/BaseApp/Sales/Archive/SalesHeaderArchive.Table.al index ab02f5b09c9..0d19a53bdfe 100644 --- a/src/Layers/W1/BaseApp/Sales/Archive/SalesHeaderArchive.Table.al +++ b/src/Layers/W1/BaseApp/Sales/Archive/SalesHeaderArchive.Table.al @@ -1189,6 +1189,11 @@ table 5107 "Sales Header Archive" ExtendedDatatype = PhoneNo; ToolTip = 'Specifies the telephone number of the company''s shipping address.'; } + field(395; "Business Activity Code"; Code[10]) + { + Caption = 'Business Activity Code'; + TableRelation = "Business Activity".Code; + } /// /// Specifies the unique identifier for the combination of dimension values assigned to this document. /// diff --git a/src/Layers/W1/BaseApp/Sales/Document/SalesHeader.Table.al b/src/Layers/W1/BaseApp/Sales/Document/SalesHeader.Table.al index a3416266fcd..68169b80598 100644 --- a/src/Layers/W1/BaseApp/Sales/Document/SalesHeader.Table.al +++ b/src/Layers/W1/BaseApp/Sales/Document/SalesHeader.Table.al @@ -2931,6 +2931,11 @@ table 36 "Sales Header" Editable = false; FieldClass = FlowField; } + field(395; "Business Activity Code"; Code[10]) + { + Caption = 'Business Activity Code'; + TableRelation = "Business Activity".Code; + } /// /// Specifies the identifier for the combination of dimensions applied to the document. /// diff --git a/src/Layers/W1/BaseApp/Sales/FinanceCharge/FinanceChargeMemoHeader.Table.al b/src/Layers/W1/BaseApp/Sales/FinanceCharge/FinanceChargeMemoHeader.Table.al index 802a6889a41..22a8d5e648a 100644 --- a/src/Layers/W1/BaseApp/Sales/FinanceCharge/FinanceChargeMemoHeader.Table.al +++ b/src/Layers/W1/BaseApp/Sales/FinanceCharge/FinanceChargeMemoHeader.Table.al @@ -582,6 +582,11 @@ table 302 "Finance Charge Memo Header" ToolTip = 'Specifies the bank account to use for bank information when the document is printed.'; TableRelation = "Bank Account" where("Currency Code" = field("Currency Code")); } + field(395; "Business Activity Code"; Code[10]) + { + Caption = 'Business Activity Code'; + TableRelation = "Business Activity".Code; + } /// /// Specifies the unique identifier for the combination of dimension values assigned to this memo. /// @@ -654,9 +659,9 @@ table 302 "Finance Charge Memo Header" 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"); + if NoSeries.AreRelated("No. Series", xRec."No. Series") then + "No. Series" := xRec."No. Series"; + "No." := NoSeries.GetNextNo("No. Series", "Posting Date"); end; "Posting Description" := StrSubstNo(Text000, "No."); @@ -669,8 +674,8 @@ table 302 "Finance Charge Memo Header" then "Issuing No. Series" := "No. Series" else - if NoSeries.IsAutomatic(GetIssuingNoSeriesCode()) then - "Issuing No. Series" := GetIssuingNoSeriesCode(); + if NoSeries.IsAutomatic(GetIssuingNoSeriesCode()) then + "Issuing No. Series" := GetIssuingNoSeriesCode(); if "Posting Date" = 0D then "Posting Date" := WorkDate(); diff --git a/src/Layers/W1/BaseApp/Sales/FinanceCharge/IssuedFinChargeMemoHeader.Table.al b/src/Layers/W1/BaseApp/Sales/FinanceCharge/IssuedFinChargeMemoHeader.Table.al index 426a52e8243..ba18d155bcc 100644 --- a/src/Layers/W1/BaseApp/Sales/FinanceCharge/IssuedFinChargeMemoHeader.Table.al +++ b/src/Layers/W1/BaseApp/Sales/FinanceCharge/IssuedFinChargeMemoHeader.Table.al @@ -457,6 +457,11 @@ table 304 "Issued Fin. Charge Memo Header" ToolTip = 'Specifies the bank account to use for bank information when the document is printed.'; TableRelation = "Bank Account" where("Currency Code" = field("Currency Code")); } + field(395; "Business Activity Code"; Code[10]) + { + Caption = 'Business Activity Code'; + TableRelation = "Business Activity".Code; + } /// /// Specifies the unique identifier for the dimension values assigned to this memo. /// diff --git a/src/Layers/W1/BaseApp/Sales/History/SalesCrMemoHeader.Table.al b/src/Layers/W1/BaseApp/Sales/History/SalesCrMemoHeader.Table.al index 159def49a5a..f6f71ce36fc 100644 --- a/src/Layers/W1/BaseApp/Sales/History/SalesCrMemoHeader.Table.al +++ b/src/Layers/W1/BaseApp/Sales/History/SalesCrMemoHeader.Table.al @@ -939,6 +939,12 @@ table 114 "Sales Cr.Memo Header" ToolTip = 'Specifies the telephone number of the company''s shipping address.'; ExtendedDatatype = PhoneNo; } + field(395; "Business Activity Code"; Code[10]) + { + Caption = 'Business Activity Code'; + Editable = false; + TableRelation = "Business Activity".Code; + } /// /// Specifies the unique identifier for the dimension set applied to this credit memo. /// diff --git a/src/Layers/W1/BaseApp/Sales/History/SalesInvoiceHeader.Table.al b/src/Layers/W1/BaseApp/Sales/History/SalesInvoiceHeader.Table.al index a6552113fc6..662403669ba 100644 --- a/src/Layers/W1/BaseApp/Sales/History/SalesInvoiceHeader.Table.al +++ b/src/Layers/W1/BaseApp/Sales/History/SalesInvoiceHeader.Table.al @@ -1015,6 +1015,12 @@ table 112 "Sales Invoice Header" ToolTip = 'Specifies the telephone number of the company''s shipping address.'; ExtendedDatatype = PhoneNo; } + field(395; "Business Activity Code"; Code[10]) + { + Caption = 'Business Activity Code'; + Editable = false; + TableRelation = "Business Activity".Code; + } /// /// Specifies the unique identifier for the dimension set applied to this document. /// diff --git a/src/Layers/W1/BaseApp/Service/Archive/ServiceHeaderArchive.Table.al b/src/Layers/W1/BaseApp/Service/Archive/ServiceHeaderArchive.Table.al index d8fd30ea5dd..a792b9609bb 100644 --- a/src/Layers/W1/BaseApp/Service/Archive/ServiceHeaderArchive.Table.al +++ b/src/Layers/W1/BaseApp/Service/Archive/ServiceHeaderArchive.Table.al @@ -608,6 +608,12 @@ table 6010 "Service Header Archive" Caption = 'Work Description'; DataClassification = CustomerContent; } + field(395; "Business Activity Code"; Code[10]) + { + Caption = 'Business Activity Code'; + DataClassification = CustomerContent; + TableRelation = "Business Activity".Code; + } field(480; "Dimension Set ID"; Integer) { Caption = 'Dimension Set ID'; diff --git a/src/Layers/W1/BaseApp/Service/Archive/ServiceOrderArchive.Page.al b/src/Layers/W1/BaseApp/Service/Archive/ServiceOrderArchive.Page.al index af108e9511f..c7eb3fe66ca 100644 --- a/src/Layers/W1/BaseApp/Service/Archive/ServiceOrderArchive.Page.al +++ b/src/Layers/W1/BaseApp/Service/Archive/ServiceOrderArchive.Page.al @@ -169,6 +169,11 @@ page 6271 "Service Order Archive" ApplicationArea = Suite; Importance = Additional; } + field("Business Activity Code"; Rec."Business Activity Code") + { + ApplicationArea = Service; + ToolTip = 'Specifies the code for the company''s primary activity.'; + } field("Assigned User ID"; Rec."Assigned User ID") { ApplicationArea = Service; diff --git a/src/Layers/W1/BaseApp/Service/Contract/FiledServiceContract.Page.al b/src/Layers/W1/BaseApp/Service/Contract/FiledServiceContract.Page.al index 417fca2c6a8..fe5dd649222 100644 --- a/src/Layers/W1/BaseApp/Service/Contract/FiledServiceContract.Page.al +++ b/src/Layers/W1/BaseApp/Service/Contract/FiledServiceContract.Page.al @@ -118,6 +118,11 @@ page 6072 "Filed Service Contract" { ApplicationArea = Service; } + field("Business Activity Code"; Rec."Business Activity Code") + { + ApplicationArea = Service; + ToolTip = 'Specifies the code for the company''s primary activity.'; + } } part(Control93; "Filed Service Contract Subform") { diff --git a/src/Layers/W1/BaseApp/Service/Contract/FiledServiceContractHeader.Table.al b/src/Layers/W1/BaseApp/Service/Contract/FiledServiceContractHeader.Table.al index 07432797f2f..e580ae1049a 100644 --- a/src/Layers/W1/BaseApp/Service/Contract/FiledServiceContractHeader.Table.al +++ b/src/Layers/W1/BaseApp/Service/Contract/FiledServiceContractHeader.Table.al @@ -620,6 +620,12 @@ table 5970 "Filed Service Contract Header" ToolTip = 'Specifies the telephone number of the company''s shipping address.'; ExtendedDatatype = PhoneNo; } + field(395; "Business Activity Code"; Code[10]) + { + Caption = 'Business Activity Code'; + DataClassification = CustomerContent; + TableRelation = "Business Activity".Code; + } field(480; "Dimension Set ID"; Integer) { Caption = 'Dimension Set ID'; diff --git a/src/Layers/W1/BaseApp/Service/Contract/ServContractManagement.Codeunit.al b/src/Layers/W1/BaseApp/Service/Contract/ServContractManagement.Codeunit.al index 9e1181af336..3154ffac9e3 100644 --- a/src/Layers/W1/BaseApp/Service/Contract/ServContractManagement.Codeunit.al +++ b/src/Layers/W1/BaseApp/Service/Contract/ServContractManagement.Codeunit.al @@ -526,6 +526,7 @@ codeunit 5940 ServContractManagement ServHeader2."Shortcut Dimension 1 Code" := ServContract2."Shortcut Dimension 1 Code"; ServHeader2."Shortcut Dimension 2 Code" := ServContract2."Shortcut Dimension 2 Code"; ServHeader2."Dimension Set ID" := ServContract2."Dimension Set ID"; + ServHeader2."Business Activity Code" := ServContract2."Business Activity Code"; OnBeforeServHeaderModify(ServHeader2, ServContract2); ServHeader2.Modify(); RecordLinkManagement.CopyLinks(ServContract2, ServHeader2); @@ -873,6 +874,7 @@ codeunit 5940 ServContractManagement ServHeader2."Dimension Set ID" := ServContract."Dimension Set ID"; ServHeader2.Validate("Location Code", UserMgt.GetLocation(2, Cust."Location Code", ServContract."Responsibility Center")); + ServHeader2."Business Activity Code" := ServContract."Business Activity Code"; OnBeforeServHeaderModify(ServHeader2, ServContract); ServHeader2.Modify(); diff --git a/src/Layers/W1/BaseApp/Service/Contract/ServiceContract.Page.al b/src/Layers/W1/BaseApp/Service/Contract/ServiceContract.Page.al index 0b78a76852f..421da3b0a9d 100644 --- a/src/Layers/W1/BaseApp/Service/Contract/ServiceContract.Page.al +++ b/src/Layers/W1/BaseApp/Service/Contract/ServiceContract.Page.al @@ -177,6 +177,11 @@ page 6050 "Service Contract" { ApplicationArea = Service; } + field("Business Activity Code"; Rec."Business Activity Code") + { + ApplicationArea = Service; + ToolTip = 'Specifies the code for the company''s primary activity.'; + } } part(ServContractLines; "Service Contract Subform") { diff --git a/src/Layers/W1/BaseApp/Service/Contract/ServiceContractHeader.Table.al b/src/Layers/W1/BaseApp/Service/Contract/ServiceContractHeader.Table.al index 51a9852996d..6da865b9741 100644 --- a/src/Layers/W1/BaseApp/Service/Contract/ServiceContractHeader.Table.al +++ b/src/Layers/W1/BaseApp/Service/Contract/ServiceContractHeader.Table.al @@ -1351,6 +1351,12 @@ table 5965 "Service Contract Header" Editable = false; FieldClass = FlowField; } + field(395; "Business Activity Code"; Code[10]) + { + Caption = 'Business Activity Code'; + DataClassification = CustomerContent; + TableRelation = "Business Activity".Code; + } field(480; "Dimension Set ID"; Integer) { Caption = 'Dimension Set ID'; diff --git a/src/Layers/W1/BaseApp/Service/Document/ServiceCreditMemo.Page.al b/src/Layers/W1/BaseApp/Service/Document/ServiceCreditMemo.Page.al index c85881975d9..c195e838ca8 100644 --- a/src/Layers/W1/BaseApp/Service/Document/ServiceCreditMemo.Page.al +++ b/src/Layers/W1/BaseApp/Service/Document/ServiceCreditMemo.Page.al @@ -168,6 +168,11 @@ page 5935 "Service Credit Memo" { ApplicationArea = Service; } + field("Business Activity Code"; Rec."Business Activity Code") + { + ApplicationArea = Service; + ToolTip = 'Specifies the code for the company''s primary activity.'; + } field("External Document No."; Rec."External Document No.") { ApplicationArea = Service; diff --git a/src/Layers/W1/BaseApp/Service/Document/ServiceHeader.Table.al b/src/Layers/W1/BaseApp/Service/Document/ServiceHeader.Table.al index 335d6ccb09d..8160278f79b 100644 --- a/src/Layers/W1/BaseApp/Service/Document/ServiceHeader.Table.al +++ b/src/Layers/W1/BaseApp/Service/Document/ServiceHeader.Table.al @@ -1813,6 +1813,12 @@ table 5900 "Service Header" Caption = 'Work Description'; DataClassification = CustomerContent; } + field(395; "Business Activity Code"; Code[10]) + { + Caption = 'Business Activity Code'; + DataClassification = CustomerContent; + TableRelation = "Business Activity".Code; + } field(480; "Dimension Set ID"; Integer) { Caption = 'Dimension Set ID'; diff --git a/src/Layers/W1/BaseApp/Service/Document/ServiceInvoice.Page.al b/src/Layers/W1/BaseApp/Service/Document/ServiceInvoice.Page.al index d971be6f2fb..83dd246597f 100644 --- a/src/Layers/W1/BaseApp/Service/Document/ServiceInvoice.Page.al +++ b/src/Layers/W1/BaseApp/Service/Document/ServiceInvoice.Page.al @@ -164,6 +164,11 @@ page 5933 "Service Invoice" { ApplicationArea = Service; } + field("Business Activity Code"; Rec."Business Activity Code") + { + ApplicationArea = Service; + ToolTip = 'Specifies the code for the company''s primary activity.'; + } field("External Document No."; Rec."External Document No.") { ApplicationArea = Service; diff --git a/src/Layers/W1/BaseApp/Service/Document/ServiceOrder.Page.al b/src/Layers/W1/BaseApp/Service/Document/ServiceOrder.Page.al index 11129c6e5ed..1d6e23f0df6 100644 --- a/src/Layers/W1/BaseApp/Service/Document/ServiceOrder.Page.al +++ b/src/Layers/W1/BaseApp/Service/Document/ServiceOrder.Page.al @@ -246,6 +246,11 @@ page 5900 "Service Order" ApplicationArea = Suite; Importance = Additional; } + field("Business Activity Code"; Rec."Business Activity Code") + { + ApplicationArea = Service; + ToolTip = 'Specifies the code for the company''s primary activity.'; + } field("Assigned User ID"; Rec."Assigned User ID") { ApplicationArea = Service; diff --git a/src/Layers/W1/BaseApp/Service/History/ServiceCrMemoHeader.Table.al b/src/Layers/W1/BaseApp/Service/History/ServiceCrMemoHeader.Table.al index 2f969b1e51e..5252417a13a 100644 --- a/src/Layers/W1/BaseApp/Service/History/ServiceCrMemoHeader.Table.al +++ b/src/Layers/W1/BaseApp/Service/History/ServiceCrMemoHeader.Table.al @@ -558,6 +558,12 @@ table 5994 "Service Cr.Memo Header" Caption = 'Work Description'; DataClassification = CustomerContent; } + field(395; "Business Activity Code"; Code[10]) + { + Caption = 'Business Activity Code'; + DataClassification = CustomerContent; + TableRelation = "Business Activity".Code; + } field(480; "Dimension Set ID"; Integer) { Caption = 'Dimension Set ID'; diff --git a/src/Layers/W1/BaseApp/Service/History/ServiceInvoiceHeader.Table.al b/src/Layers/W1/BaseApp/Service/History/ServiceInvoiceHeader.Table.al index 0a20a218c7e..2c171fbdd4b 100644 --- a/src/Layers/W1/BaseApp/Service/History/ServiceInvoiceHeader.Table.al +++ b/src/Layers/W1/BaseApp/Service/History/ServiceInvoiceHeader.Table.al @@ -606,6 +606,12 @@ table 5992 "Service Invoice Header" Caption = 'Work Description'; DataClassification = CustomerContent; } + field(395; "Business Activity Code"; Code[10]) + { + Caption = 'Business Activity Code'; + DataClassification = CustomerContent; + TableRelation = "Business Activity".Code; + } field(480; "Dimension Set ID"; Integer) { Caption = 'Dimension Set ID';