diff --git a/.github/AL-Go-Settings.json b/.github/AL-Go-Settings.json index 6c757d1bd7..0eb8036227 100644 --- a/.github/AL-Go-Settings.json +++ b/.github/AL-Go-Settings.json @@ -5,7 +5,7 @@ "runs-on": "windows-latest", "cacheImageName": "", "UsePsSession": false, - "artifact": "https://bcinsider-fvh2ekdjecfjd6gk.b02.azurefd.net/sandbox/26.0.24098.0/base", + "artifact": "https://bcinsider-fvh2ekdjecfjd6gk.b02.azurefd.net/sandbox/26.0.24649.0/base", "country": "base", "useProjectDependencies": true, "repoVersion": "26.0", diff --git a/Apps/CH/SwissQRBill/app/src/SwissQRBillInstall.Codeunit.al b/Apps/CH/SwissQRBill/app/src/SwissQRBillInstall.Codeunit.al index 1b4c9162ea..9074c0e444 100644 --- a/Apps/CH/SwissQRBill/app/src/SwissQRBillInstall.Codeunit.al +++ b/Apps/CH/SwissQRBill/app/src/SwissQRBillInstall.Codeunit.al @@ -56,9 +56,6 @@ codeunit 11517 "Swiss QR-Bill Install" with SwissQRBillSetup do if IsEmpty() then begin "Address Type" := "Address Type"::Structured; -#if not CLEAN23 - "Umlaut Chars Encode Mode" := "Umlaut Chars Encode Mode"::Double; -#endif if NewDefaultLayoutCode <> '' then "Default Layout" := NewDefaultLayoutCode; InitDefaultJournalSetup(); @@ -176,9 +173,6 @@ codeunit 11517 "Swiss QR-Bill Install" if OldSwissQRBillSetup.Get() then begin SwissQRBillSetup.Init(); SwissQRBillSetup."Address Type" := MapAddressType(OldSwissQRBillSetup."Address Type"); -#if not CLEAN23 - SwissQRBillSetup."Umlaut Chars Encode Mode" := MapEncodeMode(OldSwissQRBillSetup."Umlaut Chars Encode Mode"); -#endif SwissQRBillSetup."Default Layout" := OldSwissQRBillSetup."Default Layout"; SwissQRBillSetup."Last Used Reference No." := OldSwissQRBillSetup."Last Used Reference No."; SwissQRBillSetup."Journal Template" := OldSwissQRBillSetup."Journal Template"; @@ -231,19 +225,6 @@ codeunit 11517 "Swiss QR-Bill Install" exit(SwissQRBillAddressType::Combined); end; end; -#if not CLEAN23 - local procedure MapEncodeMode(EncodeMode: Option Single,Double,Remove) SwissQRBillUmlautEncoding: Enum "Swiss QR-Bill Umlaut Encoding" - begin - case EncodeMode of - EncodeMode::Single: - exit(SwissQRBillUmlautEncoding::Single); - EncodeMode::Double: - exit(SwissQRBillUmlautEncoding::Double); - EncodeMode::Remove: - exit(SwissQRBillUmlautEncoding::Remove); - end; - end; -#endif local procedure MapIBANType(IBANType: Option IBAN,"QR-IBAN") SwissQRBillIBANType: Enum "Swiss QR-Bill IBAN Type" begin diff --git a/Apps/CH/SwissQRBill/app/src/purchases/SwissQRBillPurchases.Codeunit.al b/Apps/CH/SwissQRBill/app/src/purchases/SwissQRBillPurchases.Codeunit.al index 0f3ded6443..99e80bb9c6 100644 --- a/Apps/CH/SwissQRBill/app/src/purchases/SwissQRBillPurchases.Codeunit.al +++ b/Apps/CH/SwissQRBill/app/src/purchases/SwissQRBillPurchases.Codeunit.al @@ -551,35 +551,6 @@ codeunit 11502 "Swiss QR-Bill Purchases" Message(MessageResult) end; -#if not CLEAN23 - [EventSubscriber(ObjectType::Codeunit, Codeunit::"Purch.-Post", 'OnBeforePostVendorEntry', '', false, false)] - local procedure OnBeforePostVendorEntry( - var GenJnlLine: Record "Gen. Journal Line"; - var PurchHeader: Record "Purchase Header"; - var TotalPurchLine: Record "Purchase Line"; - var TotalPurchLineLCY: Record "Purchase Line"; - PreviewMode: Boolean; - CommitIsSupressed: Boolean; - var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line") - var - QRBillCurrencyCode: Code[10]; - ErrText: Text; - begin - if PurchHeader."Swiss QR-Bill" and (PurchHeader."Prepayment %" = 0) and (PurchHeader."Swiss QR-Bill Amount" <> 0) then begin - QRBillCurrencyCode := SwissQRBillIncomingDoc.GetCurrency(PurchHeader."Swiss QR-Bill Currency"); - if PurchHeader."Currency Code" <> QRBillCurrencyCode then begin - ErrText := StrSubstNo(CurrencyErr, QRBillCurrencyCode, PurchHeader."Currency Code"); - Error(ErrText); - end; - if Abs(TotalPurchLine."Amount Including VAT") <> PurchHeader."Swiss QR-Bill Amount" then begin - ErrText := StrSubstNo(AmountErr, PurchHeader."Swiss QR-Bill Amount", Abs(TotalPurchLine."Amount Including VAT")); - Error(ErrText); - end; - VoidPurchDocQRBill(PurchHeader); - end; - end; -#endif - [EventSubscriber(ObjectType::Codeunit, Codeunit::"Purch. Post Invoice Events", 'OnPostLedgerEntryOnBeforeGenJnlPostLine', '', false, false)] local procedure OnPostLedgerEntryOnBeforeGenJnlPostLine( var GenJnlLine: Record "Gen. Journal Line"; diff --git a/Apps/CH/SwissQRBill/app/src/setup/SwissQRBillSetup.Page.al b/Apps/CH/SwissQRBill/app/src/setup/SwissQRBillSetup.Page.al index f15595050a..b55b33510d 100644 --- a/Apps/CH/SwissQRBill/app/src/setup/SwissQRBillSetup.Page.al +++ b/Apps/CH/SwissQRBill/app/src/setup/SwissQRBillSetup.Page.al @@ -35,17 +35,6 @@ page 11514 "Swiss QR-Bill Setup" ApplicationArea = All; ToolTip = 'Specifies the address type used for all printed QR-bills. Recommended value is Structured.'; } -#if not CLEAN23 - field(UmlautCharsEncodeMode; "Umlaut Chars Encode Mode") - { - ApplicationArea = All; - ToolTip = 'Specifies the German umlaut characters encoding mode. "Single" mode: "Ä" to "A". "Double" mode: "Ä" to "Ae". The recommended value is Double.'; - Visible = false; - ObsoleteReason = 'No need to convert umlauts, because encoding was changed to UTF-8.'; - ObsoleteState = Pending; - ObsoleteTag = '23.0'; - } -#endif field(DefaultQRBillLayout; "Default Layout") { ApplicationArea = All; diff --git a/Apps/CH/SwissQRBill/app/src/setup/SwissQRBillSetup.Table.al b/Apps/CH/SwissQRBill/app/src/setup/SwissQRBillSetup.Table.al index 825e162425..00e9e465b6 100644 --- a/Apps/CH/SwissQRBill/app/src/setup/SwissQRBillSetup.Table.al +++ b/Apps/CH/SwissQRBill/app/src/setup/SwissQRBillSetup.Table.al @@ -29,13 +29,8 @@ table 11512 "Swiss QR-Bill Setup" { Caption = 'German Umlaut Chars Encoding Mode'; ObsoleteReason = 'No need to convert umlauts, because encoding was changed to UTF-8.'; -#if CLEAN23 ObsoleteState = Removed; ObsoleteTag = '26.0'; -#else - ObsoleteState = Pending; - ObsoleteTag = '23.0'; -#endif } field(8; "Default Layout"; Code[20]) { diff --git a/Apps/CH/SwissQRBill/app/src/setup/SwissQRBillSetupWizard.Page.al b/Apps/CH/SwissQRBill/app/src/setup/SwissQRBillSetupWizard.Page.al index 3f9bbcab67..8446e2c8bd 100644 --- a/Apps/CH/SwissQRBill/app/src/setup/SwissQRBillSetupWizard.Page.al +++ b/Apps/CH/SwissQRBill/app/src/setup/SwissQRBillSetupWizard.Page.al @@ -154,18 +154,6 @@ page 11516 "Swiss QR-Bill Setup Wizard" ShowMandatory = true; ToolTip = 'Specifies the address type used for all printed QR-Bills. Recommended value is Structured.'; } -#if not CLEAN23 - field(UmlautCharsEncodeMode; "Umlaut Chars Encode Mode") - { - ApplicationArea = All; - ShowMandatory = true; - ToolTip = 'Specifies the German umlaut characters encoding mode. "Single" mode: "Ä" to "A". "Double" mode: "Ä" to "Ae". Recommended value is Double.'; - Visible = false; - ObsoleteReason = 'No need to convert umlauts, because encoding was changed to UTF-8.'; - ObsoleteState = Pending; - ObsoleteTag = '23.0'; - } -#endif } } group(DefaultLayoutStep) diff --git a/Apps/CZ/AdvancePaymentsLocalization/app/Src/Pages/AdvanceLetterTemplatesCZZ.Page.al b/Apps/CZ/AdvancePaymentsLocalization/app/Src/Pages/AdvanceLetterTemplatesCZZ.Page.al index be821204ef..d08fa336cd 100644 --- a/Apps/CZ/AdvancePaymentsLocalization/app/Src/Pages/AdvanceLetterTemplatesCZZ.Page.al +++ b/Apps/CZ/AdvancePaymentsLocalization/app/Src/Pages/AdvanceLetterTemplatesCZZ.Page.al @@ -72,50 +72,6 @@ page 31179 "Advance Letter Templates CZZ" { ApplicationArea = Basic, Suite; } -#if not CLEAN23 -#pragma warning disable AL0432,AS0074 - field("Document Report ID"; '') - { - ApplicationArea = Basic, Suite; - ToolTip = 'Specifies document report ID.'; - Visible = false; - Enabled = false; - ObsoleteReason = 'Replaced by standard report selection.'; - ObsoleteState = Pending; - ObsoleteTag = '23.0'; - } - field("Document Report Caption"; '') - { - ApplicationArea = Basic, Suite; - ToolTip = 'Specifies document report caption.'; - Visible = false; - Enabled = false; - ObsoleteReason = 'Replaced by standard report selection.'; - ObsoleteState = Pending; - ObsoleteTag = '23.0'; - } - field("Invoice/Cr. Memo Report ID"; '') - { - ApplicationArea = Basic, Suite; - ToolTip = 'Specifies invoice/credit memo report ID'; - Visible = false; - Enabled = false; - ObsoleteReason = 'Replaced by standard report selection.'; - ObsoleteState = Pending; - ObsoleteTag = '23.0'; - } - field("Invoice/Cr. Memo Rep. Caption"; '') - { - ApplicationArea = Basic, Suite; - ToolTip = 'Specifies invoice/credit memo report caption.'; - Visible = false; - Enabled = false; - ObsoleteReason = 'Replaced by standard report selection.'; - ObsoleteState = Pending; - ObsoleteTag = '23.0'; - } -#pragma warning restore AL0432,AS0074 -#endif } } } diff --git a/Apps/CZ/AdvancePaymentsLocalization/app/Src/Tables/PurchAdvLetterHeaderCZZ.Table.al b/Apps/CZ/AdvancePaymentsLocalization/app/Src/Tables/PurchAdvLetterHeaderCZZ.Table.al index 95b874b056..14f8c74268 100644 --- a/Apps/CZ/AdvancePaymentsLocalization/app/Src/Tables/PurchAdvLetterHeaderCZZ.Table.al +++ b/Apps/CZ/AdvancePaymentsLocalization/app/Src/Tables/PurchAdvLetterHeaderCZZ.Table.al @@ -19,9 +19,6 @@ using Microsoft.Finance.GeneralLedger.Setup; using Microsoft.Finance.ReceivablesPayables; using Microsoft.Finance.VAT.Calculation; using Microsoft.Finance.VAT.Setup; -#if not CLEAN23 -using Microsoft.FixedAssets.Journal; -#endif using Microsoft.Foundation.Address; using Microsoft.Foundation.Attachment; using Microsoft.Foundation.AuditCodes; @@ -1058,38 +1055,6 @@ table 31008 "Purch. Adv. Letter Header CZZ" exit((not HasPayToAddress()) and PayToVendor.HasAddress()); end; -#if not CLEAN23 -#pragma warning disable AL0432 - [Obsolete('Temporary fix to convert Dim Arrays to Dictionary', '23.0')] - local procedure CreateDefaultDimSourcesFromDimArray(var DefaultDimSource: List of [Dictionary of [Integer, Code[20]]]; TableID: array[10] of Integer; No: array[10] of Code[20]) - var - DimArrayConversionHelper: Codeunit "Dim. Array Conversion Helper"; - begin - DimArrayConversionHelper.CreateDefaultDimSourcesFromDimArray(Database::"FA Journal Line", DefaultDimSource, TableID, No); - end; - - [Obsolete('Temporary fix to convert Dim Arrays to Dictionary', '23.0')] - local procedure CreateDimTableIDs(DefaultDimSource: List of [Dictionary of [Integer, Code[20]]]; var TableID: array[10] of Integer; var No: array[10] of Code[20]) - var - DimArrayConversionHelper: Codeunit "Dim. Array Conversion Helper"; - begin - DimArrayConversionHelper.CreateDimTableIDs(Database::"FA Journal Line", DefaultDimSource, TableID, No); - end; - - [Obsolete('Temporary fix to convert Dim Arrays to Dictionary', '23.0')] - local procedure RunEventOnAfterCreateDimTableIDs(var DefaultDimSource: List of [Dictionary of [Integer, Code[20]]]) - var - DimArrayConversionHelper: Codeunit "Dim. Array Conversion Helper"; - TableID: array[10] of Integer; - No: array[10] of Code[20]; - begin - CreateDimTableIDs(DefaultDimSource, TableID, No); - OnAfterCreateDimTableIDs(Rec, CurrFieldNo, TableID, No); - CreateDefaultDimSourcesFromDimArray(DefaultDimSource, TableID, No); - end; -#pragma warning restore AL0432 - -#endif procedure CreateDimFromDefaultDim(FieldNo: Integer) var DefaultDimSource: List of [Dictionary of [Integer, Code[20]]]; @@ -1104,11 +1069,6 @@ table 31008 "Purch. Adv. Letter Header CZZ" DimensionManagement.AddDimSource(DefaultDimSource, Database::"Salesperson/Purchaser", Rec."Purchaser Code", FieldNo = Rec.FieldNo("Purchaser Code")); DimensionManagement.AddDimSource(DefaultDimSource, Database::"Responsibility Center", Rec."Responsibility Center", FieldNo = Rec.FieldNo("Responsibility Center")); -#if not CLEAN23 -#pragma warning disable AL0432 - RunEventOnAfterCreateDimTableIDs(DefaultDimSource); -#pragma warning restore AL0432 -#endif OnAfterInitDefaultDimensionSources(Rec, DefaultDimSource); end; @@ -1713,16 +1673,6 @@ table 31008 "Purch. Adv. Letter Header CZZ" begin end; -#if not CLEAN23 -#pragma warning disable AL0432 - [Obsolete('Use OnAfterInitDefaultDimensionSources instead.', '23.0')] - [IntegrationEvent(false, false)] - local procedure OnAfterCreateDimTableIDs(var PurchAdvLetterHeaderCZZ: Record "Purch. Adv. Letter Header CZZ"; CallingFieldNo: Integer; var TableID: array[10] of Integer; var No: array[10] of Code[20]) - begin - end; -#pragma warning restore AL0432 - -#endif [IntegrationEvent(false, false)] local procedure OnAfterUpdatePayToCont(var PurchAdvLetterHeaderCZZ: Record "Purch. Adv. Letter Header CZZ"; Vendor: Record Vendor; Contact: Record Contact) begin diff --git a/Apps/CZ/AdvancedLocalizationPack/app/Src/Codeunits/UndoShipmentLineHandlerCZA.Codeunit.al b/Apps/CZ/AdvancedLocalizationPack/app/Src/Codeunits/UndoShipmentLineHandlerCZA.Codeunit.al index 05335f5df7..ce5a92c9ce 100644 --- a/Apps/CZ/AdvancedLocalizationPack/app/Src/Codeunits/UndoShipmentLineHandlerCZA.Codeunit.al +++ b/Apps/CZ/AdvancedLocalizationPack/app/Src/Codeunits/UndoShipmentLineHandlerCZA.Codeunit.al @@ -6,6 +6,7 @@ namespace Microsoft.Sales.History; using Microsoft.Inventory.Item; using Microsoft.Inventory.Journal; +using Microsoft.Inventory.Transfer; codeunit 31444 "Undo Shipment Line Handler CZA" { @@ -19,4 +20,10 @@ codeunit 31444 "Undo Shipment Line Handler CZA" Item.Get(ItemJournalLine."Item No."); ItemJournalLine."Unit of Measure Code" := Item."Base Unit of Measure"; end; + + [EventSubscriber(ObjectType::Codeunit, Codeunit::"Undo Transfer Shipment", 'OnAfterCopyItemJnlLineFromTransShpt', '', false, false)] + local procedure OnAfterCopyItemJnlLineFromTransShpt(var ItemJournalLine: Record "Item Journal Line"; TransferShipmentLine: Record "Transfer Shipment Line") + begin + ItemJournalLine."Gen. Bus. Posting Group" := TransferShipmentLine."Gen.Bus.Post.Group Ship CZA"; + end; } diff --git a/Apps/CZ/BankingDocumentsLocalization/app/Src/Codeunits/InstallApplicationCZB.Codeunit.al b/Apps/CZ/BankingDocumentsLocalization/app/Src/Codeunits/InstallApplicationCZB.Codeunit.al index 74ff556d9e..927ced19b4 100644 --- a/Apps/CZ/BankingDocumentsLocalization/app/Src/Codeunits/InstallApplicationCZB.Codeunit.al +++ b/Apps/CZ/BankingDocumentsLocalization/app/Src/Codeunits/InstallApplicationCZB.Codeunit.al @@ -520,8 +520,8 @@ codeunit 31330 "Install Application CZB" local procedure InitExpLauncherSEPA() var BankExportImportSetup: Record "Bank Export/Import Setup"; - SEPACZCodeTok: Label 'SEPACZ', Locked = true; - SEPACZNameTxt: Label 'SEPA Czech'; + SEPACZCodeTok: Label 'SEPACZPAIN00100109', Locked = true; + SEPACZNameTxt: Label 'SEPA Czech - payment orders pain.001.001.09'; begin if not BankExportImportSetup.Get(SEPACZCodeTok) then begin BankExportImportSetup.Init(); @@ -531,7 +531,7 @@ codeunit 31330 "Install Application CZB" BankExportImportSetup.Name := SEPACZNameTxt; BankExportImportSetup.Direction := BankExportImportSetup.Direction::Export; BankExportImportSetup."Processing Codeunit ID" := Codeunit::"Export Launcher SEPA CZB"; - BankExportImportSetup."Processing XMLport ID" := XmlPort::"SEPA CT pain.001.001.03"; + BankExportImportSetup."Processing XMLport ID" := XmlPort::"SEPA CT pain.001.001.09"; BankExportImportSetup."Check Export Codeunit" := Codeunit::"SEPA CT-Check Line"; BankExportImportSetup."Preserve Non-Latin Characters" := false; BankExportImportSetup.Modify(); diff --git a/Apps/CZ/BankingDocumentsLocalization/app/Src/Codeunits/MatchBankPaymentCZB.Codeunit.al b/Apps/CZ/BankingDocumentsLocalization/app/Src/Codeunits/MatchBankPaymentCZB.Codeunit.al index d4433c8f68..d7614056c5 100644 --- a/Apps/CZ/BankingDocumentsLocalization/app/Src/Codeunits/MatchBankPaymentCZB.Codeunit.al +++ b/Apps/CZ/BankingDocumentsLocalization/app/Src/Codeunits/MatchBankPaymentCZB.Codeunit.al @@ -469,18 +469,4 @@ codeunit 31362 "Match Bank Payment CZB" local procedure OnFillMatchBankPaymentBufferEmployeeOnAfterEmployeeLedgerEntrySetFilters(var EmployeeLedgerEntry: Record "Employee Ledger Entry"; SearchRuleLineCZB: Record "Search Rule Line CZB"; var GenJournalLine: Record "Gen. Journal Line") begin end; -#if not CLEAN23 - - [IntegrationEvent(false, false)] - [Obsolete('The event is no longer triggered.', '23.0')] - local procedure OnBeforeFillMatchBankPaymentBufferSalesAdvance(GenJournalLine: Record "Gen. Journal Line"; SearchRuleLineCZB: Record "Search Rule Line CZB"; var TempMatchBankPaymentBufferCZB: Record "Match Bank Payment Buffer CZB"; var IsHandled: Boolean); - begin - end; - - [IntegrationEvent(false, false)] - [Obsolete('The event is no longer triggered.', '23.0')] - local procedure OnBeforeFillMatchBankPaymentBufferPurchaseAdvance(GenJournalLine: Record "Gen. Journal Line"; SearchRuleLineCZB: Record "Search Rule Line CZB"; var TempMatchBankPaymentBufferCZB: Record "Match Bank Payment Buffer CZB"; var IsHandled: Boolean); - begin - end; -#endif } diff --git a/Apps/CZ/CashDeskLocalization/app/Src/Tables/CashDocumentLineCZP.Table.al b/Apps/CZ/CashDeskLocalization/app/Src/Tables/CashDocumentLineCZP.Table.al index 9a69165738..09ce1fae5c 100644 --- a/Apps/CZ/CashDeskLocalization/app/Src/Tables/CashDocumentLineCZP.Table.al +++ b/Apps/CZ/CashDeskLocalization/app/Src/Tables/CashDocumentLineCZP.Table.al @@ -220,9 +220,12 @@ table 11733 "Cash Document Line CZP" end; "Account Type"::Employee: begin - CashDocumentHeaderCZP.TestField("Currency Code", ''); Employee.Get("Account No."); Description := CopyStr(Employee.FullName(), 1, MaxStrLen(Description)); + "Posting Group" := Employee."Employee Posting Group"; + "Gen. Posting Type" := "Gen. Posting Type"::" "; + "VAT Bus. Posting Group" := ''; + "VAT Prod. Posting Group" := ''; end; end; diff --git a/Apps/CZ/CoreLocalizationPack/app/Src/Codeunits/CorrectionsPostingMgtCZL.Codeunit.al b/Apps/CZ/CoreLocalizationPack/app/Src/Codeunits/CorrectionsPostingMgtCZL.Codeunit.al index ba5c305448..fd14df8ca1 100644 --- a/Apps/CZ/CoreLocalizationPack/app/Src/Codeunits/CorrectionsPostingMgtCZL.Codeunit.al +++ b/Apps/CZ/CoreLocalizationPack/app/Src/Codeunits/CorrectionsPostingMgtCZL.Codeunit.al @@ -380,36 +380,6 @@ codeunit 11796 "Corrections Posting Mgt. CZL" ServiceLine."Negative CZL" := (ServiceLine.Quantity < 0); end; -#if not CLEAN23 -#pragma warning disable AL0432 - [EventSubscriber(ObjectType::Table, Database::"Invoice Post. Buffer", 'OnAfterInvPostBufferPrepareSales', '', false, false)] - local procedure InvPostBufferSetCorrectionOnAfterInvPostBufferPrepareSales(var SalesLine: Record "Sales Line"; var InvoicePostBuffer: Record "Invoice Post. Buffer") - var - SalesHeader: Record "Sales Header"; - begin - SalesHeader.Get(SalesLine."Document Type", SalesLine."Document No."); - InvoicePostBuffer."Correction CZL" := SalesHeader.Correction xor SalesLine."Negative CZL"; - end; - - [EventSubscriber(ObjectType::Table, Database::"Invoice Post. Buffer", 'OnAfterInvPostBufferPreparePurchase', '', false, false)] - local procedure InvPostBufferSetCorrectionOnAfterInvPostBufferPreparePurchase(var PurchaseLine: Record "Purchase Line"; var InvoicePostBuffer: Record "Invoice Post. Buffer") - var - PurchaseHeader: Record "Purchase Header"; - begin - PurchaseHeader.Get(PurchaseLine."Document Type", PurchaseLine."Document No."); - InvoicePostBuffer."Correction CZL" := PurchaseHeader.Correction xor PurchaseLine."Negative CZL"; - end; - - [EventSubscriber(ObjectType::Table, Database::"Invoice Post. Buffer", 'OnAfterInvPostBufferPrepareService', '', false, false)] - local procedure InvPostBufferSetCorrectionOnAfterInvPostBufferPrepareService(var ServiceLine: Record "Service Line"; var InvoicePostBuffer: Record "Invoice Post. Buffer") - var - ServiceHeader: Record "Service Header"; - begin - ServiceHeader.Get(ServiceLine."Document Type", ServiceLine."Document No."); - InvoicePostBuffer."Correction CZL" := ServiceHeader.Correction xor ServiceLine."Negative CZL"; - end; -#pragma warning restore AL0432 -#endif [EventSubscriber(ObjectType::Codeunit, Codeunit::Microsoft.Sales.Posting."Sales Post Invoice Events", 'OnAfterPrepareInvoicePostingBuffer', '', false, false)] local procedure SetCorrectionOnAfterPrepareSales(var SalesLine: Record "Sales Line"; var InvoicePostingBuffer: Record "Invoice Posting Buffer") var diff --git a/Apps/CZ/CoreLocalizationPack/app/Src/Codeunits/DataClassEvalHandlerCZL.Codeunit.al b/Apps/CZ/CoreLocalizationPack/app/Src/Codeunits/DataClassEvalHandlerCZL.Codeunit.al index 77eee976fe..e4de80ac17 100644 --- a/Apps/CZ/CoreLocalizationPack/app/Src/Codeunits/DataClassEvalHandlerCZL.Codeunit.al +++ b/Apps/CZ/CoreLocalizationPack/app/Src/Codeunits/DataClassEvalHandlerCZL.Codeunit.al @@ -89,11 +89,6 @@ codeunit 11710 "Data Class. Eval. Handler CZL" #pragma warning restore AL0432 InventoryPostingSetup: Record "Inventory Posting Setup"; InventorySetup: Record "Inventory Setup"; -#if not CLEAN23 -#pragma warning disable AL0432 - InvoicePostBuffer: Record "Invoice Post. Buffer"; -#pragma warning restore AL0432 -#endif InvoicePostingBuffer: Record "Invoice Posting Buffer"; InventoryReportEntry: Record "Inventory Report Entry"; IsolatedCertificate: Record "Isolated Certificate"; @@ -261,19 +256,9 @@ codeunit 11710 "Data Class. Eval. Handler CZL" DataClassificationMgt.SetFieldToNormal(Database::"Company Information", CompanyInformation.FieldNo("Default Bank Account Code CZL")); DataClassificationMgt.SetFieldToNormal(Database::"Company Information", CompanyInformation.FieldNo("Bank Account Format Check CZL")); DataClassificationMgt.SetFieldToNormal(Database::"Company Information", CompanyInformation.FieldNo("Tax Registration No. CZL")); -#if not CLEAN23 -#pragma warning disable AL0432 - DataClassificationMgt.SetFieldToNormal(Database::Contact, Contact.FieldNo("Registration No. CZL")); -#pragma warning restore AL0432 -#endif DataClassificationMgt.SetFieldToNormal(Database::Contact, Contact.FieldNo("Tax Registration No. CZL")); DataClassificationMgt.SetFieldToNormal(Database::"Copy Gen. Journal Parameters", CopyGenJournalParameters.FieldNo("Replace VAT Date CZL")); DataClassificationMgt.SetFieldToNormal(Database::"Cust. Ledger Entry", CustLedgerEntry.FieldNo("VAT Date CZL")); -#if not CLEAN23 -#pragma warning disable AL0432 - DataClassificationMgt.SetFieldToNormal(Database::Customer, Customer.FieldNo("Registration No. CZL")); -#pragma warning restore AL0432 -#endif DataClassificationMgt.SetFieldToNormal(Database::Customer, Customer.FieldNo("Tax Registration No. CZL")); DataClassificationMgt.SetFieldToNormal(Database::Customer, Customer.FieldNo("Validate Registration No. CZL")); DataClassificationMgt.SetFieldToNormal(Database::"Customer Templ.", CustomerTempl.FieldNo("Validate Registration No. CZL")); @@ -327,15 +312,6 @@ codeunit 11710 "Data Class. Eval. Handler CZL" DataClassificationMgt.SetFieldToNormal(Database::"Inventory Setup", InventorySetup.FieldNo("Def.Tmpl. for Phys.Neg.Adj CZL")); DataClassificationMgt.SetFieldToNormal(Database::"Inventory Setup", InventorySetup.FieldNo("Post Exp.Cost Conv.As Corr.CZL")); DataClassificationMgt.SetFieldToNormal(Database::"Inventory Setup", InventorySetup.FieldNo("Post Neg.Transf. As Corr.CZL")); -#if not CLEAN23 -#pragma warning disable AL0432 - DataClassificationMgt.SetFieldToNormal(Database::"Invoice Post. Buffer", InvoicePostBuffer.FieldNo("Ext. Amount CZL")); - DataClassificationMgt.SetFieldToNormal(Database::"Invoice Post. Buffer", InvoicePostBuffer.FieldNo("Ext. Amount Incl. VAT CZL")); - DataClassificationMgt.SetFieldToNormal(Database::"Invoice Post. Buffer", InvoicePostBuffer.FieldNo("VAT Date CZL")); - DataClassificationMgt.SetFieldToNormal(Database::"Invoice Post. Buffer", InvoicePostBuffer.FieldNo("Correction CZL")); - DataClassificationMgt.SetFieldToNormal(Database::"Invoice Post. Buffer", InvoicePostBuffer.FieldNo("Original Doc. VAT Date CZL")); -#pragma warning restore AL0432 -#endif #if not CLEAN24 #pragma warning disable AL0432 DataClassificationMgt.SetFieldToNormal(Database::"Invoice Posting Buffer", InvoicePostingBuffer.FieldNo("Ext. Amount CZL")); @@ -385,11 +361,6 @@ codeunit 11710 "Data Class. Eval. Handler CZL" DataClassificationMgt.SetFieldToNormal(Database::"Purchase Header", PurchaseHeader.FieldNo("Registration No. CZL")); DataClassificationMgt.SetFieldToNormal(Database::"Purchase Header", PurchaseHeader.FieldNo("Tax Registration No. CZL")); DataClassificationMgt.SetFieldToNormal(Database::"Purchase Header", PurchaseHeader.FieldNo("EU 3-Party Intermed. Role CZL")); -#if not CLEAN23 -#pragma warning disable AL0432 - DataClassificationMgt.SetFieldToNormal(Database::"Purchase Header", PurchaseHeader.FieldNo("EU 3-Party Trade CZL")); -#pragma warning restore AL0432 -#endif DataClassificationMgt.SetFieldToNormal(Database::"Purchase Header", PurchaseHeader.FieldNo("Original Doc. VAT Date CZL")); DataClassificationMgt.SetFieldToNormal(Database::"Purchase Header Archive", PurchaseHeaderArchive.FieldNo("VAT Currency Factor CZL")); DataClassificationMgt.SetFieldToNormal(Database::"Purchase Header Archive", PurchaseHeaderArchive.FieldNo("VAT Currency Code CZL")); @@ -410,11 +381,6 @@ codeunit 11710 "Data Class. Eval. Handler CZL" DataClassificationMgt.SetFieldToNormal(Database::"Purch. Cr. Memo Hdr.", PurchCrMemoHdr.FieldNo("Registration No. CZL")); DataClassificationMgt.SetFieldToNormal(Database::"Purch. Cr. Memo Hdr.", PurchCrMemoHdr.FieldNo("Tax Registration No. CZL")); DataClassificationMgt.SetFieldToNormal(Database::"Purch. Cr. Memo Hdr.", PurchCrMemoHdr.FieldNo("EU 3-Party Intermed. Role CZL")); -#if not CLEAN23 -#pragma warning disable AL0432 - DataClassificationMgt.SetFieldToNormal(Database::"Purch. Cr. Memo Hdr.", PurchCrMemoHdr.FieldNo("EU 3-Party Trade CZL")); -#pragma warning restore AL0432 -#endif DataClassificationMgt.SetFieldToNormal(Database::"Purch. Cr. Memo Hdr.", PurchCrMemoHdr.FieldNo("Original Doc. VAT Date CZL")); DataClassificationMgt.SetFieldToNormal(Database::"Purch. Cr. Memo Line", PurchCrMemoLine.FieldNo("Tariff No. CZL")); DataClassificationMgt.SetFieldToNormal(Database::"Purch. Inv. Header", PurchInvHeader.FieldNo("VAT Currency Factor CZL")); @@ -422,11 +388,6 @@ codeunit 11710 "Data Class. Eval. Handler CZL" DataClassificationMgt.SetFieldToNormal(Database::"Purch. Inv. Header", PurchInvHeader.FieldNo("Registration No. CZL")); DataClassificationMgt.SetFieldToNormal(Database::"Purch. Inv. Header", PurchInvHeader.FieldNo("Tax Registration No. CZL")); DataClassificationMgt.SetFieldToNormal(Database::"Purch. Inv. Header", PurchInvHeader.FieldNo("EU 3-Party Intermed. Role CZL")); -#if not CLEAN23 -#pragma warning disable AL0432 - DataClassificationMgt.SetFieldToNormal(Database::"Purch. Inv. Header", PurchInvHeader.FieldNo("EU 3-Party Trade CZL")); -#pragma warning restore AL0432 -#endif DataClassificationMgt.SetFieldToNormal(Database::"Purch. Inv. Header", PurchInvHeader.FieldNo("Original Doc. VAT Date CZL")); DataClassificationMgt.SetFieldToNormal(Database::"Purch. Inv. Line", PurchInvLine.FieldNo("Tariff No. CZL")); DataClassificationMgt.SetFieldToNormal(Database::"Purch. Rcpt. Header", PurchRcptHeader.FieldNo("Registration No. CZL")); @@ -571,22 +532,12 @@ codeunit 11710 "Data Class. Eval. Handler CZL" DataClassificationMgt.SetFieldToNormal(Database::"VAT Statement Line", VATStatementLine.FieldNo("Gen. Prod. Posting Group CZL")); DataClassificationMgt.SetFieldToNormal(Database::"VAT Statement Line", VATStatementLine.FieldNo("Show CZL")); DataClassificationMgt.SetFieldToNormal(Database::"VAT Statement Line", VATStatementLine.FieldNo("EU 3-Party Intermed. Role CZL")); -#if not CLEAN23 -#pragma warning disable AL0432 - DataClassificationMgt.SetFieldToNormal(Database::"VAT Statement Line", VATStatementLine.FieldNo("EU-3 Party Trade CZL")); -#pragma warning restore AL0432 -#endif DataClassificationMgt.SetFieldToNormal(Database::"VAT Statement Line", VATStatementLine.FieldNo("VAT Ctrl. Report Section CZL")); DataClassificationMgt.SetFieldToNormal(Database::"VAT Statement Line", VATStatementLine.FieldNo("Ignore Simpl. Doc. Limit CZL")); DataClassificationMgt.SetFieldToNormal(Database::"VAT Statement Name", VATStatementName.FieldNo("Comments CZL")); DataClassificationMgt.SetFieldToNormal(Database::"VAT Statement Name", VATStatementName.FieldNo("Attachments CZL")); DataClassificationMgt.SetFieldToNormal(Database::"VAT Statement Template", VATStatementTemplate.FieldNo("XML Format CZL")); DataClassificationMgt.SetFieldToNormal(Database::"VAT Statement Template", VATStatementTemplate.FieldNo("Allow Comments/Attachments CZL")); -#if not CLEAN23 -#pragma warning disable AL0432 - DataClassificationMgt.SetFieldToNormal(Database::Vendor, Vendor.FieldNo("Registration No. CZL")); -#pragma warning restore AL0432 -#endif DataClassificationMgt.SetFieldToNormal(Database::Vendor, Vendor.FieldNo("Tax Registration No. CZL")); DataClassificationMgt.SetFieldToNormal(Database::Vendor, Vendor.FieldNo("Validate Registration No. CZL")); DataClassificationMgt.SetFieldToNormal(Database::Vendor, Vendor.FieldNo("Last Unreliab. Check Date CZL")); diff --git a/Apps/CZ/CoreLocalizationPack/app/Src/Codeunits/InstallApplicationCZL.Codeunit.al b/Apps/CZ/CoreLocalizationPack/app/Src/Codeunits/InstallApplicationCZL.Codeunit.al index b0a504b302..4f211f640e 100644 --- a/Apps/CZ/CoreLocalizationPack/app/Src/Codeunits/InstallApplicationCZL.Codeunit.al +++ b/Apps/CZ/CoreLocalizationPack/app/Src/Codeunits/InstallApplicationCZL.Codeunit.al @@ -463,9 +463,6 @@ codeunit 11748 "Install Application CZL" CustomerDataTransfer: DataTransfer; begin CustomerDataTransfer.SetTables(Database::Customer, Database::Customer); -#if not CLEAN23 - CustomerDataTransfer.AddFieldValue(Customer.FieldNo("Registration No."), Customer.FieldNo("Registration No. CZL")); -#endif CustomerDataTransfer.AddFieldValue(Customer.FieldNo("Registration No."), Customer.FieldNo("Registration Number")); CustomerDataTransfer.AddFieldValue(Customer.FieldNo("Tax Registration No."), Customer.FieldNo("Tax Registration No. CZL")); CustomerDataTransfer.AddFieldValue(Customer.FieldNo("Transaction Type"), Customer.FieldNo("Transaction Type CZL")); @@ -481,9 +478,6 @@ codeunit 11748 "Install Application CZL" VendorDataTransfer: DataTransfer; begin VendorDataTransfer.SetTables(Database::Vendor, Database::Vendor); -#if not CLEAN23 - VendorDataTransfer.AddFieldValue(Vendor.FieldNo("Registration No."), Vendor.FieldNo("Registration No. CZL")); -#endif VendorDataTransfer.AddFieldValue(Vendor.FieldNo("Registration No."), Vendor.FieldNo("Registration Number")); VendorDataTransfer.AddFieldValue(Vendor.FieldNo("Tax Registration No."), Vendor.FieldNo("Tax Registration No. CZL")); VendorDataTransfer.AddFieldValue(Vendor.FieldNo("Disable Uncertainty Check"), Vendor.FieldNo("Disable Unreliab. Check CZL")); @@ -510,9 +504,6 @@ codeunit 11748 "Install Application CZL" ContactDataTransfer: DataTransfer; begin ContactDataTransfer.SetTables(Database::Contact, Database::Contact); -#if not CLEAN23 - ContactDataTransfer.AddFieldValue(Contact.FieldNo("Registration No."), Contact.FieldNo("Registration No. CZL")); -#endif ContactDataTransfer.AddFieldValue(Contact.FieldNo("Registration No."), Contact.FieldNo("Registration Number")); ContactDataTransfer.AddFieldValue(Contact.FieldNo("Tax Registration No."), Contact.FieldNo("Tax Registration No. CZL")); ContactDataTransfer.CopyFields(); @@ -1122,9 +1113,6 @@ codeunit 11748 "Install Application CZL" PurchaseHeaderDataTransfer.AddFieldValue(PurchaseHeader.FieldNo("Physical Transfer"), PurchaseHeader.FieldNo("Physical Transfer CZL")); PurchaseHeaderDataTransfer.AddFieldValue(PurchaseHeader.FieldNo("Intrastat Exclude"), PurchaseHeader.FieldNo("Intrastat Exclude CZL")); PurchaseHeaderDataTransfer.AddFieldValue(PurchaseHeader.FieldNo("EU 3-Party Intermediate Role"), PurchaseHeader.FieldNo("EU 3-Party Intermed. Role CZL")); -#if not CLEAN23 - PurchaseHeaderDataTransfer.AddFieldValue(PurchaseHeader.FieldNo("EU 3-Party Trade"), PurchaseHeader.FieldNo("EU 3-Party Trade CZL")); -#endif PurchaseHeaderDataTransfer.AddFieldValue(PurchaseHeader.FieldNo("EU 3-Party Trade"), PurchaseHeader.FieldNo("EU 3 Party Trade")); PurchaseHeaderDataTransfer.AddFieldValue(PurchaseHeader.FieldNo("Original Document VAT Date"), PurchaseHeader.FieldNo("Original Doc. VAT Date CZL")); PurchaseHeaderDataTransfer.AddFieldValue(PurchaseHeader.FieldNo("VAT Currency Factor"), PurchaseHeader.FieldNo("VAT Currency Factor CZL")); @@ -1167,9 +1155,6 @@ codeunit 11748 "Install Application CZL" PurchInvHeaderDataTransfer.AddFieldValue(PurchInvHeader.FieldNo("Physical Transfer"), PurchInvHeader.FieldNo("Physical Transfer CZL")); PurchInvHeaderDataTransfer.AddFieldValue(PurchInvHeader.FieldNo("Intrastat Exclude"), PurchInvHeader.FieldNo("Intrastat Exclude CZL")); PurchInvHeaderDataTransfer.AddFieldValue(PurchInvHeader.FieldNo("EU 3-Party Intermediate Role"), PurchInvHeader.FieldNo("EU 3-Party Intermed. Role CZL")); -#if not CLEAN23 - PurchInvHeaderDataTransfer.AddFieldValue(PurchInvHeader.FieldNo("EU 3-Party Trade"), PurchInvHeader.FieldNo("EU 3-Party Trade CZL")); -#endif PurchInvHeaderDataTransfer.AddFieldValue(PurchInvHeader.FieldNo("EU 3-Party Trade"), PurchInvHeader.FieldNo("EU 3 Party Trade")); PurchInvHeaderDataTransfer.AddFieldValue(PurchInvHeader.FieldNo("Original Document VAT Date"), PurchInvHeader.FieldNo("Original Doc. VAT Date CZL")); PurchInvHeaderDataTransfer.AddFieldValue(PurchInvHeader.FieldNo("VAT Currency Factor"), PurchInvHeader.FieldNo("VAT Currency Factor CZL")); @@ -1197,9 +1182,6 @@ codeunit 11748 "Install Application CZL" PurchCrMemoHdrDataTransfer.AddFieldValue(PurchCrMemoHdr.FieldNo("Physical Transfer"), PurchCrMemoHdr.FieldNo("Physical Transfer CZL")); PurchCrMemoHdrDataTransfer.AddFieldValue(PurchCrMemoHdr.FieldNo("Intrastat Exclude"), PurchCrMemoHdr.FieldNo("Intrastat Exclude CZL")); PurchCrMemoHdrDataTransfer.AddFieldValue(PurchCrMemoHdr.FieldNo("EU 3-Party Intermediate Role"), PurchCrMemoHdr.FieldNo("EU 3-Party Intermed. Role CZL")); -#if not CLEAN23 - PurchCrMemoHdrDataTransfer.AddFieldValue(PurchCrMemoHdr.FieldNo("EU 3-Party Trade"), PurchCrMemoHdr.FieldNo("EU 3-Party Trade CZL")); -#endif PurchCrMemoHdrDataTransfer.AddFieldValue(PurchCrMemoHdr.FieldNo("EU 3-Party Trade"), PurchCrMemoHdr.FieldNo("EU 3 Party Trade")); PurchCrMemoHdrDataTransfer.AddFieldValue(PurchCrMemoHdr.FieldNo("Original Document VAT Date"), PurchCrMemoHdr.FieldNo("Original Doc. VAT Date CZL")); PurchCrMemoHdrDataTransfer.AddFieldValue(PurchCrMemoHdr.FieldNo("VAT Currency Factor"), PurchCrMemoHdr.FieldNo("VAT Currency Factor CZL")); @@ -1658,11 +1640,6 @@ codeunit 11748 "Install Application CZL" VATStatementLine."Gen. Prod. Posting Group CZL" := VATStatementLine."Gen. Prod. Posting Group"; VATStatementLine."Show CZL" := VATStatementLine.Show; VATStatementLine."EU 3-Party Intermed. Role CZL" := VATStatementLine."EU 3-Party Intermediate Role"; -#if not CLEAN23 -#pragma warning disable AL0432 - VATStatementLine."EU-3 Party Trade CZL" := VATStatementLine."EU-3 Party Trade"; -#pragma warning restore AL0432 -#endif case VATStatementLine."EU-3 Party Trade" of VATStatementLine."EU-3 Party Trade"::" ": VATStatementLine."EU 3 Party Trade" := VATStatementLine."EU 3 Party Trade"::All; diff --git a/Apps/CZ/CoreLocalizationPack/app/Src/Codeunits/InvPostBufferHandlerCZL.Codeunit.al b/Apps/CZ/CoreLocalizationPack/app/Src/Codeunits/InvPostBufferHandlerCZL.Codeunit.al index 3126f2c377..d1674d73ad 100644 --- a/Apps/CZ/CoreLocalizationPack/app/Src/Codeunits/InvPostBufferHandlerCZL.Codeunit.al +++ b/Apps/CZ/CoreLocalizationPack/app/Src/Codeunits/InvPostBufferHandlerCZL.Codeunit.al @@ -10,16 +10,6 @@ codeunit 31307 "Inv. Post. Buffer Handler CZL" { Access = Internal; -#if not CLEAN23 -#pragma warning disable AL0432 - [EventSubscriber(ObjectType::Table, Database::"Invoice Post. Buffer", 'OnBeforeInvPostBufferModify', '', false, false)] - local procedure UpdateExtendedAmountsOnBeforeInvPostBufferModify(var InvoicePostBuffer: Record "Invoice Post. Buffer"; FromInvoicePostBuffer: Record "Invoice Post. Buffer") - begin - InvoicePostBuffer."Ext. Amount CZL" += FromInvoicePostBuffer."Ext. Amount CZL"; - InvoicePostBuffer."Ext. Amount Incl. VAT CZL" += FromInvoicePostBuffer."Ext. Amount Incl. VAT CZL"; - end; -#pragma warning restore AL0432 -#endif #if not CLEAN24 #pragma warning disable AL0432 [EventSubscriber(ObjectType::Table, Database::"Invoice Posting Buffer", 'OnUpdateOnBeforeModify', '', false, false)] @@ -29,17 +19,6 @@ codeunit 31307 "Inv. Post. Buffer Handler CZL" InvoicePostingBuffer."Ext. Amount Incl. VAT CZL" += FromInvoicePostingBuffer."Ext. Amount Incl. VAT CZL"; end; #pragma warning restore AL0432 -#endif -#if not CLEAN23 -#pragma warning disable AL0432 - [EventSubscriber(ObjectType::Table, Database::"Invoice Post. Buffer", 'OnAfterCopyToGenJnlLine', '', false, false)] - local procedure CopyFieldsOnAfterCopyToGenJnlLineOld(var GenJnlLine: Record "Gen. Journal Line"; InvoicePostBuffer: Record "Invoice Post. Buffer"); - begin - GenJnlLine.Correction := InvoicePostBuffer."Correction CZL"; - GenJnlLine."VAT Reporting Date" := InvoicePostBuffer."VAT Date CZL"; - GenJnlLine."Original Doc. VAT Date CZL" := InvoicePostBuffer."Original Doc. VAT Date CZL"; - end; -#pragma warning restore AL0432 #endif [EventSubscriber(ObjectType::Table, Database::"Invoice Posting Buffer", 'OnAfterCopyToGenJnlLine', '', false, false)] diff --git a/Apps/CZ/CoreLocalizationPack/app/Src/Codeunits/PurchasePostingHandlerCZL.Codeunit.al b/Apps/CZ/CoreLocalizationPack/app/Src/Codeunits/PurchasePostingHandlerCZL.Codeunit.al index f141ff35e2..f638384ba7 100644 --- a/Apps/CZ/CoreLocalizationPack/app/Src/Codeunits/PurchasePostingHandlerCZL.Codeunit.al +++ b/Apps/CZ/CoreLocalizationPack/app/Src/Codeunits/PurchasePostingHandlerCZL.Codeunit.al @@ -36,155 +36,6 @@ codeunit 31039 "Purchase Posting Handler CZL" PurchaseAlreadyExistsQst: Label 'Purchase %1 %2 already exists for this vendor.\Do you want to continue?', Comment = '%1 = Document Type; %2 = External Document No.; e.g. Purchase Invoice 123 already exists...'; -#if not CLEAN23 -#pragma warning disable AL0432 - [EventSubscriber(ObjectType::Codeunit, Codeunit::"Purch.-Post", 'OnAfterPostInvPostBuffer', '', false, false)] - local procedure PurchasePostVATDelayOnAfterPostInvPostBuffer(var GenJnlLine: Record "Gen. Journal Line"; var InvoicePostBuffer: Record "Invoice Post. Buffer"; PurchHeader: Record "Purchase Header"; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line") - var - VATCurrFactor: Decimal; - begin - if (PurchHeader."Currency Code" <> '') and (PurchHeader."Currency Factor" <> PurchHeader."VAT Currency Factor CZL") and - ((InvoicePostBuffer."VAT Calculation Type" = InvoicePostBuffer."VAT Calculation Type"::"Reverse Charge VAT") or - (InvoicePostBuffer."VAT Calculation Type" = InvoicePostBuffer."VAT Calculation Type"::"Normal VAT")) - then begin - VATPostingSetup.Get(InvoicePostBuffer."VAT Bus. Posting Group", InvoicePostBuffer."VAT Prod. Posting Group"); - VATPostingSetup.TestField("Purch. VAT Curr. Exch. Acc CZL"); - SourceCodeSetup.Get(); - SourceCodeSetup.TestField("Purchase VAT Delay CZL"); - GenJnlLineDocType := GenJnlLine."Document Type"; - GenJnlLineDocNo := GenJnlLine."Document No."; - GenJnlLineExtDocNo := GenJnlLine."External Document No."; - - VATCurrFactor := 1; - if PurchHeader."VAT Currency Factor CZL" <> 0 then - VATCurrFactor := PurchHeader."Currency Factor" / PurchHeader."VAT Currency Factor CZL"; - - PostVATDelay(PurchHeader, InvoicePostBuffer, -1, 1, true, GenJnlPostLine); - PostVATDelay(PurchHeader, InvoicePostBuffer, 1, VATCurrFactor, false, GenJnlPostLine); - if InvoicePostBuffer."VAT Calculation Type" = InvoicePostBuffer."VAT Calculation Type"::"Normal VAT" then begin - PostVATDelayDifference(PurchHeader, InvoicePostBuffer, GlobalAmountType::Base, VATCurrFactor, GenJnlPostLine); - PostVATDelayDifference(PurchHeader, InvoicePostBuffer, GlobalAmountType::VAT, VATCurrFactor, GenJnlPostLine); - end; - end; - end; - - local procedure PostVATDelay(PurchaseHeader: Record "Purchase Header"; InvoicePostBuffer: Record "Invoice Post. Buffer"; Sign: Integer; CurrFactor: Decimal; IsCorrection: Boolean; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line") - var - GenJournalLine: Record "Gen. Journal Line"; - begin - GetCurrency(PurchaseHeader."Currency Code"); - if CurrFactor = 0 then - CurrFactor := 1; - - InitGenJournalLine(PurchaseHeader, InvoicePostBuffer, GenJournalLine); - - GenJournalLine.Quantity := Sign * GenJournalLine.Quantity; - GenJournalLine.Amount := - Sign * Round(InvoicePostBuffer.Amount * CurrFactor, Currency."Amount Rounding Precision"); - GenJournalLine."VAT Amount" := - Sign * Round(InvoicePostBuffer."VAT Amount" * CurrFactor, Currency."Amount Rounding Precision"); - GenJournalLine."VAT Base Amount" := GenJournalLine.Amount; - GenJournalLine."Source Currency Amount" := - Sign * Round(InvoicePostBuffer."Amount (ACY)" * CurrFactor, Currency."Amount Rounding Precision"); - GenJournalLine."Source Curr. VAT Amount" := - Sign * Round(InvoicePostBuffer."VAT Amount (ACY)" * CurrFactor, Currency."Amount Rounding Precision"); - GenJournalLine."Source Curr. VAT Base Amount" := GenJournalLine."Source Currency Amount"; - GenJournalLine."VAT Difference" := - Sign * Round(InvoicePostBuffer."VAT Difference" * CurrFactor, Currency."Amount Rounding Precision"); - - GenJournalLine.Correction := InvoicePostBuffer."Correction CZL" xor IsCorrection; - GenJournalLine."VAT Bus. Posting Group" := InvoicePostBuffer."VAT Bus. Posting Group"; - GenJournalLine."VAT Prod. Posting Group" := InvoicePostBuffer."VAT Prod. Posting Group"; - GenJournalLine."Gen. Bus. Posting Group" := InvoicePostBuffer."Gen. Bus. Posting Group"; - GenJournalLine."Gen. Prod. Posting Group" := InvoicePostBuffer."Gen. Prod. Posting Group"; - if not PurchaseHeader.IsEU3PartyTradeFeatureEnabled() then - PurchaseHeader."EU 3 Party Trade" := PurchaseHeader."EU 3-Party Trade CZL"; - GenJournalLine."EU 3-Party Trade" := PurchaseHeader."EU 3 Party Trade"; - GenJournalLine."EU 3-Party Intermed. Role CZL" := PurchaseHeader."EU 3-Party Intermed. Role CZL"; - - GenJnlPostLine.RunWithCheck(GenJournalLine); - end; - - local procedure PostVATDelayDifference(PurchaseHeader: Record "Purchase Header"; InvoicePostBuffer: Record "Invoice Post. Buffer"; AmountType: Option Base,VAT; CurrFactor: Decimal; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line") - var - GenJournalLine: Record "Gen. Journal Line"; - Amount: Decimal; - AccountNo: Code[20]; - begin - GetCurrency(PurchaseHeader."Currency Code"); - if CurrFactor = 0 then - CurrFactor := 1; - - case AmountType of - AmountType::Base: - Amount := - InvoicePostBuffer.Amount - - Round(InvoicePostBuffer.Amount * CurrFactor, Currency."Amount Rounding Precision"); - AmountType::VAT: - begin - Amount := - InvoicePostBuffer."VAT Amount" - - Round(InvoicePostBuffer."VAT Amount" * CurrFactor, Currency."Amount Rounding Precision"); - if Amount < 0 then - AccountNo := Currency."Realized Gains Acc." - else - AccountNo := Currency."Realized Losses Acc."; - end; - end; - - InitGenJournalLine(PurchaseHeader, InvoicePostBuffer, GenJournalLine); - GenJournalLine."Gen. Posting Type" := GenJournalLine."Gen. Posting Type"::" "; - if AccountNo <> '' then - GenJournalLine."Account No." := AccountNo; - GenJournalLine.Amount := Amount; - - GenJnlPostLine.RunWithCheck(GenJournalLine); - end; - - local procedure InitGenJournalLine(PurchaseHeader: Record "Purchase Header"; InvoicePostBuffer: Record "Invoice Post. Buffer"; var GenJournalLine: Record "Gen. Journal Line") - begin - GenJournalLine.Init(); - GenJournalLine."Document Type" := GenJnlLineDocType; - GenJournalLine."Document No." := GenJnlLineDocNo; - GenJournalLine."External Document No." := GenJnlLineExtDocNo; - GenJournalLine."Account No." := VATPostingSetup."Purch. VAT Curr. Exch. Acc CZL"; - if InvoicePostBuffer."VAT Calculation Type" = InvoicePostBuffer."VAT Calculation Type"::"Reverse Charge VAT" then - GenJournalLine."Bal. Account No." := VATPostingSetup."Purch. VAT Curr. Exch. Acc CZL"; - GenJournalLine."Posting Date" := PurchaseHeader."Posting Date"; - GenJournalLine."Document Date" := PurchaseHeader."Document Date"; - GenJournalLine."VAT Reporting Date" := PurchaseHeader."VAT Reporting Date"; - GenJournalLine."Original Doc. VAT Date CZL" := PurchaseHeader."Original Doc. VAT Date CZL"; - GenJournalLine.Description := PurchaseHeader."Posting Description"; - GenJournalLine."Reason Code" := PurchaseHeader."Reason Code"; - GenJournalLine."System-Created Entry" := InvoicePostBuffer."System-Created Entry"; - GenJournalLine."Source Currency Code" := PurchaseHeader."Currency Code"; - GenJournalLine.Correction := InvoicePostBuffer."Correction CZL"; - GenJournalLine."Gen. Posting Type" := GenJournalLine."Gen. Posting Type"::Purchase; - GenJournalLine."Tax Area Code" := InvoicePostBuffer."Tax Area Code"; - GenJournalLine."Tax Liable" := InvoicePostBuffer."Tax Liable"; - GenJournalLine."Tax Group Code" := InvoicePostBuffer."Tax Group Code"; - GenJournalLine."Use Tax" := InvoicePostBuffer."Use Tax"; - GenJournalLine."VAT Calculation Type" := InvoicePostBuffer."VAT Calculation Type"; - GenJournalLine."VAT Base Discount %" := PurchaseHeader."VAT Base Discount %"; - GenJournalLine."VAT Posting" := GenJournalLine."VAT Posting"::"Manual VAT Entry"; - GenJournalLine."Shortcut Dimension 1 Code" := InvoicePostBuffer."Global Dimension 1 Code"; - GenJournalLine."Shortcut Dimension 2 Code" := InvoicePostBuffer."Global Dimension 2 Code"; - GenJournalLine."Dimension Set ID" := InvoicePostBuffer."Dimension Set ID"; - GenJournalLine."Job No." := InvoicePostBuffer."Job No."; - GenJournalLine."Source Code" := SourceCodeSetup."Purchase VAT Delay CZL"; - GenJournalLine."Bill-to/Pay-to No." := PurchaseHeader."Pay-to Vendor No."; - GenJournalLine."Source Type" := GenJournalLine."Source Type"::Vendor; - GenJournalLine."Source No." := PurchaseHeader."Pay-to Vendor No."; - GenJournalLine."Posting No. Series" := PurchaseHeader."Posting No. Series"; - GenJournalLine."Country/Region Code" := PurchaseHeader."VAT Country/Region Code"; - GenJournalLine."VAT Registration No." := PurchaseHeader."VAT Registration No."; - GenJournalLine."Registration No. CZL" := PurchaseHeader."Registration No. CZL"; - GenJournalLine.Quantity := InvoicePostBuffer.Quantity; - GenJournalLine."VAT Delay CZL" := true; - end; - -#pragma warning restore AL0432 -#endif [EventSubscriber(ObjectType::Codeunit, Codeunit::"Purch. Post Invoice Events", 'OnPostLinesOnAfterGenJnlLinePost', '', false, false)] local procedure PurchasePostVATCurrencyFactorOnPostLinesOnAfterGenJnlLinePost(var GenJnlLine: Record "Gen. Journal Line"; TempInvoicePostingBuffer: Record "Invoice Posting Buffer"; PurchHeader: Record "Purchase Header"; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line") var @@ -435,26 +286,6 @@ codeunit 31039 "Purchase Posting Handler CZL" Handled := PersistConfirmResponseCZL.GetPersistentResponse(); end; -#if not CLEAN23 -#pragma warning disable AL0432 - [EventSubscriber(ObjectType::Codeunit, Codeunit::"Purch.-Post", 'OnBeforePostVendorEntry', '', false, false)] - local procedure UpdateSymbolsAndBankAccountOnBeforePostVendorEntry(var GenJnlLine: Record "Gen. Journal Line"; var PurchHeader: Record "Purchase Header") - begin - GenJnlLine."Specific Symbol CZL" := PurchHeader."Specific Symbol CZL"; - if PurchHeader."Variable Symbol CZL" <> '' then - GenJnlLine."Variable Symbol CZL" := PurchHeader."Variable Symbol CZL" - else - GenJnlLine."Variable Symbol CZL" := BankOperationsFunctionsCZL.CreateVariableSymbol(GenJnlLine."External Document No."); - GenJnlLine."Constant Symbol CZL" := PurchHeader."Constant Symbol CZL"; - GenJnlLine."Bank Account Code CZL" := PurchHeader."Bank Account Code CZL"; - GenJnlLine."Bank Account No. CZL" := PurchHeader."Bank Account No. CZL"; - GenJnlLine."IBAN CZL" := PurchHeader."IBAN CZL"; - GenJnlLine."SWIFT Code CZL" := PurchHeader."SWIFT Code CZL"; - GenJnlLine."Transit No. CZL" := PurchHeader."Transit No. CZL"; - end; - -#pragma warning restore AL0432 -#endif [EventSubscriber(ObjectType::Codeunit, Codeunit::"Purch. Post Invoice Events", 'OnPostLedgerEntryOnBeforeGenJnlPostLine', '', false, false)] local procedure UpdateSymbolsAndBankAccountOnPostLedgerEntryOnBeforeGenJnlPostLine(var GenJnlLine: Record "Gen. Journal Line"; var PurchHeader: Record "Purchase Header") begin @@ -522,17 +353,6 @@ codeunit 31039 "Purchase Posting Handler CZL" end; end; -#if not CLEAN23 -#pragma warning disable AL0432 - [EventSubscriber(ObjectType::Codeunit, Codeunit::"Purch.-Post", 'OnAfterFillInvoicePostBuffer', '', false, false)] - local procedure SetExtendedAmountsOnAfterFillInvoicePostBuffer(var InvoicePostBuffer: Record "Invoice Post. Buffer"; PurchLine: Record "Purchase Line") - begin - InvoicePostBuffer."Ext. Amount CZL" := PurchLine."Ext. Amount CZL"; - InvoicePostBuffer."Ext. Amount Incl. VAT CZL" := PurchLine."Ext. Amount Incl. VAT CZL"; - end; - -#pragma warning restore AL0432 -#endif #if not CLEAN24 #pragma warning disable AL0432 [EventSubscriber(ObjectType::Codeunit, Codeunit::"Purch. Post Invoice Events", 'OnPrepareLineOnAfterFillInvoicePostingBuffer', '', false, false)] diff --git a/Apps/CZ/CoreLocalizationPack/app/Src/Codeunits/RegLookupExtDataCZL.Codeunit.al b/Apps/CZ/CoreLocalizationPack/app/Src/Codeunits/RegLookupExtDataCZL.Codeunit.al index 3c09b60bc6..3b32a9a1ff 100644 --- a/Apps/CZ/CoreLocalizationPack/app/Src/Codeunits/RegLookupExtDataCZL.Codeunit.al +++ b/Apps/CZ/CoreLocalizationPack/app/Src/Codeunits/RegLookupExtDataCZL.Codeunit.al @@ -4,6 +4,8 @@ // ------------------------------------------------------------------------------------------------ namespace Microsoft.Finance.Registration; +using System.RestClient; + codeunit 11754 "Reg. Lookup Ext. Data CZL" { TableNo = "Registration Log CZL"; @@ -25,57 +27,27 @@ codeunit 11754 "Reg. Lookup Ext. Data CZL" Commit(); end; - local procedure SendRequest() HttpResponseMessage: HttpResponseMessage + local procedure SendRequest() HttpResponseMessage: Codeunit "Http Response Message" var RegNoServiceConfigCZL: Record "Reg. No. Service Config CZL"; - HttpClient: HttpClient; + RestClient: Codeunit "Rest Client"; RequestURL: Text; RegNoTok: Label '%1/%2', Locked = true, Comment = '%1 = Registration No. service URL, %2 = Registraton No.'; -#if not CLEAN23 - OldRegNoTok: Label '%1?ico=%2', Locked = true, Comment = '%1 = Registration No. service URL, %2 = Reistraton No.'; -#endif - ServiceCallErr: Label 'Web service call failed.'; begin -#if not CLEAN23 - if RegNoServiceConfigCZL.GetRegNoURL() = GetRegistrationNoValidationWebServiceURL() then - RequestURL := StrSubstNo(RegNoTok, RegNoServiceConfigCZL.GetRegNoURL(), RegistrationLogCZL."Registration No.") - else - RequestURL := StrSubstNo(OldRegNoTok, RegNoServiceConfigCZL.GetRegNoURL(), RegistrationLogCZL."Registration No."); -#else RequestURL := StrSubstNo(RegNoTok, RegNoServiceConfigCZL.GetRegNoURL(), RegistrationLogCZL."Registration No."); -#endif - if not HttpClient.Get(RequestURL, HttpResponseMessage) then - Error(ServiceCallErr); + RestClient.Initialize(); + HttpResponseMessage := RestClient.Get(RequestURL); end; - local procedure InsertLogEntry(HttpResponseMessage: HttpResponseMessage) + local procedure InsertLogEntry(HttpResponseMessage: Codeunit "Http Response Message") var - ResponseObject: JsonObject; -#if not CLEAN23 - ResponseXmlDoc: XmlDocument; -#endif - HttpResponseText: Text; -#if not CLEAN23 - NamespaceTok: Label 'http://wwwinfo.mfcr.cz/ares/xml_doc/schemas/ares/ares_datatypes/v_1.0.3', Locked = true; -#endif + ResponseJsonObject: JsonObject; begin - HttpResponseMessage.Content().ReadAs(HttpResponseText); -#if not CLEAN23 - if ResponseObject.ReadFrom(HttpResponseText) then begin -#endif - if HttpResponseMessage.IsSuccessStatusCode() then - RegistrationLogMgtCZL.LogVerification(RegistrationLogCZL, ResponseObject) - else - RegistrationLogMgtCZL.LogError(RegistrationLogCZL, ResponseObject); -#if not CLEAN23 - exit; - end; - - XmlDocument.ReadFrom(HttpResponseText, ResponseXmlDoc); -#pragma warning disable AL0432 - RegistrationLogMgtCZL.LogVerification(RegistrationLogCZL, ResponseXmlDoc, NamespaceTok); -#pragma warning restore AL0432 -#endif + ResponseJsonObject := HttpResponseMessage.GetContent().AsJson().AsObject(); + if HttpResponseMessage.GetIsSuccessStatusCode() then + RegistrationLogMgtCZL.LogVerification(RegistrationLogCZL, ResponseJsonObject) + else + RegistrationLogMgtCZL.LogError(RegistrationLogCZL, ResponseJsonObject); end; procedure GetRegistrationNoValidationWebServiceURL(): Text[250] diff --git a/Apps/CZ/CoreLocalizationPack/app/Src/Codeunits/RegistrationLogMgtCZL.Codeunit.al b/Apps/CZ/CoreLocalizationPack/app/Src/Codeunits/RegistrationLogMgtCZL.Codeunit.al index aef49cec45..dd7041ec00 100644 --- a/Apps/CZ/CoreLocalizationPack/app/Src/Codeunits/RegistrationLogMgtCZL.Codeunit.al +++ b/Apps/CZ/CoreLocalizationPack/app/Src/Codeunits/RegistrationLogMgtCZL.Codeunit.al @@ -162,70 +162,6 @@ codeunit 11755 "Registration Log Mgt. CZL" if NewRegistrationLogCZL.LogDetails() then NewRegistrationLogCZL.Modify(); end; -#if not CLEAN23 - [Obsolete('Replaced by LogVerification and LogError functions with JsonObject parameter.', '23.0')] - procedure LogVerification(var NewRegistrationLogCZL: Record "Registration Log CZL"; XmlDoc: XmlDocument; Namespace: Text) - var - Address: array[10] of Text; - AddressText: Text; - Error: Text; - begin - if ExtractValue('//D:VBAS', XmlDoc, Namespace) <> '' then begin - NewRegistrationLogCZL."Entry No." := 0; - NewRegistrationLogCZL.Status := NewRegistrationLogCZL.Status::Valid; - NewRegistrationLogCZL."Verified Date" := CurrentDateTime; - NewRegistrationLogCZL."User ID" := CopyStr(UserId(), 1, MaxStrLen(NewRegistrationLogCZL."User ID")); - - // VAT Registration No. - NewRegistrationLogCZL."Verified VAT Registration No." := - CopyStr(ExtractValue('//D:DIC', XmlDoc, Namespace), 1, MaxStrLen(NewRegistrationLogCZL."Verified VAT Registration No.")); - - // Name - NewRegistrationLogCZL."Verified Name" := - CopyStr(ExtractValue('//D:OF', XmlDoc, Namespace), 1, MaxStrLen(NewRegistrationLogCZL."Verified Name")); - - // Address information - if ExtractValue('//D:AA', XmlDoc, Namespace) <> '' then begin - // City - NewRegistrationLogCZL."Verified City" := - CopyStr(ExtractValue('//D:N', XmlDoc, Namespace), 1, MaxStrLen(NewRegistrationLogCZL."Verified City")); - - // Post Code - NewRegistrationLogCZL."Verified Post Code" := - CopyStr(ExtractValue('//D:PSC', XmlDoc, Namespace), 1, MaxStrLen(NewRegistrationLogCZL."Verified Post Code")); - - Address[1] := ExtractValue('//D:NU', XmlDoc, Namespace); // Street - Address[2] := ExtractValue('//D:NCO', XmlDoc, Namespace); // Quarter - Address[3] := ExtractValue('//D:CD', XmlDoc, Namespace); // Descriptive No. - Address[4] := ExtractValue('//D:CO', XmlDoc, Namespace); // House No. - AddressText := ExtractValue('//D:AT', XmlDoc, Namespace); // Address Text - end; - - NewRegistrationLogCZL."Verified Address" := CopyStr(FormatAddress(Address), 1, MaxStrLen(NewRegistrationLogCZL."Verified Address")); - if NewRegistrationLogCZL."Verified Address" = '' then - NewRegistrationLogCZL."Verified Address" := CopyStr(AddressText, 1, MaxStrLen(NewRegistrationLogCZL."Verified Address")); - NewRegistrationLogCZL.Insert(true); - - if NewRegistrationLogCZL.LogDetails() then - NewRegistrationLogCZL.Modify(); - end else begin - if ExtractValue('//D:E', XmlDoc, Namespace) <> '' then - Error := ExtractValue('//D:ET', XmlDoc, Namespace); - - NewRegistrationLogCZL."Entry No." := 0; - NewRegistrationLogCZL."Verified Date" := CurrentDateTime; - NewRegistrationLogCZL.Status := NewRegistrationLogCZL.Status::Invalid; - NewRegistrationLogCZL."User ID" := CopyStr(UserId(), 1, MaxStrLen(NewRegistrationLogCZL."User ID")); - NewRegistrationLogCZL."Verified Result" := CopyStr(Error, 1, MaxStrLen(NewRegistrationLogCZL."Verified Result")); - NewRegistrationLogCZL."Verified Name" := ''; - NewRegistrationLogCZL."Verified Address" := ''; - NewRegistrationLogCZL."Verified City" := ''; - NewRegistrationLogCZL."Verified Post Code" := ''; - NewRegistrationLogCZL."Verified VAT Registration No." := ''; - NewRegistrationLogCZL.Insert(true); - end; - end; -#endif local procedure FormatPostCode(PostCode: Text): Code[20] var @@ -371,17 +307,6 @@ codeunit 11755 "Registration Log Mgt. CZL" exit; InitServiceSetup(); end; -#if not CLEAN23 - local procedure ExtractValue(Xpath: Text; XMLDoc: XmlDocument; Namespace: Text): Text - var - XMLNamespaceManager: XmlNamespaceManager; - FoundXMLNode: XmlNode; - begin - XmlNamespaceManager.AddNamespace('D', Namespace); - if XmlDoc.SelectSingleNode(XPath, XmlNamespaceManager, FoundXMLNode) then - exit(FoundXMLNode.AsXmlElement().InnerText()); - end; -#endif local procedure GetValue(JsonObject: JsonObject; JsonKey: Text; var Result: Text): Boolean var diff --git a/Apps/CZ/CoreLocalizationPack/app/Src/Codeunits/SalesPostingHandlerCZL.Codeunit.al b/Apps/CZ/CoreLocalizationPack/app/Src/Codeunits/SalesPostingHandlerCZL.Codeunit.al index 272f0601e4..05a6251182 100644 --- a/Apps/CZ/CoreLocalizationPack/app/Src/Codeunits/SalesPostingHandlerCZL.Codeunit.al +++ b/Apps/CZ/CoreLocalizationPack/app/Src/Codeunits/SalesPostingHandlerCZL.Codeunit.al @@ -34,151 +34,6 @@ codeunit 31038 "Sales Posting Handler CZL" GenJnlLineExtDocNo: Code[35]; GlobalAmountType: Option Base,VAT; -#if not CLEAN23 -#pragma warning disable AL0432 - [EventSubscriber(ObjectType::Codeunit, Codeunit::"Sales-Post", 'OnAfterPostInvPostBuffer', '', false, false)] - local procedure SalesPostVATDelayOnAfterPostInvPostBuffer(var GenJnlLine: Record "Gen. Journal Line"; var InvoicePostBuffer: Record "Invoice Post. Buffer"; var SalesHeader: Record "Sales Header"; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line") - var - VATCurrFactor: Decimal; - begin - if (SalesHeader."Currency Code" <> '') and (SalesHeader."Currency Factor" <> SalesHeader."VAT Currency Factor CZL") and - ((InvoicePostBuffer."VAT Calculation Type" = InvoicePostBuffer."VAT Calculation Type"::"Reverse Charge VAT") or - (InvoicePostBuffer."VAT Calculation Type" = InvoicePostBuffer."VAT Calculation Type"::"Normal VAT")) - then begin - VATPostingSetup.Get(InvoicePostBuffer."VAT Bus. Posting Group", InvoicePostBuffer."VAT Prod. Posting Group"); - VATPostingSetup.TestField("Sales VAT Curr. Exch. Acc CZL"); - SourceCodeSetup.Get(); - SourceCodeSetup.TestField("Sales VAT Delay CZL"); - GenJnlLineDocType := GenJnlLine."Document Type"; - GenJnlLineDocNo := GenJnlLine."Document No."; - GenJnlLineExtDocNo := GenJnlLine."External Document No."; - - VATCurrFactor := 1; - if SalesHeader."VAT Currency Factor CZL" <> 0 then - VATCurrFactor := SalesHeader."Currency Factor" / SalesHeader."VAT Currency Factor CZL"; - - PostVATDelay(SalesHeader, InvoicePostBuffer, -1, 1, true, GenJnlPostLine); - PostVATDelay(SalesHeader, InvoicePostBuffer, 1, VATCurrFactor, false, GenJnlPostLine); - if InvoicePostBuffer."VAT Calculation Type" = InvoicePostBuffer."VAT Calculation Type"::"Normal VAT" then begin - PostVATDelayDifference(SalesHeader, InvoicePostBuffer, GlobalAmountType::Base, VATCurrFactor, GenJnlPostLine); - PostVATDelayDifference(SalesHeader, InvoicePostBuffer, GlobalAmountType::VAT, VATCurrFactor, GenJnlPostLine); - end; - end; - end; - - local procedure PostVATDelay(SalesHeader: Record "Sales Header"; InvoicePostBuffer: Record "Invoice Post. Buffer"; Sign: Integer; CurrFactor: Decimal; IsCorrection: Boolean; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line") - var - GenJournalLine: Record "Gen. Journal Line"; - begin - GetCurrency(SalesHeader."Currency Code"); - if CurrFactor = 0 then - CurrFactor := 1; - - InitGenJournalLine(SalesHeader, InvoicePostBuffer, GenJournalLine); - - GenJournalLine.Quantity := Sign * GenJournalLine.Quantity; - GenJournalLine.Amount := - Sign * Round(InvoicePostBuffer.Amount * CurrFactor, Currency."Amount Rounding Precision"); - GenJournalLine."VAT Amount" := - Sign * Round(InvoicePostBuffer."VAT Amount" * CurrFactor, Currency."Amount Rounding Precision"); - GenJournalLine."VAT Base Amount" := GenJournalLine.Amount; - GenJournalLine."Source Currency Amount" := - Sign * Round(InvoicePostBuffer."Amount (ACY)" * CurrFactor, Currency."Amount Rounding Precision"); - GenJournalLine."Source Curr. VAT Amount" := - Sign * Round(InvoicePostBuffer."VAT Amount (ACY)" * CurrFactor, Currency."Amount Rounding Precision"); - GenJournalLine."Source Curr. VAT Base Amount" := GenJournalLine."Source Currency Amount"; - GenJournalLine."VAT Difference" := - Sign * Round(InvoicePostBuffer."VAT Difference" * CurrFactor, Currency."Amount Rounding Precision"); - - GenJournalLine.Correction := InvoicePostBuffer."Correction CZL" xor IsCorrection; - GenJournalLine."VAT Bus. Posting Group" := InvoicePostBuffer."VAT Bus. Posting Group"; - GenJournalLine."VAT Prod. Posting Group" := InvoicePostBuffer."VAT Prod. Posting Group"; - GenJournalLine."Gen. Bus. Posting Group" := InvoicePostBuffer."Gen. Bus. Posting Group"; - GenJournalLine."Gen. Prod. Posting Group" := InvoicePostBuffer."Gen. Prod. Posting Group"; - - GenJnlPostLine.RunWithCheck(GenJournalLine); - end; - - local procedure PostVATDelayDifference(SalesHeader: Record "Sales Header"; InvoicePostBuffer: Record "Invoice Post. Buffer"; AmountType: Option Base,VAT; CurrFactor: Decimal; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line") - var - GenJournalLine: Record "Gen. Journal Line"; - Amount: Decimal; - AccountNo: Code[20]; - begin - GetCurrency(SalesHeader."Currency Code"); - if CurrFactor = 0 then - CurrFactor := 1; - - case AmountType of - AmountType::Base: - Amount := - InvoicePostBuffer.Amount - - Round(InvoicePostBuffer.Amount * CurrFactor, Currency."Amount Rounding Precision"); - AmountType::VAT: - begin - Amount := - InvoicePostBuffer."VAT Amount" - - Round(InvoicePostBuffer."VAT Amount" * CurrFactor, Currency."Amount Rounding Precision"); - if Amount < 0 then - AccountNo := Currency."Realized Gains Acc." - else - AccountNo := Currency."Realized Losses Acc."; - end; - end; - - InitGenJournalLine(SalesHeader, InvoicePostBuffer, GenJournalLine); - GenJournalLine."Gen. Posting Type" := GenJournalLine."Gen. Posting Type"::" "; - if AccountNo <> '' then - GenJournalLine."Account No." := AccountNo; - GenJournalLine.Amount := Amount; - - GenJnlPostLine.RunWithCheck(GenJournalLine); - end; - - local procedure InitGenJournalLine(SalesHeader: Record "Sales Header"; InvoicePostBuffer: Record "Invoice Post. Buffer"; var GenJournalLine: Record "Gen. Journal Line") - begin - GenJournalLine.Init(); - GenJournalLine."Document Type" := GenJnlLineDocType; - GenJournalLine."Document No." := GenJnlLineDocNo; - GenJournalLine."External Document No." := GenJnlLineExtDocNo; - GenJournalLine."Account No." := VATPostingSetup."Sales VAT Curr. Exch. Acc CZL"; - if InvoicePostBuffer."VAT Calculation Type" = InvoicePostBuffer."VAT Calculation Type"::"Reverse Charge VAT" then - GenJournalLine."Bal. Account No." := VATPostingSetup."Sales VAT Curr. Exch. Acc CZL"; - GenJournalLine."Posting Date" := SalesHeader."Posting Date"; - GenJournalLine."Document Date" := SalesHeader."Document Date"; - GenJournalLine."VAT Reporting Date" := SalesHeader."VAT Reporting Date"; - GenJournalLine."Original Doc. VAT Date CZL" := SalesHeader."Original Doc. VAT Date CZL"; - GenJournalLine.Description := SalesHeader."Posting Description"; - GenJournalLine."Reason Code" := SalesHeader."Reason Code"; - GenJournalLine."System-Created Entry" := InvoicePostBuffer."System-Created Entry"; - GenJournalLine."Source Currency Code" := SalesHeader."Currency Code"; - GenJournalLine.Correction := InvoicePostBuffer."Correction CZL"; - GenJournalLine."Gen. Posting Type" := GenJournalLine."Gen. Posting Type"::Sale; - GenJournalLine."Tax Area Code" := InvoicePostBuffer."Tax Area Code"; - GenJournalLine."Tax Liable" := InvoicePostBuffer."Tax Liable"; - GenJournalLine."Tax Group Code" := InvoicePostBuffer."Tax Group Code"; - GenJournalLine."Use Tax" := InvoicePostBuffer."Use Tax"; - GenJournalLine."VAT Calculation Type" := InvoicePostBuffer."VAT Calculation Type"; - GenJournalLine."VAT Base Discount %" := SalesHeader."VAT Base Discount %"; - GenJournalLine."VAT Posting" := GenJournalLine."VAT Posting"::"Manual VAT Entry"; - GenJournalLine."Shortcut Dimension 1 Code" := InvoicePostBuffer."Global Dimension 1 Code"; - GenJournalLine."Shortcut Dimension 2 Code" := InvoicePostBuffer."Global Dimension 2 Code"; - GenJournalLine."Dimension Set ID" := InvoicePostBuffer."Dimension Set ID"; - GenJournalLine."Job No." := InvoicePostBuffer."Job No."; - GenJournalLine."Source Code" := SourceCodeSetup."Sales VAT Delay CZL"; - GenJournalLine."Bill-to/Pay-to No." := SalesHeader."Bill-to Customer No."; - GenJournalLine."Source Type" := GenJournalLine."Source Type"::Customer; - GenJournalLine."Source No." := SalesHeader."Bill-to Customer No."; - GenJournalLine."Posting No. Series" := SalesHeader."Posting No. Series"; - GenJournalLine."Country/Region Code" := SalesHeader."VAT Country/Region Code"; - GenJournalLine."VAT Registration No." := SalesHeader."VAT Registration No."; - GenJournalLine."Registration No. CZL" := SalesHeader."Registration No. CZL"; - GenJournalLine.Quantity := InvoicePostBuffer.Quantity; - GenJournalLine."VAT Delay CZL" := true; - end; - -#pragma warning restore AL0432 -#endif [EventSubscriber(ObjectType::Codeunit, Codeunit::"Sales Post Invoice Events", 'OnPostLinesOnAfterGenJnlLinePost', '', false, false)] local procedure SalesPostVATDelayOnPostLinesOnAfterGenJnlLinePost(var GenJnlLine: Record "Gen. Journal Line"; TempInvoicePostingBuffer: Record "Invoice Posting Buffer"; SalesHeader: Record "Sales Header"; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line") var @@ -511,26 +366,6 @@ codeunit 31038 "Sales Posting Handler CZL" exit(ItemNoText); end; -#if not CLEAN23 -#pragma warning disable AL0432 - [EventSubscriber(ObjectType::Codeunit, Codeunit::"Sales-Post", 'OnBeforePostCustomerEntry', '', false, false)] - local procedure UpdateSymbolsAndBankAccountOnBeforePostCustomerEntry(var GenJnlLine: Record "Gen. Journal Line"; var SalesHeader: Record "Sales Header") - begin - GenJnlLine."Specific Symbol CZL" := SalesHeader."Specific Symbol CZL"; - if SalesHeader."Variable Symbol CZL" <> '' then - GenJnlLine."Variable Symbol CZL" := SalesHeader."Variable Symbol CZL" - else - GenJnlLine."Variable Symbol CZL" := BankOperationsFunctionsCZL.CreateVariableSymbol(GenJnlLine."Document No."); - GenJnlLine."Constant Symbol CZL" := SalesHeader."Constant Symbol CZL"; - GenJnlLine."Bank Account Code CZL" := SalesHeader."Bank Account Code CZL"; - GenJnlLine."Bank Account No. CZL" := SalesHeader."Bank Account No. CZL"; - GenJnlLine."IBAN CZL" := SalesHeader."IBAN CZL"; - GenJnlLine."SWIFT Code CZL" := SalesHeader."SWIFT Code CZL"; - GenJnlLine."Transit No. CZL" := SalesHeader."Transit No. CZL"; - end; - -#pragma warning restore AL0432 -#endif [EventSubscriber(ObjectType::Codeunit, Codeunit::"Sales Post Invoice Events", 'OnPostLedgerEntryOnBeforeGenJnlPostLine', '', false, false)] local procedure UpdateSymbolsAndBankAccountOnPostLedgerEntryOnBeforeGenJnlPostLine(var GenJnlLine: Record "Gen. Journal Line"; var SalesHeader: Record "Sales Header") begin diff --git a/Apps/CZ/CoreLocalizationPack/app/Src/Codeunits/ServicePostingHandlerCZL.Codeunit.al b/Apps/CZ/CoreLocalizationPack/app/Src/Codeunits/ServicePostingHandlerCZL.Codeunit.al index 8c6a728b5d..205ea33ac4 100644 --- a/Apps/CZ/CoreLocalizationPack/app/Src/Codeunits/ServicePostingHandlerCZL.Codeunit.al +++ b/Apps/CZ/CoreLocalizationPack/app/Src/Codeunits/ServicePostingHandlerCZL.Codeunit.al @@ -26,101 +26,6 @@ codeunit 31040 "Service Posting Handler CZL" BankOperationsFunctionsCZL: Codeunit "Bank Operations Functions CZL"; ReverseChargeCheckCZL: Enum "Reverse Charge Check CZL"; -#if not CLEAN23 -#pragma warning disable AL0432 - [EventSubscriber(ObjectType::Codeunit, Codeunit::"Serv-Posting Journals Mgt.", 'OnAfterPostInvoicePostBuffer', '', false, false)] - local procedure ServPostingVATCurrencyFactorOnAfterPostInvPostBuffer(var GenJournalLine: Record "Gen. Journal Line"; var InvoicePostBuffer: Record "Invoice Post. Buffer"; ServiceHeader: Record "Service Header"; GLEntryNo: Integer; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line") - var - VATPostingSetup: Record "VAT Posting Setup"; - VATCurrFactor: Decimal; - begin - if ServiceHeader."Currency Factor" <> ServiceHeader."VAT Currency Factor CZL" then begin - VATPostingSetup.Get(GenJournalLine."VAT Bus. Posting Group", GenJournalLine."VAT Prod. Posting Group"); - VATPostingSetup.TestField("VAT Calculation Type", VATPostingSetup."VAT Calculation Type"::"Reverse Charge VAT"); - VATPostingSetup.TestField("Sales VAT Curr. Exch. Acc CZL"); - SourceCodeSetup.Get(); - SourceCodeSetup.TestField("Sales VAT Delay CZL"); - GLEntry.Get(GLEntryNo); - PostServiceVATCurrencyFactor(ServiceHeader, InvoicePostBuffer, false, 1, true, VATPostingSetup, GenJnlPostLine); - if ServiceHeader."VAT Currency Factor CZL" = 0 then - VATCurrFactor := 1 - else - VATCurrFactor := ServiceHeader."Currency Factor" / ServiceHeader."VAT Currency Factor CZL"; - if VATCurrFactor = 0 then - VATCurrFactor := 1; - - PostServiceVATCurrencyFactor(ServiceHeader, InvoicePostBuffer, true, VATCurrFactor, false, VATPostingSetup, GenJnlPostLine); - end; - end; - - local procedure PostServiceVATCurrencyFactor(ServiceHeader: Record "Service Header"; InvoicePostBuffer: Record "Invoice Post. Buffer"; ToPost: Boolean; CurrFactor: Decimal; IsCorrection: Boolean; VATPostingSetup: Record "VAT Posting Setup"; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line") - var - GenJournalLine: Record "Gen. Journal Line"; - Sign: Integer; - begin - if ToPost then - Sign := 1 - else - Sign := -1; - - GenJournalLine.Init(); - GenJournalLine."Posting Date" := ServiceHeader."Posting Date"; - GenJournalLine.Validate("VAT Reporting Date", ServiceHeader."VAT Reporting Date"); - GenJournalLine."Document Date" := ServiceHeader."Document Date"; - GenJournalLine.Description := ServiceHeader."Posting Description"; - GenJournalLine."Reason Code" := ServiceHeader."Reason Code"; - GenJournalLine."Document Type" := GLEntry."Document Type"; - GenJournalLine."Document No." := GLEntry."Document No."; - GenJournalLine."External Document No." := GLEntry."External Document No."; - GenJournalLine."Account No." := VATPostingSetup."Sales VAT Curr. Exch. Acc CZL"; - GenJournalLine."System-Created Entry" := InvoicePostBuffer."System-Created Entry"; - GenJournalLine."Source Currency Code" := ServiceHeader."Currency Code"; - GetCurrency(ServiceHeader."Currency Code"); - if IsCorrection then - GenJournalLine.Correction := not InvoicePostBuffer."Correction CZL" - else - GenJournalLine.Correction := InvoicePostBuffer."Correction CZL"; - GenJournalLine."Gen. Posting Type" := GenJournalLine."Gen. Posting Type"::Sale; - GenJournalLine."VAT Bus. Posting Group" := InvoicePostBuffer."VAT Bus. Posting Group"; - GenJournalLine."VAT Prod. Posting Group" := InvoicePostBuffer."VAT Prod. Posting Group"; - GenJournalLine."Tax Area Code" := InvoicePostBuffer."Tax Area Code"; - GenJournalLine."Tax Liable" := InvoicePostBuffer."Tax Liable"; - GenJournalLine."Tax Group Code" := InvoicePostBuffer."Tax Group Code"; - GenJournalLine."Use Tax" := InvoicePostBuffer."Use Tax"; - GenJournalLine."VAT Calculation Type" := InvoicePostBuffer."VAT Calculation Type"; - GenJournalLine."VAT Base Discount %" := ServiceHeader."VAT Base Discount %"; - GenJournalLine."VAT Posting" := GenJournalLine."VAT Posting"::"Manual VAT Entry"; - GenJournalLine."Shortcut Dimension 1 Code" := InvoicePostBuffer."Global Dimension 1 Code"; - GenJournalLine."Shortcut Dimension 2 Code" := InvoicePostBuffer."Global Dimension 2 Code"; - GenJournalLine."Dimension Set ID" := InvoicePostBuffer."Dimension Set ID"; - GenJournalLine."Job No." := InvoicePostBuffer."Job No."; - GenJournalLine."Source Code" := SourceCodeSetup."Sales VAT Delay CZL"; - GenJournalLine."Bill-to/Pay-to No." := ServiceHeader."Bill-to Customer No."; - GenJournalLine."Source Type" := GenJournalLine."Source Type"::Customer; - GenJournalLine."Source No." := ServiceHeader."Bill-to Customer No."; - GenJournalLine."Posting No. Series" := ServiceHeader."Posting No. Series"; - GenJournalLine."Bal. Account No." := VATPostingSetup."Sales VAT Curr. Exch. Acc CZL"; - GenJournalLine.Quantity := Sign * InvoicePostBuffer.Quantity; - GenJournalLine.Amount := Round(Sign * InvoicePostBuffer.Amount * CurrFactor, Currency."Amount Rounding Precision"); - GenJournalLine."VAT Amount" := Round(Sign * InvoicePostBuffer."VAT Amount" * - CurrFactor, Currency."Amount Rounding Precision"); - GenJournalLine."VAT Base Amount" := GenJournalLine.Amount; - GenJournalLine."Source Currency Amount" := Round(Sign * InvoicePostBuffer."Amount (ACY)" * CurrFactor, - Currency."Amount Rounding Precision"); - GenJournalLine."Source Curr. VAT Amount" := Round(Sign * InvoicePostBuffer."VAT Amount (ACY)" * CurrFactor, - Currency."Amount Rounding Precision"); - GenJournalLine."Source Curr. VAT Base Amount" := GenJournalLine."Source Currency Amount" - GenJournalLine."Source Curr. VAT Amount"; - GenJournalLine."VAT Difference" := Round(Sign * InvoicePostBuffer."VAT Difference" * CurrFactor, - Currency."Amount Rounding Precision"); - GenJournalLine."Gen. Bus. Posting Group" := InvoicePostBuffer."Gen. Bus. Posting Group"; - GenJournalLine."Gen. Prod. Posting Group" := InvoicePostBuffer."Gen. Prod. Posting Group"; - GenJournalLine.Validate("VAT Delay CZL", true); - - GenJnlPostLine.RunWithCheck(GenJournalLine); - end; - -#pragma warning restore AL0432 -#endif [EventSubscriber(ObjectType::Codeunit, Codeunit::"Service Post Invoice Events", 'OnPostLinesOnAfterGenJnlLinePost', '', false, false)] local procedure ServicePostVATCurrencyFactorOnPostLinesOnAfterGenJnlLinePost(var GenJnlLine: Record "Gen. Journal Line"; TempInvoicePostingBuffer: Record "Invoice Posting Buffer"; ServiceHeader: Record "Service Header"; GLEntryNo: Integer; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line") var @@ -263,26 +168,6 @@ codeunit 31040 "Service Posting Handler CZL" until ServiceLine.Next() = 0; end; -#if not CLEAN23 -#pragma warning disable AL0432 - [EventSubscriber(ObjectType::Codeunit, Codeunit::"Serv-Posting Journals Mgt.", 'OnBeforePostCustomerEntry', '', false, false)] -#pragma warning restore AL0432 - local procedure UpdateSymbolsAndBankAccountOnBeforePostCustomerEntry(var GenJournalLine: Record "Gen. Journal Line"; ServiceHeader: Record "Service Header") - begin - GenJournalLine."Specific Symbol CZL" := ServiceHeader."Specific Symbol CZL"; - if ServiceHeader."Variable Symbol CZL" <> '' then - GenJournalLine."Variable Symbol CZL" := ServiceHeader."Variable Symbol CZL" - else - GenJournalLine."Variable Symbol CZL" := BankOperationsFunctionsCZL.CreateVariableSymbol(GenJournalLine."Document No."); - GenJournalLine."Constant Symbol CZL" := ServiceHeader."Constant Symbol CZL"; - GenJournalLine."Bank Account Code CZL" := ServiceHeader."Bank Account Code CZL"; - GenJournalLine."Bank Account No. CZL" := ServiceHeader."Bank Account No. CZL"; - GenJournalLine."IBAN CZL" := ServiceHeader."IBAN CZL"; - GenJournalLine."SWIFT Code CZL" := ServiceHeader."SWIFT Code CZL"; - GenJournalLine."Transit No. CZL" := ServiceHeader."Transit No. CZL"; - end; -#endif - [EventSubscriber(ObjectType::Codeunit, Codeunit::"Service Post Invoice Events", 'OnPostLedgerEntryOnBeforeGenJnlPostLine', '', false, false)] local procedure UpdateSymbolsAndBankAccountOnPostLedgerEntryOnBeforeGenJnlPostLine(var GenJournalLine: Record "Gen. Journal Line"; ServiceHeader: Record "Service Header") begin diff --git a/Apps/CZ/CoreLocalizationPack/app/Src/Codeunits/SyncDepFldContactCZL.Codeunit.al b/Apps/CZ/CoreLocalizationPack/app/Src/Codeunits/SyncDepFldContactCZL.Codeunit.al deleted file mode 100644 index cabcd85da6..0000000000 --- a/Apps/CZ/CoreLocalizationPack/app/Src/Codeunits/SyncDepFldContactCZL.Codeunit.al +++ /dev/null @@ -1,58 +0,0 @@ -// ------------------------------------------------------------------------------------------------ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// ------------------------------------------------------------------------------------------------ -#if not CLEAN23 -namespace Microsoft.Utilities; - -using Microsoft.CRM.Contact; - -#pragma warning disable AL0432 -codeunit 31152 "Sync.Dep.Fld-Contact CZL" -{ - Access = Internal; - Permissions = tabledata "Contact" = rimd; - - [EventSubscriber(ObjectType::Table, Database::Contact, 'OnBeforeInsertEvent', '', false, false)] - local procedure SyncOnBeforeInsertContact(var Rec: Record Contact) - begin - SyncDeprecatedFields(Rec); - end; - - [EventSubscriber(ObjectType::Table, Database::Contact, 'OnBeforeModifyEvent', '', false, false)] - local procedure SyncOnBeforeModifyContact(var Rec: Record Contact) - begin - SyncDeprecatedFields(Rec); - end; - - local procedure SyncDeprecatedFields(var Rec: Record Contact) - var - PreviousRecord: Record Contact; - SyncDepFldUtilities: Codeunit "Sync.Dep.Fld-Utilities"; - PreviousRecordRef: RecordRef; - DepFieldTxt, NewFieldTxt : Text; - begin - if Rec.IsTemporary() then - exit; - if SyncDepFldUtilities.GetPreviousRecord(Rec, PreviousRecordRef) then - PreviousRecordRef.SetTable(PreviousRecord); - DepFieldTxt := Rec."Registration No. CZL"; - NewFieldTxt := Rec."Registration Number"; - SyncDepFldUtilities.SyncFields(DepFieldTxt, NewFieldTxt, PreviousRecord."Registration No. CZL", PreviousRecord."Registration Number"); - Rec."Registration No. CZL" := CopyStr(DepFieldTxt, 1, MaxStrLen(Rec."Registration No. CZL")); - Rec."Registration Number" := CopyStr(NewFieldTxt, 1, MaxStrLen(Rec."Registration Number")); - end; - - [EventSubscriber(ObjectType::Table, Database::Contact, 'OnAfterValidateEvent', 'Registration No. CZL', false, false)] - local procedure SyncOnAfterValidateRegistrationNoCZL(var Rec: Record Contact) - begin - Rec."Registration Number" := Rec."Registration No. CZL"; - end; - - [EventSubscriber(ObjectType::Table, Database::Contact, 'OnAfterValidateEvent', 'Registration Number', false, false)] - local procedure SyncOnAfterValidateVatReportingDate(var Rec: Record Contact) - begin - Rec."Registration No. CZL" := Rec.GetRegistrationNoTrimmedCZL(); - end; -} -#endif diff --git a/Apps/CZ/CoreLocalizationPack/app/Src/Codeunits/SyncDepFldCustomerCZL.Codeunit.al b/Apps/CZ/CoreLocalizationPack/app/Src/Codeunits/SyncDepFldCustomerCZL.Codeunit.al deleted file mode 100644 index ff3e6b401d..0000000000 --- a/Apps/CZ/CoreLocalizationPack/app/Src/Codeunits/SyncDepFldCustomerCZL.Codeunit.al +++ /dev/null @@ -1,58 +0,0 @@ -// ------------------------------------------------------------------------------------------------ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// ------------------------------------------------------------------------------------------------ -#if not CLEAN23 -namespace Microsoft.Utilities; - -using Microsoft.Sales.Customer; - -#pragma warning disable AL0432 -codeunit 31150 "Sync.Dep.Fld-Customer CZL" -{ - Access = Internal; - Permissions = tabledata "Customer" = rimd; - - [EventSubscriber(ObjectType::Table, Database::Customer, 'OnBeforeInsertEvent', '', false, false)] - local procedure SyncOnBeforeInsertCustomer(var Rec: Record Customer) - begin - SyncDeprecatedFields(Rec); - end; - - [EventSubscriber(ObjectType::Table, Database::Customer, 'OnBeforeModifyEvent', '', false, false)] - local procedure SyncOnBeforeModifyCustomer(var Rec: Record Customer) - begin - SyncDeprecatedFields(Rec); - end; - - local procedure SyncDeprecatedFields(var Rec: Record Customer) - var - PreviousRecord: Record Customer; - SyncDepFldUtilities: Codeunit "Sync.Dep.Fld-Utilities"; - PreviousRecordRef: RecordRef; - DepFieldTxt, NewFieldTxt : Text; - begin - if Rec.IsTemporary() then - exit; - if SyncDepFldUtilities.GetPreviousRecord(Rec, PreviousRecordRef) then - PreviousRecordRef.SetTable(PreviousRecord); - DepFieldTxt := Rec."Registration No. CZL"; - NewFieldTxt := Rec."Registration Number"; - SyncDepFldUtilities.SyncFields(DepFieldTxt, NewFieldTxt, PreviousRecord."Registration No. CZL", PreviousRecord."Registration Number"); - Rec."Registration No. CZL" := CopyStr(DepFieldTxt, 1, MaxStrLen(Rec."Registration No. CZL")); - Rec."Registration Number" := CopyStr(NewFieldTxt, 1, MaxStrLen(Rec."Registration Number")); - end; - - [EventSubscriber(ObjectType::Table, Database::Customer, 'OnAfterValidateEvent', 'Registration No. CZL', false, false)] - local procedure SyncOnAfterValidateRegistrationNoCZL(var Rec: Record Customer) - begin - Rec."Registration Number" := Rec."Registration No. CZL"; - end; - - [EventSubscriber(ObjectType::Table, Database::Customer, 'OnAfterValidateEvent', 'Registration Number', false, false)] - local procedure SyncOnAfterValidateVatReportingDate(var Rec: Record Customer) - begin - Rec."Registration No. CZL" := Rec.GetRegistrationNoTrimmedCZL(); - end; -} -#endif diff --git a/Apps/CZ/CoreLocalizationPack/app/Src/Codeunits/SyncDepFldPCrMemoHdrCZL.Codeunit.al b/Apps/CZ/CoreLocalizationPack/app/Src/Codeunits/SyncDepFldPCrMemoHdrCZL.Codeunit.al deleted file mode 100644 index b9c6991960..0000000000 --- a/Apps/CZ/CoreLocalizationPack/app/Src/Codeunits/SyncDepFldPCrMemoHdrCZL.Codeunit.al +++ /dev/null @@ -1,67 +0,0 @@ -// ------------------------------------------------------------------------------------------------ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// ------------------------------------------------------------------------------------------------ -#if not CLEAN23 -namespace Microsoft.Utilities; - -using Microsoft.Finance.EU3PartyTrade; -using Microsoft.Purchases.History; - -#pragma warning disable AL0432 -codeunit 31466 "Sync.Dep.Fld-PCrMemoHdr CZL" -{ - Access = Internal; - Permissions = tabledata "Purch. Cr. Memo Hdr." = rimd; - - [EventSubscriber(ObjectType::Table, Database::"Purch. Cr. Memo Hdr.", 'OnAfterInsertEvent', '', false, false)] - local procedure SyncOnAfterInsertPurchCrMemoHdr(var Rec: Record "Purch. Cr. Memo Hdr.") - begin - SyncDeprecatedFields(Rec); - end; - - [EventSubscriber(ObjectType::Table, Database::"Purch. Cr. Memo Hdr.", 'OnAfterModifyEvent', '', false, false)] - local procedure SyncOnAfterModifyPurchCrMemoHdr(var Rec: Record "Purch. Cr. Memo Hdr.") - begin - SyncDeprecatedFields(Rec); - end; - - local procedure SyncDeprecatedFields(var Rec: Record "Purch. Cr. Memo Hdr.") - var - SyncLoopingHelper: Codeunit "Sync. Looping Helper"; - begin - if Rec.IsTemporary() then - exit; - if SyncLoopingHelper.IsFieldSynchronizationSkipped(Database::"Purch. Cr. Memo Hdr.") then - exit; - SyncLoopingHelper.SkipFieldSynchronization(SyncLoopingHelper, Database::"Purch. Cr. Memo Hdr."); - if not IsEU3PartyTradeFeatureEnabled() then - Rec."EU 3 Party Trade" := Rec."EU 3-Party Trade CZL" - else - Rec."EU 3-Party Trade CZL" := Rec."EU 3 Party Trade"; - Rec.Modify(); - SyncLoopingHelper.RestoreFieldSynchronization(Database::"Purch. Cr. Memo Hdr."); - end; - - local procedure IsEU3PartyTradeFeatureEnabled(): Boolean - var - EU3PartyTradeFeatMgt: Codeunit "EU3 Party Trade Feat Mgt. CZL"; - begin - exit(EU3PartyTradeFeatMgt.IsEnabled()); - end; - - [EventSubscriber(ObjectType::Table, Database::"Purch. Cr. Memo Hdr.", 'OnAfterValidateEvent', 'EU 3-Party Trade CZL', false, false)] - local procedure SyncOnAfterValidateEU3PartyTradeCZL(var Rec: Record "Purch. Cr. Memo Hdr.") - begin - if not IsEU3PartyTradeFeatureEnabled() then - Rec."EU 3 Party Trade" := Rec."EU 3-Party Trade CZL"; - end; - - [EventSubscriber(ObjectType::Table, Database::"Purch. Cr. Memo Hdr.", 'OnAfterValidateEvent', 'EU 3 Party Trade', false, false)] - local procedure SyncOnAfterValidateEU3PartyTrade(var Rec: Record "Purch. Cr. Memo Hdr.") - begin - if IsEU3PartyTradeFeatureEnabled() then - Rec."EU 3-Party Trade CZL" := Rec."EU 3 Party Trade"; - end; -} -#endif diff --git a/Apps/CZ/CoreLocalizationPack/app/Src/Codeunits/SyncDepFldPurchHeaderCZL.Codeunit.al b/Apps/CZ/CoreLocalizationPack/app/Src/Codeunits/SyncDepFldPurchHeaderCZL.Codeunit.al deleted file mode 100644 index ff5384d0b2..0000000000 --- a/Apps/CZ/CoreLocalizationPack/app/Src/Codeunits/SyncDepFldPurchHeaderCZL.Codeunit.al +++ /dev/null @@ -1,59 +0,0 @@ -// ------------------------------------------------------------------------------------------------ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// ------------------------------------------------------------------------------------------------ -#if not CLEAN23 -namespace Microsoft.Utilities; - -using Microsoft.Purchases.Document; - -#pragma warning disable AL0432 -codeunit 31159 "Sync.Dep.Fld-PurchHeader CZL" -{ - Access = Internal; - Permissions = tabledata "Purchase Header" = rimd; - - [EventSubscriber(ObjectType::Table, Database::"Purchase Header", 'OnAfterInsertEvent', '', false, false)] - local procedure SyncOnAfterInsertPurchaseHeader(var Rec: Record "Purchase Header") - begin - SyncDeprecatedFields(Rec); - end; - - [EventSubscriber(ObjectType::Table, Database::"Purchase Header", 'OnAfterModifyEvent', '', false, false)] - local procedure SyncOnAfterModifyPurchaseHeader(var Rec: Record "Purchase Header") - begin - SyncDeprecatedFields(Rec); - end; - - local procedure SyncDeprecatedFields(var Rec: Record "Purchase Header") - var - SyncLoopingHelper: Codeunit "Sync. Looping Helper"; - begin - if Rec.IsTemporary() then - exit; - if SyncLoopingHelper.IsFieldSynchronizationSkipped(Database::"Purchase Header") then - exit; - SyncLoopingHelper.SkipFieldSynchronization(SyncLoopingHelper, Database::"Purchase Header"); - if not Rec.IsEU3PartyTradeFeatureEnabled() then - Rec."EU 3 Party Trade" := Rec."EU 3-Party Trade CZL" - else - Rec."EU 3-Party Trade CZL" := Rec."EU 3 Party Trade"; - Rec.Modify(); - SyncLoopingHelper.RestoreFieldSynchronization(Database::"Purchase Header"); - end; - - [EventSubscriber(ObjectType::Table, Database::"Purchase Header", 'OnAfterValidateEvent', 'EU 3-Party Trade CZL', false, false)] - local procedure SyncOnAfterValidateEU3PartyTradeCZL(var Rec: Record "Purchase Header") - begin - if not Rec.IsEU3PartyTradeFeatureEnabled() then - Rec."EU 3 Party Trade" := Rec."EU 3-Party Trade CZL"; - end; - - [EventSubscriber(ObjectType::Table, Database::"Purchase Header", 'OnAfterValidateEvent', 'EU 3 Party Trade', false, false)] - local procedure SyncOnAfterValidateEU3PartyTrade(var Rec: Record "Purchase Header") - begin - if Rec.IsEU3PartyTradeFeatureEnabled() then - Rec."EU 3-Party Trade CZL" := Rec."EU 3 Party Trade"; - end; -} -#endif diff --git a/Apps/CZ/CoreLocalizationPack/app/Src/Codeunits/SyncDepFldPurchInvHdrCZL.Codeunit.al b/Apps/CZ/CoreLocalizationPack/app/Src/Codeunits/SyncDepFldPurchInvHdrCZL.Codeunit.al deleted file mode 100644 index d991cab5c7..0000000000 --- a/Apps/CZ/CoreLocalizationPack/app/Src/Codeunits/SyncDepFldPurchInvHdrCZL.Codeunit.al +++ /dev/null @@ -1,67 +0,0 @@ -// ------------------------------------------------------------------------------------------------ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// ------------------------------------------------------------------------------------------------ -#if not CLEAN23 -namespace Microsoft.Utilities; - -using Microsoft.Finance.EU3PartyTrade; -using Microsoft.Purchases.History; - -#pragma warning disable AL0432 -codeunit 31467 "Sync.Dep.Fld-PurchInvHdr CZL" -{ - Access = Internal; - Permissions = tabledata "Purch. Inv. Header" = rimd; - - [EventSubscriber(ObjectType::Table, Database::"Purch. Inv. Header", 'OnAfterInsertEvent', '', false, false)] - local procedure SyncOnAfterInsertPurchInvHeader(var Rec: Record "Purch. Inv. Header") - begin - SyncDeprecatedFields(Rec); - end; - - [EventSubscriber(ObjectType::Table, Database::"Purch. Inv. Header", 'OnAfterModifyEvent', '', false, false)] - local procedure SyncOnAfterModifyPurchInvHeader(var Rec: Record "Purch. Inv. Header") - begin - SyncDeprecatedFields(Rec); - end; - - local procedure SyncDeprecatedFields(var Rec: Record "Purch. Inv. Header") - var - SyncLoopingHelper: Codeunit "Sync. Looping Helper"; - begin - if Rec.IsTemporary() then - exit; - if SyncLoopingHelper.IsFieldSynchronizationSkipped(Database::"Purch. Inv. Header") then - exit; - SyncLoopingHelper.SkipFieldSynchronization(SyncLoopingHelper, Database::"Purch. Inv. Header"); - if not IsEU3PartyTradeFeatureEnabled() then - Rec."EU 3 Party Trade" := Rec."EU 3-Party Trade CZL" - else - Rec."EU 3-Party Trade CZL" := Rec."EU 3 Party Trade"; - Rec.Modify(); - SyncLoopingHelper.RestoreFieldSynchronization(Database::"Purch. Inv. Header"); - end; - - local procedure IsEU3PartyTradeFeatureEnabled(): Boolean - var - EU3PartyTradeFeatMgt: Codeunit "EU3 Party Trade Feat Mgt. CZL"; - begin - exit(EU3PartyTradeFeatMgt.IsEnabled()); - end; - - [EventSubscriber(ObjectType::Table, Database::"Purch. Inv. Header", 'OnAfterValidateEvent', 'EU 3-Party Trade CZL', false, false)] - local procedure SyncOnAfterValidateEU3PartyTradeCZL(var Rec: Record "Purch. Inv. Header") - begin - if not IsEU3PartyTradeFeatureEnabled() then - Rec."EU 3 Party Trade" := Rec."EU 3-Party Trade CZL"; - end; - - [EventSubscriber(ObjectType::Table, Database::"Purch. Inv. Header", 'OnAfterValidateEvent', 'EU 3 Party Trade', false, false)] - local procedure SyncOnAfterValidateEU3PartyTrade(var Rec: Record "Purch. Inv. Header") - begin - if IsEU3PartyTradeFeatureEnabled() then - Rec."EU 3-Party Trade CZL" := Rec."EU 3 Party Trade"; - end; -} -#endif diff --git a/Apps/CZ/CoreLocalizationPack/app/Src/Codeunits/SyncDepFldVATStmtLineCZL.Codeunit.al b/Apps/CZ/CoreLocalizationPack/app/Src/Codeunits/SyncDepFldVATStmtLineCZL.Codeunit.al deleted file mode 100644 index a166f78e46..0000000000 --- a/Apps/CZ/CoreLocalizationPack/app/Src/Codeunits/SyncDepFldVATStmtLineCZL.Codeunit.al +++ /dev/null @@ -1,67 +0,0 @@ -// ------------------------------------------------------------------------------------------------ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// ------------------------------------------------------------------------------------------------ -#if not CLEAN23 -namespace Microsoft.Utilities; - -using Microsoft.Finance.VAT.Reporting; -using Microsoft.Finance.EU3PartyTrade; - -#pragma warning disable AL0432 -codeunit 31124 "Sync.Dep.Fld-VATStmtLine CZL" -{ - Access = Internal; - Permissions = tabledata "VAT Statement Line" = rimd; - - [EventSubscriber(ObjectType::Table, Database::"VAT Statement Line", 'OnAfterInsertEvent', '', false, false)] - local procedure SyncOnAfterInsertVATStatementLine(var Rec: Record "VAT Statement Line") - begin - SyncDeprecatedFields(Rec); - end; - - [EventSubscriber(ObjectType::Table, Database::"VAT Statement Line", 'OnAfterModifyEvent', '', false, false)] - local procedure SyncOnAfterModifyVATStatementLine(var Rec: Record "VAT Statement Line") - begin - SyncDeprecatedFields(Rec); - end; - - local procedure SyncDeprecatedFields(var Rec: Record "VAT Statement Line") - var - SyncLoopingHelper: Codeunit "Sync. Looping Helper"; - begin - if Rec.IsTemporary() then - exit; - if SyncLoopingHelper.IsFieldSynchronizationSkipped(Database::"VAT Statement Line") then - exit; - SyncLoopingHelper.SkipFieldSynchronization(SyncLoopingHelper, Database::"VAT Statement Line"); - if not IsEU3PartyTradeFeatureEnabled() then - Rec."EU 3 Party Trade" := Rec.ConvertEU3PartyTradeToEnum() - else - Rec.ConvertEnumToEU3PartyTrade(Rec."EU 3 Party Trade"); - Rec.Modify(); - SyncLoopingHelper.RestoreFieldSynchronization(Database::"VAT Statement Line"); - end; - - local procedure IsEU3PartyTradeFeatureEnabled(): Boolean - var - EU3PartyTradeFeatMgt: Codeunit "EU3 Party Trade Feat Mgt. CZL"; - begin - exit(EU3PartyTradeFeatMgt.IsEnabled()); - end; - - [EventSubscriber(ObjectType::Table, Database::"VAT Statement Line", 'OnAfterValidateEvent', 'EU-3 Party Trade CZL', false, false)] - local procedure SyncOnAfterValidateEU3PartyTradeCZL(var Rec: Record "VAT Statement Line") - begin - if not IsEU3PartyTradeFeatureEnabled() then - Rec."EU 3 Party Trade" := Rec.ConvertEU3PartyTradeToEnum(); - end; - - [EventSubscriber(ObjectType::Table, Database::"VAT Statement Line", 'OnAfterValidateEvent', 'EU 3 Party Trade', false, false)] - local procedure SyncOnAfterValidateEU3PartyTrade(var Rec: Record "VAT Statement Line") - begin - if IsEU3PartyTradeFeatureEnabled() then - Rec.ConvertEnumToEU3PartyTrade(Rec."EU 3 Party Trade"); - end; -} -#endif \ No newline at end of file diff --git a/Apps/CZ/CoreLocalizationPack/app/Src/Codeunits/SyncDepFldVendorCZL.Codeunit.al b/Apps/CZ/CoreLocalizationPack/app/Src/Codeunits/SyncDepFldVendorCZL.Codeunit.al deleted file mode 100644 index f155dce2b5..0000000000 --- a/Apps/CZ/CoreLocalizationPack/app/Src/Codeunits/SyncDepFldVendorCZL.Codeunit.al +++ /dev/null @@ -1,58 +0,0 @@ -// ------------------------------------------------------------------------------------------------ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// ------------------------------------------------------------------------------------------------ -#if not CLEAN23 -namespace Microsoft.Utilities; - -using Microsoft.Purchases.Vendor; - -#pragma warning disable AL0432 -codeunit 31151 "Sync.Dep.Fld-Vendor CZL" -{ - Access = Internal; - Permissions = tabledata "Vendor" = rimd; - - [EventSubscriber(ObjectType::Table, Database::Vendor, 'OnBeforeInsertEvent', '', false, false)] - local procedure SyncOnBeforeInsertVendor(var Rec: Record Vendor) - begin - SyncDeprecatedFields(Rec); - end; - - [EventSubscriber(ObjectType::Table, Database::Vendor, 'OnBeforeModifyEvent', '', false, false)] - local procedure SyncOnBeforeModifyVendor(var Rec: Record Vendor) - begin - SyncDeprecatedFields(Rec); - end; - - local procedure SyncDeprecatedFields(var Rec: Record Vendor) - var - PreviousRecord: Record Vendor; - SyncDepFldUtilities: Codeunit "Sync.Dep.Fld-Utilities"; - PreviousRecordRef: RecordRef; - DepFieldTxt, NewFieldTxt : Text; - begin - if Rec.IsTemporary() then - exit; - if SyncDepFldUtilities.GetPreviousRecord(Rec, PreviousRecordRef) then - PreviousRecordRef.SetTable(PreviousRecord); - DepFieldTxt := Rec."Registration No. CZL"; - NewFieldTxt := Rec."Registration Number"; - SyncDepFldUtilities.SyncFields(DepFieldTxt, NewFieldTxt, PreviousRecord."Registration No. CZL", PreviousRecord."Registration Number"); - Rec."Registration No. CZL" := CopyStr(DepFieldTxt, 1, MaxStrLen(Rec."Registration No. CZL")); - Rec."Registration Number" := CopyStr(NewFieldTxt, 1, MaxStrLen(Rec."Registration Number")); - end; - - [EventSubscriber(ObjectType::Table, Database::Vendor, 'OnAfterValidateEvent', 'Registration No. CZL', false, false)] - local procedure SyncOnAfterValidateRegistrationNoCZL(var Rec: Record Vendor) - begin - Rec."Registration Number" := Rec."Registration No. CZL"; - end; - - [EventSubscriber(ObjectType::Table, Database::Vendor, 'OnAfterValidateEvent', 'Registration Number', false, false)] - local procedure SyncOnAfterValidateVatReportingDate(var Rec: Record Vendor) - begin - Rec."Registration No. CZL" := Rec.GetRegistrationNoTrimmedCZL(); - end; -} -#endif diff --git a/Apps/CZ/CoreLocalizationPack/app/Src/Codeunits/VATDateHandlerCZL.Codeunit.al b/Apps/CZ/CoreLocalizationPack/app/Src/Codeunits/VATDateHandlerCZL.Codeunit.al index 14ccf0d0bd..3c19afbaed 100644 --- a/Apps/CZ/CoreLocalizationPack/app/Src/Codeunits/VATDateHandlerCZL.Codeunit.al +++ b/Apps/CZ/CoreLocalizationPack/app/Src/Codeunits/VATDateHandlerCZL.Codeunit.al @@ -50,39 +50,6 @@ codeunit 11742 "VAT Date Handler CZL" GLEntry."VAT Reporting Date" := GenJournalLine."VAT Reporting Date"; end; -#if not CLEAN23 -#pragma warning disable AL0432 - [EventSubscriber(ObjectType::Table, Database::"Invoice Post. Buffer", 'OnAfterInvPostBufferPrepareSales', '', false, false)] - local procedure UpdateVatDateInvoicePostBufferFromSalesHeader(var InvoicePostBuffer: Record "Invoice Post. Buffer"; var SalesLine: Record "Sales Line") - var - SalesHeader: Record "Sales Header"; - begin - SalesHeader.Get(SalesLine."Document Type", SalesLine."Document No."); - InvoicePostBuffer."VAT Date CZL" := SalesHeader."VAT Reporting Date"; - InvoicePostBuffer."Original Doc. VAT Date CZL" := SalesHeader."Original Doc. VAT Date CZL"; - end; - - [EventSubscriber(ObjectType::Table, Database::"Invoice Post. Buffer", 'OnAfterInvPostBufferPreparePurchase', '', false, false)] - local procedure UpdateVatDateInvoicePostBufferFromPurchaseHeader(var InvoicePostBuffer: Record "Invoice Post. Buffer"; var PurchaseLine: Record "Purchase Line") - var - PurchaseHeader: Record "Purchase Header"; - begin - PurchaseHeader.Get(PurchaseLine."Document Type", PurchaseLine."Document No."); - InvoicePostBuffer."VAT Date CZL" := PurchaseHeader."VAT Reporting Date"; - InvoicePostBuffer."Original Doc. VAT Date CZL" := PurchaseHeader."Original Doc. VAT Date CZL"; - end; - - [EventSubscriber(ObjectType::Table, Database::"Invoice Post. Buffer", 'OnAfterInvPostBufferPrepareService', '', false, false)] - local procedure UpdateVatDateInvoicePostBufferFromServiceHeader(var InvoicePostBuffer: Record "Invoice Post. Buffer"; var ServiceLine: Record "Service Line") - var - ServiceHeader: Record "Service Header"; - begin - ServiceHeader.Get(ServiceLine."Document Type", ServiceLine."Document No."); - InvoicePostBuffer."VAT Date CZL" := ServiceHeader."VAT Reporting Date"; - end; - -#pragma warning restore AL0432 -#endif [EventSubscriber(ObjectType::Codeunit, Codeunit::Microsoft.Sales.Posting."Sales Post Invoice Events", 'OnAfterPrepareInvoicePostingBuffer', '', false, false)] local procedure UpdateInvoicePostingBufferOnAfterPrepareSales(var InvoicePostingBuffer: Record "Invoice Posting Buffer"; var SalesLine: Record "Sales Line") var diff --git a/Apps/CZ/CoreLocalizationPack/app/Src/PageExtensions/ContactCardCZL.PageExt.al b/Apps/CZ/CoreLocalizationPack/app/Src/PageExtensions/ContactCardCZL.PageExt.al index b70fecfffa..1e8e5cb774 100644 --- a/Apps/CZ/CoreLocalizationPack/app/Src/PageExtensions/ContactCardCZL.PageExt.al +++ b/Apps/CZ/CoreLocalizationPack/app/Src/PageExtensions/ContactCardCZL.PageExt.al @@ -23,27 +23,6 @@ pageextension 11703 "Contact Card CZL" extends "Contact Card" } addafter("VAT Registration No.") { -#if not CLEAN23 - field("Registration No. CZL"; Rec."Registration No. CZL") - { - Caption = 'Registration No. (Obsolete)'; - ApplicationArea = Basic, Suite; - ToolTip = 'Specifies the registration number of contact.'; - Visible = false; - ObsoleteState = Pending; - ObsoleteTag = '23.0'; - ObsoleteReason = 'Replaced by standard "Registration Number" field.'; - - trigger OnDrillDown() - var - RegistrationLogMgtCZL: Codeunit "Registration Log Mgt. CZL"; - begin - CurrPage.SaveRecord(); - RegistrationLogMgtCZL.AssistEditContactRegNo(Rec); - CurrPage.Update(false); - end; - } -#endif field("Tax Registration No. CZL"; Rec."Tax Registration No. CZL") { ApplicationArea = Basic, Suite; diff --git a/Apps/CZ/CoreLocalizationPack/app/Src/PageExtensions/ContactListCZL.PageExt.al b/Apps/CZ/CoreLocalizationPack/app/Src/PageExtensions/ContactListCZL.PageExt.al index 42d84bbf79..56b69a7a3e 100644 --- a/Apps/CZ/CoreLocalizationPack/app/Src/PageExtensions/ContactListCZL.PageExt.al +++ b/Apps/CZ/CoreLocalizationPack/app/Src/PageExtensions/ContactListCZL.PageExt.al @@ -20,18 +20,6 @@ pageextension 31223 "Contact List CZL" extends "Contact List" ApplicationArea = Basic, Suite; ToolTip = 'Specifies the registration number of contact.'; } -#if not CLEAN23 - field("Registration No. CZL"; Rec."Registration No. CZL") - { - Caption = 'Registration No. (Obsolete)'; - ApplicationArea = Basic, Suite; - ToolTip = 'Specifies the registration number of contact.'; - Visible = false; - ObsoleteState = Pending; - ObsoleteTag = '23.0'; - ObsoleteReason = 'Replaced by standard "Registration Number" field.'; - } -#endif } } } diff --git a/Apps/CZ/CoreLocalizationPack/app/Src/PageExtensions/CustomerCardCZL.PageExt.al b/Apps/CZ/CoreLocalizationPack/app/Src/PageExtensions/CustomerCardCZL.PageExt.al index 042e372c2c..90276aead4 100644 --- a/Apps/CZ/CoreLocalizationPack/app/Src/PageExtensions/CustomerCardCZL.PageExt.al +++ b/Apps/CZ/CoreLocalizationPack/app/Src/PageExtensions/CustomerCardCZL.PageExt.al @@ -24,27 +24,6 @@ pageextension 11704 "Customer Card CZL" extends "Customer Card" } addafter("VAT Registration No.") { -#if not CLEAN23 - field("Registration No. CZL"; Rec."Registration No. CZL") - { - Caption = 'Registration No. (Obsolete)'; - ApplicationArea = Basic, Suite; - ToolTip = 'Specifies the registration number of customer.'; - Visible = false; - ObsoleteState = Pending; - ObsoleteTag = '23.0'; - ObsoleteReason = 'Replaced by standard "Registration Number" field.'; - - trigger OnDrillDown() - var - RegistrationLogMgtCZL: Codeunit "Registration Log Mgt. CZL"; - begin - CurrPage.SaveRecord(); - RegistrationLogMgtCZL.AssistEditCustomerRegNo(Rec); - CurrPage.Update(false); - end; - } -#endif field("Tax Registration No. CZL"; Rec."Tax Registration No. CZL") { ApplicationArea = Basic, Suite; diff --git a/Apps/CZ/CoreLocalizationPack/app/Src/PageExtensions/CustomerListCZL.PageExt.al b/Apps/CZ/CoreLocalizationPack/app/Src/PageExtensions/CustomerListCZL.PageExt.al index aa0440d8a3..73cb4a1463 100644 --- a/Apps/CZ/CoreLocalizationPack/app/Src/PageExtensions/CustomerListCZL.PageExt.al +++ b/Apps/CZ/CoreLocalizationPack/app/Src/PageExtensions/CustomerListCZL.PageExt.al @@ -22,18 +22,6 @@ pageextension 11767 "Customer List CZL" extends "Customer List" ApplicationArea = Basic, Suite; ToolTip = 'Specifies the registration number of customer.'; } -#if not CLEAN23 - field("Registration No. CZL"; Rec."Registration No. CZL") - { - Caption = 'Registration No. (Obsolete)'; - ApplicationArea = Basic, Suite; - ToolTip = 'Specifies the registration number of customer.'; - Visible = false; - ObsoleteState = Pending; - ObsoleteTag = '23.0'; - ObsoleteReason = 'Replaced by standard "Registration Number" field.'; - } -#endif } } diff --git a/Apps/CZ/CoreLocalizationPack/app/Src/PageExtensions/PostedPurchCreditMemoCZL.PageExt.al b/Apps/CZ/CoreLocalizationPack/app/Src/PageExtensions/PostedPurchCreditMemoCZL.PageExt.al index 4530e9e935..5c2dc78d16 100644 --- a/Apps/CZ/CoreLocalizationPack/app/Src/PageExtensions/PostedPurchCreditMemoCZL.PageExt.al +++ b/Apps/CZ/CoreLocalizationPack/app/Src/PageExtensions/PostedPurchCreditMemoCZL.PageExt.al @@ -118,20 +118,9 @@ pageextension 11746 "Posted Purch. Credit Memo CZL" extends "Posted Purchase Cre } addafter("Invoice Details") { -#if not CLEAN23 -#pragma warning disable AS0011 - group("Foreign Trade") -#pragma warning restore AS0011 -#else group("Foreign Trade CZL") -#endif { Caption = 'Foreign Trade'; -#if not CLEAN23 - ObsoleteState = Pending; - ObsoleteTag = '23.0'; - ObsoleteReason = 'The group will be renamed from Foreign Trade to Foreign Trade CZL.'; -#endif field("Language Code CZL"; Rec."Language Code") { ApplicationArea = Basic, Suite; diff --git a/Apps/CZ/CoreLocalizationPack/app/Src/PageExtensions/PostedPurchaseInvoiceCZL.PageExt.al b/Apps/CZ/CoreLocalizationPack/app/Src/PageExtensions/PostedPurchaseInvoiceCZL.PageExt.al index 57b87b784c..469d1745f9 100644 --- a/Apps/CZ/CoreLocalizationPack/app/Src/PageExtensions/PostedPurchaseInvoiceCZL.PageExt.al +++ b/Apps/CZ/CoreLocalizationPack/app/Src/PageExtensions/PostedPurchaseInvoiceCZL.PageExt.al @@ -100,20 +100,9 @@ pageextension 11744 "Posted Purchase Invoice CZL" extends "Posted Purchase Invoi } addafter("Invoice Details") { -#if not CLEAN23 -#pragma warning disable AS0011 - group("Foreign Trade") -#pragma warning restore AS0011 -#else group("Foreign Trade CZL") -#endif { Caption = 'Foreign Trade'; -#if not CLEAN23 - ObsoleteState = Pending; - ObsoleteTag = '23.0'; - ObsoleteReason = 'The group will be renamed from Foreign Trade to Foreign Trade CZL.'; -#endif field("Language Code CZL"; Rec."Language Code") { ApplicationArea = Basic, Suite; diff --git a/Apps/CZ/CoreLocalizationPack/app/Src/PageExtensions/VendorCardCZL.PageExt.al b/Apps/CZ/CoreLocalizationPack/app/Src/PageExtensions/VendorCardCZL.PageExt.al index 54075364a7..592dcab27e 100644 --- a/Apps/CZ/CoreLocalizationPack/app/Src/PageExtensions/VendorCardCZL.PageExt.al +++ b/Apps/CZ/CoreLocalizationPack/app/Src/PageExtensions/VendorCardCZL.PageExt.al @@ -24,27 +24,6 @@ pageextension 11705 "Vendor Card CZL" extends "Vendor Card" } addafter("VAT Registration No.") { -#if not CLEAN23 - field("Registration No. CZL"; Rec."Registration No. CZL") - { - Caption = 'Registration No. (Obsolete)'; - ApplicationArea = Basic, Suite; - ToolTip = 'Specifies the registration number of vendor.'; - Visible = false; - ObsoleteState = Pending; - ObsoleteTag = '23.0'; - ObsoleteReason = 'Replaced by standard "Registration Number" field.'; - - trigger OnDrillDown() - var - RegistrationLogMgtCZL: Codeunit "Registration Log Mgt. CZL"; - begin - CurrPage.SaveRecord(); - RegistrationLogMgtCZL.AssistEditVendorRegNo(Rec); - CurrPage.Update(false); - end; - } -#endif field("Tax Registration No. CZL"; Rec."Tax Registration No. CZL") { ApplicationArea = Basic, Suite; diff --git a/Apps/CZ/CoreLocalizationPack/app/Src/PageExtensions/VendorListCZL.PageExt.al b/Apps/CZ/CoreLocalizationPack/app/Src/PageExtensions/VendorListCZL.PageExt.al index 1e12fa5d6f..15f3ce0573 100644 --- a/Apps/CZ/CoreLocalizationPack/app/Src/PageExtensions/VendorListCZL.PageExt.al +++ b/Apps/CZ/CoreLocalizationPack/app/Src/PageExtensions/VendorListCZL.PageExt.al @@ -23,18 +23,6 @@ pageextension 11768 "Vendor List CZL" extends "Vendor List" ApplicationArea = Basic, Suite; ToolTip = 'Specifies the registration number of vendor.'; } -#if not CLEAN23 - field("Registration No. CZL"; Rec."Registration No. CZL") - { - Caption = 'Registration No. (Obsolete)'; - ApplicationArea = Basic, Suite; - ToolTip = 'Specifies the registration number of vendor.'; - Visible = false; - ObsoleteState = Pending; - ObsoleteTag = '23.0'; - ObsoleteReason = 'Replaced by standard "Registration Number" field.'; - } -#endif } } diff --git a/Apps/CZ/CoreLocalizationPack/app/Src/Pages/NonDeductibleVATSetupCZL.Page.al b/Apps/CZ/CoreLocalizationPack/app/Src/Pages/NonDeductibleVATSetupCZL.Page.al index 4e35581aba..e44f0839e8 100644 --- a/Apps/CZ/CoreLocalizationPack/app/Src/Pages/NonDeductibleVATSetupCZL.Page.al +++ b/Apps/CZ/CoreLocalizationPack/app/Src/Pages/NonDeductibleVATSetupCZL.Page.al @@ -21,10 +21,12 @@ page 31215 "Non-Deductible VAT Setup CZL" field("From Date"; Rec."From Date") { ToolTip = 'Specifies the date from which the VAT coefficient is valid.'; + ShowMandatory = true; } field("To Date"; Rec."To Date") { ToolTip = 'Specifies the date to which the VAT coefficient is valid.'; + ShowMandatory = true; } field("Advance Coefficient"; Rec."Advance Coefficient") { diff --git a/Apps/CZ/CoreLocalizationPack/app/Src/Pages/RegistrationLogDetailsCZL.Page.al b/Apps/CZ/CoreLocalizationPack/app/Src/Pages/RegistrationLogDetailsCZL.Page.al index 1c091d13e8..af874c2490 100644 --- a/Apps/CZ/CoreLocalizationPack/app/Src/Pages/RegistrationLogDetailsCZL.Page.al +++ b/Apps/CZ/CoreLocalizationPack/app/Src/Pages/RegistrationLogDetailsCZL.Page.al @@ -133,7 +133,7 @@ page 31208 "Registration Log Details CZL" trigger OnAfterGetCurrRecord() begin - AcceptEnabled := (Rec.Status = Rec.Status::"Not Valid") and (Rec.Response <> ''); + AcceptEnabled := Rec.Status = Rec.Status::"Not Valid"; ResetEnabled := Rec.Status = Rec.Status::Accepted; end; @@ -148,7 +148,6 @@ page 31208 "Registration Log Details CZL" RegistrationLogDetail: Record "Registration Log Detail CZL"; begin RegistrationLogDetail.Copy(Rec); - RegistrationLogDetail.SetFilter(Response, '<>%1', ''); RegistrationLogDetail.SetRange(Status, Before); RegistrationLogDetail.ModifyAll(Status, After); @@ -160,8 +159,6 @@ page 31208 "Registration Log Details CZL" RegistrationLogDetail: Record "Registration Log Detail CZL"; begin RegistrationLogDetail.CopyFilters(Rec); - RegistrationLogDetail.SetFilter(Response, '<>%1', ''); - RegistrationLogDetail.SetRange(Status, RegistrationLogDetail.Status::"Not Valid"); AcceptAllEnabled := not RegistrationLogDetail.IsEmpty(); diff --git a/Apps/CZ/CoreLocalizationPack/app/Src/Pages/VATStatementPreviewLineCZL.Page.al b/Apps/CZ/CoreLocalizationPack/app/Src/Pages/VATStatementPreviewLineCZL.Page.al index ff11c46e60..e6987e656c 100644 --- a/Apps/CZ/CoreLocalizationPack/app/Src/Pages/VATStatementPreviewLineCZL.Page.al +++ b/Apps/CZ/CoreLocalizationPack/app/Src/Pages/VATStatementPreviewLineCZL.Page.al @@ -100,9 +100,6 @@ page 31136 "VAT Statement Preview Line CZL" ApplicationArea = VAT; ToolTip = 'Specifies whether or not totals for transactions involving EU 3-party trades are displayed in the VAT Statement.'; Visible = false; -#if not CLEAN23 - Enabled = EU3PartyTradeFeatureEnabled; -#endif } field("EU 3-Party Intermed. Role CZL"; Rec."EU 3-Party Intermed. Role CZL") { diff --git a/Apps/CZ/CoreLocalizationPack/app/Src/Reports/CalcandPostVATSettlCZL.Report.al b/Apps/CZ/CoreLocalizationPack/app/Src/Reports/CalcandPostVATSettlCZL.Report.al index 267e0e5558..9bad529847 100644 --- a/Apps/CZ/CoreLocalizationPack/app/Src/Reports/CalcandPostVATSettlCZL.Report.al +++ b/Apps/CZ/CoreLocalizationPack/app/Src/Reports/CalcandPostVATSettlCZL.Report.al @@ -948,16 +948,6 @@ report 11971 "Calc. and Post VAT Settl. CZL" TaxJurisdiction.TestField("Tax Account (Sales)"); end; end; -#if not CLEAN23 - [Obsolete('Replaced by GetVATAccountNo function with TaxJurisdiction parameter.', '23.0')] - procedure GetVATAccountNo(VATEntry: Record "VAT Entry"; VATPostingSetup: Record "VAT Posting Setup"): Code[20] - var - TaxJurisdiction: Record "Tax Jurisdiction"; - begin - TaxJurisdiction.Get(VATEntry."Tax Jurisdiction Code"); - exit(GetVATAccountNo(VATEntry, VATPostingSetup, TaxJurisdiction)); - end; -#endif procedure GetVATAccountNo(VATEntry: Record "VAT Entry"; VATPostingSetup: Record "VAT Posting Setup"; TaxJurisdiction: Record "Tax Jurisdiction"): Code[20] var diff --git a/Apps/CZ/CoreLocalizationPack/app/Src/TableExtensions/ContactCZL.TableExt.al b/Apps/CZ/CoreLocalizationPack/app/Src/TableExtensions/ContactCZL.TableExt.al index ef8731dc39..65f4135bd5 100644 --- a/Apps/CZ/CoreLocalizationPack/app/Src/TableExtensions/ContactCZL.TableExt.al +++ b/Apps/CZ/CoreLocalizationPack/app/Src/TableExtensions/ContactCZL.TableExt.al @@ -43,43 +43,9 @@ tableextension 11700 "Contact CZL" extends Contact { Caption = 'Registration No.'; DataClassification = CustomerContent; -#if not CLEAN23 - ObsoleteState = Pending; - ObsoleteTag = '23.0'; -#else ObsoleteState = Removed; ObsoleteTag = '26.0'; -#endif ObsoleteReason = 'Replaced by standard "Registration Number" field.'; -#if not CLEAN23 - - trigger OnValidate() - var - RegistrationLogCZL: Record "Registration Log CZL"; - RegNoServiceConfigCZL: Record "Reg. No. Service Config CZL"; - ResultRecordRef: RecordRef; - LogNotVerified: Boolean; - IsHandled: Boolean; - begin - OnBeforeOnValidateRegistrationNoCZL(Rec, xRec, IsHandled); - if IsHandled then - exit; - - if not RegistrationNoMgtCZL.CheckRegistrationNo("Registration No. CZL", "No.", Database::Contact) then - exit; - - LogNotVerified := true; - if "Registration No. CZL" <> xRec."Registration No. CZL" then - if RegNoServiceConfigCZL.RegNoSrvIsEnabled() then begin - LogNotVerified := false; - RegistrationLogMgtCZL.ValidateRegNoWithARES(ResultRecordRef, Rec, "No.", RegistrationLogCZL."Account Type"::Contact); - ResultRecordRef.SetTable(Rec); - end; - - if LogNotVerified then - RegistrationLogMgtCZL.LogContact(Rec); - end; -#endif } field(11771; "Tax Registration No. CZL"; Text[20]) { diff --git a/Apps/CZ/CoreLocalizationPack/app/Src/TableExtensions/CustomerCZL.TableExt.al b/Apps/CZ/CoreLocalizationPack/app/Src/TableExtensions/CustomerCZL.TableExt.al index 1dd42032ae..f0c5045183 100644 --- a/Apps/CZ/CoreLocalizationPack/app/Src/TableExtensions/CustomerCZL.TableExt.al +++ b/Apps/CZ/CoreLocalizationPack/app/Src/TableExtensions/CustomerCZL.TableExt.al @@ -46,43 +46,9 @@ tableextension 11701 "Customer CZL" extends Customer { Caption = 'Registration No.'; DataClassification = CustomerContent; -#if not CLEAN23 - ObsoleteState = Pending; - ObsoleteTag = '23.0'; -#else ObsoleteState = Removed; ObsoleteTag = '26.0'; -#endif ObsoleteReason = 'Replaced by standard "Registration Number" field.'; -#if not CLEAN23 - - trigger OnValidate() - var - RegistrationLogCZL: Record "Registration Log CZL"; - RegNoServiceConfigCZL: Record "Reg. No. Service Config CZL"; - ResultRecordRef: RecordRef; - LogNotVerified: Boolean; - IsHandled: Boolean; - begin - OnBeforeOnValidateRegistrationNoCZL(Rec, xRec, IsHandled); - if IsHandled then - exit; - - if not RegistrationNoMgtCZL.CheckRegistrationNo("Registration No. CZL", "No.", Database::Customer) then - exit; - - LogNotVerified := true; - if "Registration No. CZL" <> xRec."Registration No. CZL" then - if RegNoServiceConfigCZL.RegNoSrvIsEnabled() then begin - LogNotVerified := false; - RegistrationLogMgtCZL.ValidateRegNoWithARES(ResultRecordRef, Rec, "No.", RegistrationLogCZL."Account Type"::Customer); - ResultRecordRef.SetTable(Rec); - end; - - if LogNotVerified then - RegistrationLogMgtCZL.LogCustomer(Rec); - end; -#endif } field(11771; "Tax Registration No. CZL"; Text[20]) { @@ -127,17 +93,6 @@ tableextension 11701 "Customer CZL" extends Customer ObsoleteReason = 'Intrastat related functionalities are moved to Intrastat extensions.'; } } -#if not CLEAN23 - keys - { - key(Key11700; "Registration No. CZL") - { - ObsoleteState = Pending; - ObsoleteTag = '23.0'; - ObsoleteReason = 'Replaced by standard "Registration Number" field.'; - } - } -#endif var RegistrationLogMgtCZL: Codeunit "Registration Log Mgt. CZL"; diff --git a/Apps/CZ/CoreLocalizationPack/app/Src/TableExtensions/PurchaseHeaderCZL.TableExt.al b/Apps/CZ/CoreLocalizationPack/app/Src/TableExtensions/PurchaseHeaderCZL.TableExt.al index 05b5eabdf5..a32ec760ed 100644 --- a/Apps/CZ/CoreLocalizationPack/app/Src/TableExtensions/PurchaseHeaderCZL.TableExt.al +++ b/Apps/CZ/CoreLocalizationPack/app/Src/TableExtensions/PurchaseHeaderCZL.TableExt.al @@ -7,9 +7,6 @@ namespace Microsoft.Purchases.Document; using Microsoft.Bank.BankAccount; using Microsoft.Bank.Setup; using Microsoft.Finance.Currency; -#if not CLEAN23 -using Microsoft.Finance.EU3PartyTrade; -#endif using Microsoft.Finance.GeneralLedger.Setup; using Microsoft.Finance.VAT.Calculation; using Microsoft.Finance.VAT.Setup; @@ -338,11 +335,6 @@ tableextension 11705 "Purchase Header CZL" extends "Purchase Header" GeneralLedgerSetup: Record "General Ledger Setup"; UnreliablePayerMgtCZL: Codeunit "Unreliable Payer Mgt. CZL"; ConfirmManagement: Codeunit "Confirm Management"; -#if not CLEAN23 -#pragma warning disable AL0432 - EU3PartyTradeFeatMgt: Codeunit "EU3 Party Trade Feat Mgt. CZL"; -#pragma warning restore AL0432 -#endif GlobalDocumentType: Enum "Purchase Document Type"; GlobalDocumentNo: Code[20]; GlobalIsIntrastatTransaction: Boolean; @@ -578,6 +570,8 @@ tableextension 11705 "Purchase Header CZL" extends "Purchase Header" #if not CLEAN24 internal procedure IsEU3PartyTradeFeatureEnabled(): Boolean + var + EU3PartyTradeFeatMgt: Codeunit Microsoft.Finance.EU3PartyTrade."EU3 Party Trade Feat Mgt. CZL"; begin exit(EU3PartyTradeFeatMgt.IsEnabled()); end; diff --git a/Apps/CZ/CoreLocalizationPack/app/Src/TableExtensions/VATEntryCZL.TableExt.al b/Apps/CZ/CoreLocalizationPack/app/Src/TableExtensions/VATEntryCZL.TableExt.al index 795642c950..0822788984 100644 --- a/Apps/CZ/CoreLocalizationPack/app/Src/TableExtensions/VATEntryCZL.TableExt.al +++ b/Apps/CZ/CoreLocalizationPack/app/Src/TableExtensions/VATEntryCZL.TableExt.al @@ -4,9 +4,6 @@ // ------------------------------------------------------------------------------------------------ namespace Microsoft.Finance.VAT.Ledger; -#if not CLEAN23 -using Microsoft.Finance.EU3PartyTrade; -#endif using Microsoft.Finance.VAT.Reporting; tableextension 11737 "VAT Entry CZL" extends "VAT Entry" @@ -113,12 +110,6 @@ tableextension 11737 "VAT Entry CZL" extends "VAT Entry" VATStmtReportSelectionNotSupportedErr: Label 'VAT statement report selection %1 is not supported.', Comment = '%1 = VAT Statement Report Selection'; procedure SetVATStatementLineFiltersCZL(VATStatementLine: Record "VAT Statement Line") -#if not CLEAN23 -#pragma warning disable AL0432 - var - EU3PartyTradeFeatMgt: Codeunit "EU3 Party Trade Feat Mgt. CZL"; -#pragma warning restore AL0432 -#endif begin SetRange(Type, VATStatementLine."Gen. Posting Type"); SetRange("VAT Bus. Posting Group", VATStatementLine."VAT Bus. Posting Group"); @@ -129,19 +120,6 @@ tableextension 11737 "VAT Entry CZL" extends "VAT Entry" SetRange("Gen. Bus. Posting Group", VATStatementLine."Gen. Bus. Posting Group CZL"); if VATStatementLine."Gen. Prod. Posting Group CZL" <> '' then SetRange("Gen. Prod. Posting Group", VATStatementLine."Gen. Prod. Posting Group CZL"); -#if not CLEAN23 -#pragma warning disable AL0432 - if not EU3PartyTradeFeatMgt.IsEnabled() then begin - SetRange("EU 3-Party Trade"); - case VATStatementLine."EU-3 Party Trade CZL" of - VATStatementLine."EU-3 Party Trade CZL"::Yes: - SetRange("EU 3-Party Trade", true); - VATStatementLine."EU-3 Party Trade CZL"::No: - SetRange("EU 3-Party Trade", false); - end; - end else -#pragma warning restore AL0432 -#endif case VATStatementLine."EU 3 Party Trade" of VATStatementLine."EU 3 Party Trade"::EU3: SetRange("EU 3-Party Trade", true); diff --git a/Apps/CZ/CoreLocalizationPack/app/Src/TableExtensions/VATStatementLineCZL.TableExt.al b/Apps/CZ/CoreLocalizationPack/app/Src/TableExtensions/VATStatementLineCZL.TableExt.al index a5ce075524..260618a236 100644 --- a/Apps/CZ/CoreLocalizationPack/app/Src/TableExtensions/VATStatementLineCZL.TableExt.al +++ b/Apps/CZ/CoreLocalizationPack/app/Src/TableExtensions/VATStatementLineCZL.TableExt.al @@ -4,9 +4,6 @@ // ------------------------------------------------------------------------------------------------ namespace Microsoft.Finance.VAT.Reporting; -#if not CLEAN23 -using Microsoft.Finance.EU3PartyTrade; -#endif using Microsoft.Finance.GeneralLedger.Setup; tableextension 11739 "VAT Statement Line CZL" extends "VAT Statement Line" @@ -79,33 +76,4 @@ tableextension 11739 "VAT Statement Line CZL" extends "VAT Statement Line" DataClassification = CustomerContent; } } -#if not CLEAN23 - internal procedure ConvertEU3PartyTradeToEnum(): Enum "EU3 Party Trade Filter" - begin -#pragma warning disable AL0432 - case "EU-3 Party Trade CZL" of - "EU-3 Party Trade CZL"::" ": - exit("EU 3 Party Trade"::All); - "EU-3 Party Trade CZL"::Yes: - exit("EU 3 Party Trade"::EU3); - "EU-3 Party Trade CZL"::No: - exit("EU 3 Party Trade"::"non-EU3"); - end -#pragma warning restore AL0432 - end; - - internal procedure ConvertEnumToEU3PartyTrade(EU3PartyTradeFilter: Enum "EU3 Party Trade Filter") - begin -#pragma warning disable AL0432 - case EU3PartyTradeFilter of - EU3PartyTradeFilter::EU3: - "EU-3 Party Trade CZL" := "EU-3 Party Trade CZL"::Yes; - EU3PartyTradeFilter::"non-EU3": - "EU-3 Party Trade CZL" := "EU-3 Party Trade CZL"::No; - EU3PartyTradeFilter::All: - "EU-3 Party Trade CZL" := "EU-3 Party Trade CZL"::" "; - end; -#pragma warning restore AL0432 - end; -#endif } diff --git a/Apps/CZ/CoreLocalizationPack/app/Src/TableExtensions/VendorCZL.TableExt.al b/Apps/CZ/CoreLocalizationPack/app/Src/TableExtensions/VendorCZL.TableExt.al index ce0ec4d892..3d83940a91 100644 --- a/Apps/CZ/CoreLocalizationPack/app/Src/TableExtensions/VendorCZL.TableExt.al +++ b/Apps/CZ/CoreLocalizationPack/app/Src/TableExtensions/VendorCZL.TableExt.al @@ -47,43 +47,9 @@ tableextension 11702 "Vendor CZL" extends Vendor { Caption = 'Registration No.'; DataClassification = CustomerContent; -#if not CLEAN23 - ObsoleteState = Pending; - ObsoleteTag = '23.0'; -#else ObsoleteState = Removed; ObsoleteTag = '26.0'; -#endif ObsoleteReason = 'Replaced by standard "Registration Number" field.'; -#if not CLEAN23 - - trigger OnValidate() - var - RegistrationLogCZL: Record "Registration Log CZL"; - RegNoServiceConfigCZL: Record "Reg. No. Service Config CZL"; - ResultRecordRef: RecordRef; - LogNotVerified: Boolean; - IsHandled: Boolean; - begin - OnBeforeOnValidateRegistrationNoCZL(Rec, xRec, IsHandled); - if IsHandled then - exit; - - if not RegistrationNoMgtCZL.CheckRegistrationNo("Registration No. CZL", "No.", Database::Vendor) then - exit; - - LogNotVerified := true; - if "Registration No. CZL" <> xRec."Registration No. CZL" then - if RegNoServiceConfigCZL.RegNoSrvIsEnabled() then begin - LogNotVerified := false; - RegistrationLogMgtCZL.ValidateRegNoWithARES(ResultRecordRef, Rec, "No.", RegistrationLogCZL."Account Type"::Vendor); - ResultRecordRef.SetTable(Rec); - end; - - if LogNotVerified then - RegistrationLogMgtCZL.LogVendor(Rec); - end; -#endif } field(11771; "Tax Registration No. CZL"; Text[20]) { @@ -152,17 +118,6 @@ tableextension 11702 "Vendor CZL" extends Vendor ObsoleteReason = 'Intrastat related functionalities are moved to Intrastat extensions.'; } } -#if not CLEAN23 - keys - { - key(Key11700; "Registration No. CZL") - { - ObsoleteState = Pending; - ObsoleteTag = '23.0'; - ObsoleteReason = 'Replaced by standard "Registration Number" field.'; - } - } -#endif var UnrelPayerServiceSetupCZL: Record "Unrel. Payer Service Setup CZL"; diff --git a/Apps/CZ/CoreLocalizationPack/app/Src/Tables/NonDeductibleVATSetupCZL.Table.al b/Apps/CZ/CoreLocalizationPack/app/Src/Tables/NonDeductibleVATSetupCZL.Table.al index cb2f5835c7..965c5f6f4a 100644 --- a/Apps/CZ/CoreLocalizationPack/app/Src/Tables/NonDeductibleVATSetupCZL.Table.al +++ b/Apps/CZ/CoreLocalizationPack/app/Src/Tables/NonDeductibleVATSetupCZL.Table.al @@ -27,6 +27,11 @@ table 11713 "Non-Deductible VAT Setup CZL" DecimalPlaces = 0 : 1; MinValue = 0; MaxValue = 100; + + trigger OnValidate() + begin + TestField("To Date"); + end; } field(4; "Settlement Coefficient"; Decimal) { @@ -34,6 +39,11 @@ table 11713 "Non-Deductible VAT Setup CZL" DecimalPlaces = 0 : 1; MinValue = 0; MaxValue = 100; + + trigger OnValidate() + begin + TestField("To Date"); + end; } } diff --git a/Apps/CZ/CoreLocalizationPack/app/Src/Tables/RegistrationLogCZL.Table.al b/Apps/CZ/CoreLocalizationPack/app/Src/Tables/RegistrationLogCZL.Table.al index 35440fdfaa..f048c7ad3a 100644 --- a/Apps/CZ/CoreLocalizationPack/app/Src/Tables/RegistrationLogCZL.Table.al +++ b/Apps/CZ/CoreLocalizationPack/app/Src/Tables/RegistrationLogCZL.Table.al @@ -138,30 +138,29 @@ table 11756 "Registration Log CZL" Contact: Record Contact; CustContUpdate: Codeunit "CustCont-Update"; VendContUpdate: Codeunit "VendCont-Update"; - CustVendBankUpdate: Codeunit "CustVendBank-Update"; RecordRef: RecordRef; begin GetAccountRecordRef(RecordRef); - if OpenDetailForRecRef(RecordRef) then begin - RecordRef.Modify(); + if OpenDetailForRecRef(RecordRef) then case RecordRef.Number of Database::Customer: begin + RecordRef.Modify(); RecordRef.SetTable(Customer); CustContUpdate.OnModify(Customer); end; Database::Vendor: begin + RecordRef.Modify(); RecordRef.SetTable(Vendor); VendContUpdate.OnModify(Vendor); end; Database::Contact: begin RecordRef.SetTable(Contact); - CustVendBankUpdate.Run(Contact); + Contact.Modify(true); end; end; - end; end; procedure OpenDetailForRecRef(var RecordRef: RecordRef): Boolean @@ -312,9 +311,6 @@ table 11756 "Registration Log CZL" var RegistrationLogDetail: Record "Registration Log Detail CZL"; begin - if ResponseValue = '' then - exit; - InitRegistrationLogDetailFromRec(RegistrationLogDetail, FieldName, CurrentValue); RegistrationLogDetail.Response := CopyStr(ResponseValue, 1, MaxStrLen(RegistrationLogDetail.Response)); diff --git a/Apps/CZ/FixedAssetLocalization/app/Src/Codeunits/FAAcquisitionHandlerCZF.Codeunit.al b/Apps/CZ/FixedAssetLocalization/app/Src/Codeunits/FAAcquisitionHandlerCZF.Codeunit.al index 6b5a246790..ce497d720e 100644 --- a/Apps/CZ/FixedAssetLocalization/app/Src/Codeunits/FAAcquisitionHandlerCZF.Codeunit.al +++ b/Apps/CZ/FixedAssetLocalization/app/Src/Codeunits/FAAcquisitionHandlerCZF.Codeunit.al @@ -268,19 +268,6 @@ codeunit 31236 "FA Acquisition Handler CZF" IsHandled := true; end; -#if not CLEAN23 -#pragma warning disable AL0432 - [EventSubscriber(ObjectType::Table, Database::"Invoice Post. Buffer", 'OnAfterCopyToGenJnlLineFA', '', false, false)] - local procedure FAPostingTypeCustom2OnAfterCopyToGenJnlLineFAObsolete(var GenJnlLine: Record "Gen. Journal Line"; InvoicePostBuffer: Record "Invoice Post. Buffer") - begin - case InvoicePostBuffer."FA Posting Type" of - InvoicePostBuffer."FA Posting Type"::"Custom 2 CZF": - GenJnlLine."FA Posting Type" := GenJnlLine."FA Posting Type"::"Custom 2"; - end; - end; - -#pragma warning restore AL0432 -#endif [EventSubscriber(ObjectType::Table, Database::"Invoice Posting Buffer", 'OnAfterCopyToGenJnlLineFA', '', false, false)] local procedure FAPostingTypeCustom2OnAfterCopyToGenJnlLineFA(var GenJnlLine: Record "Gen. Journal Line"; InvoicePostingBuffer: Record "Invoice Posting Buffer") begin diff --git a/Apps/CZ/FixedAssetLocalization/app/Src/Codeunits/SuppUpdtSourceHandlerCZF.Codeunit.al b/Apps/CZ/FixedAssetLocalization/app/Src/Codeunits/SuppUpdtSourceHandlerCZF.Codeunit.al new file mode 100644 index 0000000000..ac77b0aeb2 --- /dev/null +++ b/Apps/CZ/FixedAssetLocalization/app/Src/Codeunits/SuppUpdtSourceHandlerCZF.Codeunit.al @@ -0,0 +1,13 @@ +codeunit 31176 "Supp. Updt. Source Handler CZF" +{ + Access = Internal; + EventSubscriberInstance = Manual; + + [EventSubscriber(ObjectType::Table, Database::"Gen. Journal Line", 'OnBeforeUpdateSource', '', false, false)] + local procedure SuppressOnBeforeUpdateSource(var GenJournalLine: Record "Gen. Journal Line"; var IsHandled: Boolean) + begin + if IsHandled then + exit; + IsHandled := true; + end; +} \ No newline at end of file diff --git a/Apps/CZ/FixedAssetLocalization/app/Src/Reports/CalculateDepreciationCZF.Report.al b/Apps/CZ/FixedAssetLocalization/app/Src/Reports/CalculateDepreciationCZF.Report.al index 3ffbcb751d..90ac9d0fd4 100644 --- a/Apps/CZ/FixedAssetLocalization/app/Src/Reports/CalculateDepreciationCZF.Report.al +++ b/Apps/CZ/FixedAssetLocalization/app/Src/Reports/CalculateDepreciationCZF.Report.al @@ -131,7 +131,7 @@ report 31240 "Calculate Depreciation CZF" FAJournalLine.Validate(FAJournalLine."FA No.", TempFAJournalLine."FA No."); FAJournalLine."Document No." := DocumentNo2; FAJournalLine."Posting No. Series" := NoSeries; - FAJournalLine.Description := PostingDescription; + FAJournalLine.Description := BuildDescription(TempFAJournalLine."FA No.", PostingDate); FAJournalLine.Validate(FAJournalLine."Depreciation Book Code", DeprBookCode); FAJournalLine.Validate(FAJournalLine.Amount, TempFAJournalLine.Amount); FAJournalLine."No. of Depreciation Days" := TempFAJournalLine."No. of Depreciation Days"; @@ -170,7 +170,7 @@ report 31240 "Calculate Depreciation CZF" GenJournalLine."FA Posting Type" := TempGenJournalLine."FA Posting Type"; GenJournalLine."Account Type" := GenJournalLine."Account Type"::"Fixed Asset"; GenJournalLine.Validate(GenJournalLine."Account No.", TempGenJournalLine."Account No."); - GenJournalLine.Description := PostingDescription; + GenJournalLine.Description := BuildDescription(TempGenJournalLine."Account No.", PostingDate); GenJournalLine."Document No." := DocumentNo2; GenJournalLine."Posting No. Series" := NoSeries; GenJournalLine.Validate(GenJournalLine."Depreciation Book Code", DeprBookCode); @@ -182,8 +182,11 @@ report 31240 "Calculate Depreciation CZF" OnBeforeGenJnlLineInsert(TempGenJournalLine, GenJournalLine); GenJournalLine.Insert(true); GenJnlLineCreatedCount += 1; - if BalAccount then + if BalAccount then begin + BindSubscription(SuppUpdtSourceHandlerCZF); FAInsertGLAccount.GetBalAcc(GenJournalLine, GenJnlNextLineNo); + UnBindSubscription(SuppUpdtSourceHandlerCZF); + end; OnAfterFAInsertGLAccGetBalAcc(GenJournalLine, GenJnlNextLineNo, BalAccount); until TempGenJournalLine.Next() = 0; OnAfterPostDataItem(); @@ -367,6 +370,7 @@ report 31240 "Calculate Depreciation CZF" GeneralLedgerSetup: Record "General Ledger Setup"; CalculateDepreciation: Codeunit "Calculate Depreciation"; FAInsertGLAccount: Codeunit "FA Insert G/L Account"; + SuppUpdtSourceHandlerCZF: Codeunit "Supp. Updt. Source Handler CZF"; WindowDialog: Dialog; DeprAmount: Decimal; Custom1Amount: Decimal; @@ -413,6 +417,11 @@ report 31240 "Calculate Depreciation CZF" BalAccount := BalAccountFrom; end; + local procedure BuildDescription(FANo: Code[20]; PeriodDate: Date): Text[100] + begin + exit(StrSubstNo(PostingDescription, FANo, StrSubstNo('%1/%2', Date2DMY(PeriodDate, 3), Date2DMY(PeriodDate, 2)))); + end; + [IntegrationEvent(false, false)] local procedure OnAfterCalculateDepreciation(FANo: Code[20]; var TempGenJournalLine: Record "Gen. Journal Line" temporary; var TempFAJournalLine: Record "FA Journal Line" temporary; var DeprAmount: Decimal; var NumberOfDays: Integer; DeprBookCode: Code[10]; DeprUntilDate: Date; EntryAmounts: array[4] of Decimal; DaysInPeriod: Integer) begin diff --git a/Apps/CZ/IntrastatCZ/app/src/PageExtensions/IntrastatReportCZ.PageExt.al b/Apps/CZ/IntrastatCZ/app/src/PageExtensions/IntrastatReportCZ.PageExt.al index 6dc7ce584a..0f0d4baf3f 100644 --- a/Apps/CZ/IntrastatCZ/app/src/PageExtensions/IntrastatReportCZ.PageExt.al +++ b/Apps/CZ/IntrastatCZ/app/src/PageExtensions/IntrastatReportCZ.PageExt.al @@ -22,4 +22,26 @@ pageextension 31344 "Intrastat Report CZ" extends "Intrastat Report" } } } + actions + { + addafter(CreateFile) + { + action("Intrastat - Invoice Check CZ") + { + ApplicationArea = Basic, Suite; + Caption = 'Intrastat - Invoice Checklist'; + Ellipsis = true; + Image = PrintChecklistReport; + ToolTip = 'Open the report for intrastat - invoice checklist.'; + + trigger OnAction() + var + IntrastatReportLine: Record "Intrastat Report Line"; + begin + IntrastatReportLine.SetRange("Intrastat No.", Rec."No."); + Report.Run(Report::"Intrastat - Invoice Check CZ", true, false, IntrastatReportLine); + end; + } + } + } } \ No newline at end of file diff --git a/Apps/CZ/IntrastatCZ/app/src/PageExtensions/PostedPurchCreditMemoCZ.PageExt.al b/Apps/CZ/IntrastatCZ/app/src/PageExtensions/PostedPurchCreditMemoCZ.PageExt.al index 0e0b89fd46..247bebeadf 100644 --- a/Apps/CZ/IntrastatCZ/app/src/PageExtensions/PostedPurchCreditMemoCZ.PageExt.al +++ b/Apps/CZ/IntrastatCZ/app/src/PageExtensions/PostedPurchCreditMemoCZ.PageExt.al @@ -10,13 +10,7 @@ pageextension 31349 "Posted Purch. Credit Memo CZ" extends "Posted Purchase Cred { layout { -#if not CLEAN23 -#pragma warning disable AL0432 - addlast("Foreign Trade") -#pragma warning restore AL0432 -#else addlast("Foreign Trade CZL") -#endif { field("Intrastat Exclude CZ"; Rec."Intrastat Exclude CZ") { diff --git a/Apps/CZ/IntrastatCZ/app/src/Reports/IntrastatInvoiceCheck.rdl b/Apps/CZ/IntrastatCZ/app/src/Reports/IntrastatInvoiceCheck.rdl new file mode 100644 index 0000000000..bbcd57b967 --- /dev/null +++ b/Apps/CZ/IntrastatCZ/app/src/Reports/IntrastatInvoiceCheck.rdl @@ -0,0 +1,2011 @@ + + + 0 + + + + SQL + + + None + 315d2af2-c54c-4d81-81ef-66c32b66e8ce + + + + + + + + + + + 1.5cm + + + 2.5cm + + + 2cm + + + 1.5cm + + + 2cm + + + 3.5cm + + + 1.75cm + + + 1.2cm + + + 1.5cm + + + 1.5cm + + + 1.5cm + + + 1.5cm + + + 1.5cm + + + 2cm + + + 2cm + + + + + 0.5cm + + + + + true + true + + + + + =Parameters!Type_IntrastatReportLineCaption.Value + + + + + + + + + + + true + true + + + + + =Parameters!DocumentType_CaptionLbl.Value + + + + + + + + + + + true + true + + + + + =Parameters!DocumentNo_CaptionLbl.Value + + + + + + + + + + + true + true + + + + + =Parameters!Date_CaptionLbl.Value + + + + + + + + + + + true + true + + + + + =Parameters!ItemNo_IntrastatReportLineCaption.Value + + + + + + + + + + + true + true + + + + + =Parameters!TariffDescription_IntrastatReportLineCaption.Value + + + + + + + + + + + true + true + + + + + =Parameters!TariffNo_IntrastatReportLineCaption.Value + + + + + + + + + + + true + true + + + + + =Parameters!CountryRegionCode_IntrastatReportLineCaption.Value + + + + + + + + + + + true + true + + + + + =Parameters!TransactionType_IntrastatReportLineCaption.Value + + + + + + + + + + + true + true + + + + + =Parameters!TransactionSpecification_IntrastatReportLineCaption.Value + + + + + + + + + + + true + true + + + + + =Parameters!TransportMethod_IntrastatReportLineCaption.Value + + + + + + + + + + + true + true + + + + + =Parameters!ShipmentMethodCode_IntrastatReportLineCaption.Value + + + + + + + + + + + true + true + + + + + =Parameters!Quantity_IntrastatReportLineCaption.Value + + + + + + + Textbox84 + + + + + + + + true + true + + + + + =Parameters!TotalWeight_IntrastatReportLineCaption.Value + + + + + + + Textbox85 + + + + + + + + true + true + + + + + =Parameters!Amount_IntrastatReportLineCaption.Value + + + + + + + Textbox86 + + + + + + + + 0.5cm + + + + + true + + + + + =Fields!Type_IntrastatReportLine.Value + + + + + + + + + + + true + + + + + =Fields!DocumentType_ItemLedgerEntry.Value + + + + + + + + + + + true + + + + + =Fields!DocumentNo_ItemLedgerEntry.Value + + + + + + + + + + + true + + + + + =Fields!PostingDate_ItemLedgerEntry.Value + + + + + + + + + + + true + + + + + =Fields!ItemNo_IntrastatReportLine.Value + + + + + + + + + + + true + + + + + =Fields!TariffDescription_IntrastatReportLine.Value + + + + + + + + + + + true + + + + + =Fields!TariffNo_IntrastatReportLine.Value + + + + + + + + + + + true + + + + + =Fields!CountryRegionCode_IntrastatReportLine.Value + + + + + + + + + + + true + + + + + =Fields!TransactionType_IntrastatReportLine.Value + + + + + + + + + + + true + + + + + =Fields!TransactionSpecification_IntrastatReportLine.Value + + + + + + + + + + + true + + + + + =Fields!TransportMethod_IntrastatReportLine.Value + + + + + + + + + + + true + + + + + =Fields!ShipmentMethodCode_IntrastatReportLine.Value + + + + + + + + + + + true + + + + + =Fields!Quantity_IntrastatReportLine.Value + + + + + + + + + + + true + + + + + =Fields!TotalWeight_IntrastatReportLine.Value + + + + + + + + + + + true + + + + + =Fields!Amount_IntrastatReportLine.Value + + + + + + + + + + + 0.5cm + + + + + true + + + + + + + + + + + + + + + + true + + + + + =Fields!DocumentType_TempDocBuffer.Value + + + + + + + + + + + true + + + + + =Fields!DocumentNo_TempDocBuffer.Value + + + + + + + + + + + true + + + + + =Fields!PostingDate_TempDocBuffer.Value + + + + + + + + + + + true + + + + + + + + + + + + + + + + true + + + + + + + + + + + + + + + + true + + + + + + + + + + + + + + + + true + + + + + + + + + + + + + + + + true + + + + + + + + + + + + + + + + true + + + + + + + + + + + + + + + + true + + + + + + + + + + + + + + + + true + + + + + + + + + + + + + + + + true + + + + + + + + + + + + + + + + true + + + + + + + + + + + + + + + + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + After + true + true + + + + + =Fields!IntrastatNo_IntrastatReportLine.Value + =Fields!LineNo_IntrastatReportLine.Value + + + + + After + true + + + + Detail + + + + + + =IIF(Len(Fields!DocumentNo_TempDocBuffer.Value) = 0,True,False) + + Detail_Collection + Output + true + + + + + + true + DataSet_Result + 1.5cm + 27.45cm + + + + + + + 1cm + 24.3cm + 0.5cm + 3.15cm + + + + true + + + + + =Globals!ExecutionTime + + + + + + + 0cm + 24.3cm + 0.5cm + 3.15cm + 1 + + + + true + + + + + =First(Fields!CompanyName.Value, "DataSet_Result") + + + + + + + true + + + + + =Parameters!PageLbl.Value & " " & Globals!PageNumber + + + + + + + 0.5cm + 24.3cm + 0.5cm + 3.15cm + 3 + + + + true + true + + + + + =Parameters!ReportNameLbl.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + +