From 146542f4bee47c6b46ae6c7c7f4bb2f8d1fa5c56 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joshua=20Mart=C3=ADnez=20Pineda?= Date: Tue, 2 Jun 2026 16:24:13 +0200 Subject: [PATCH 1/5] Render per-row Currency Code in Aged Accounts Receivable/Payable Excel MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The CurrencyCode column was bound to a single AgingData-buffer-wide variable (CurrencyCodeDisplayCode) computed once after InsertAgingData, so every row of a customer/vendor displayed the same currency — the last one inserted. When a customer/vendor had entries in multiple currencies, foreign-currency rows showed the LCY code (or vice versa). Bind the column to AgingData."Currency Code" directly, and fall back to G/L Setup's LCY Code at insertion time when the ledger entry's Currency Code is empty. Fixes AB#637444 --- .../EXRAgedAccPayableExcel.Report.al | 17 +- .../EXRAgedAccountsRecExcel.Report.al | 17 +- .../src/AgedAccountsExcelReports.Codeunit.al | 391 ++++++++++++++++++ .../src/TrialBalanceExcelReports.Codeunit.al | 242 ----------- 4 files changed, 409 insertions(+), 258 deletions(-) create mode 100644 src/Apps/W1/ExcelReports/Test/src/AgedAccountsExcelReports.Codeunit.al diff --git a/src/Apps/W1/ExcelReports/App/src/Financials/EXRAgedAccPayableExcel.Report.al b/src/Apps/W1/ExcelReports/App/src/Financials/EXRAgedAccPayableExcel.Report.al index a09b3759b3..700e0f66b9 100644 --- a/src/Apps/W1/ExcelReports/App/src/Financials/EXRAgedAccPayableExcel.Report.al +++ b/src/Apps/W1/ExcelReports/App/src/Financials/EXRAgedAccPayableExcel.Report.al @@ -84,8 +84,9 @@ report 4403 "EXR Aged Acc Payable Excel" { IncludeCaption = true; } - column(CurrencyCode; CurrencyCodeDisplayCode) + column(CurrencyCode; "Currency Code") { + IncludeCaption = true; } column(PostingDate; "Posting Date") { @@ -126,11 +127,6 @@ report 4403 "EXR Aged Acc Payable Excel" Clear(AgingData); AgingData.DeleteAll(); InsertAgingData(VendorAgingData); - - if AgingData."Currency Code" = '' then - CurrencyCodeDisplayCode := GeneralLedgerSetup.GetCurrencyCode('') - else - CurrencyCodeDisplayCode := AgingData."Currency Code"; end; } @@ -271,7 +267,6 @@ report 4403 "EXR Aged Acc Payable Excel" DueByCurrencies = 'Due by Currencies', MaxLength = 31, Comment = 'Excel worksheet name.'; OpenByFCY = 'Open by (FCY)'; DataRetrieved = 'Data retrieved:'; - CurrencyCodeDisplay = 'Currency Code'; AgedAsOf = 'Aged as of:'; AgedAccountsPayable = 'Aged Accounts Payable'; AgedAccountsPayablePrint = 'Aged Accounts Payable (Print)', MaxLength = 31, Comment = 'Excel worksheet name.'; @@ -322,6 +317,9 @@ report 4403 "EXR Aged Acc Payable Excel" if PeriodCount = 0 then PeriodCount := 5; + if not GeneralLedgerSetup.Get() then + Clear(GeneralLedgerSetup); + WorkingEndDate := EndingDate; WorkingStartDate := CalcDate(PeriodLength, WorkingEndDate); repeat @@ -366,7 +364,10 @@ report 4403 "EXR Aged Acc Payable Excel" AgingData."Document Type" := VendorLedgerEntry."Document Type"; AgingData."Dimension 1 Code" := VendorLedgerEntry."Global Dimension 1 Code"; AgingData."Dimension 2 Code" := VendorLedgerEntry."Global Dimension 2 Code"; - AgingData."Currency Code" := VendorLedgerEntry."Currency Code"; + if VendorLedgerEntry."Currency Code" = '' then + AgingData."Currency Code" := GeneralLedgerSetup.GetCurrencyCode('') + else + AgingData."Currency Code" := VendorLedgerEntry."Currency Code"; AgingData."Posting Date" := VendorLedgerEntry."Posting Date"; AgingData."Document Date" := VendorLedgerEntry."Document Date"; AgingData."Due Date" := VendorLedgerEntry."Due Date"; diff --git a/src/Apps/W1/ExcelReports/App/src/Financials/EXRAgedAccountsRecExcel.Report.al b/src/Apps/W1/ExcelReports/App/src/Financials/EXRAgedAccountsRecExcel.Report.al index b16e1ca692..77b06f5274 100644 --- a/src/Apps/W1/ExcelReports/App/src/Financials/EXRAgedAccountsRecExcel.Report.al +++ b/src/Apps/W1/ExcelReports/App/src/Financials/EXRAgedAccountsRecExcel.Report.al @@ -83,8 +83,9 @@ report 4402 "EXR Aged Accounts Rec Excel" { IncludeCaption = true; } - column(CurrencyCode; CurrencyCodeDisplayCode) + column(CurrencyCode; "Currency Code") { + IncludeCaption = true; } column(PostingDate; "Posting Date") { @@ -125,11 +126,6 @@ report 4402 "EXR Aged Accounts Rec Excel" Clear(AgingData); AgingData.DeleteAll(); InsertAgingData(CustomerAgingData); - - if AgingData."Currency Code" = '' then - CurrencyCodeDisplayCode := GeneralLedgerSetup.GetCurrencyCode('') - else - CurrencyCodeDisplayCode := AgingData."Currency Code"; end; } @@ -270,7 +266,6 @@ report 4402 "EXR Aged Accounts Rec Excel" DueByCurrencies = 'Due by Currencies', MaxLength = 31, Comment = 'Excel worksheet name.'; OpenByFCY = 'Open by (FCY)'; DataRetrieved = 'Data retrieved:'; - CurrencyCodeDisplay = 'Currency Code'; AgedAsOf = 'Aged as of:'; AgedAccountsReceivable = 'Aged Accounts Receivable'; AgedAccountsReceivablePrint = 'Aged Accounts Rec. (Print)', MaxLength = 31, Comment = 'Excel worksheet name.'; @@ -321,6 +316,9 @@ report 4402 "EXR Aged Accounts Rec Excel" if PeriodCount = 0 then PeriodCount := 5; + if not GeneralLedgerSetup.Get() then + Clear(GeneralLedgerSetup); + WorkingEndDate := EndingDate; WorkingStartDate := CalcDate(PeriodLength, WorkingEndDate); repeat @@ -365,7 +363,10 @@ report 4402 "EXR Aged Accounts Rec Excel" AgingData."Document Type" := CustLedgerEntry."Document Type"; AgingData."Dimension 1 Code" := CustLedgerEntry."Global Dimension 1 Code"; AgingData."Dimension 2 Code" := CustLedgerEntry."Global Dimension 2 Code"; - AgingData."Currency Code" := CustLedgerEntry."Currency Code"; + if CustLedgerEntry."Currency Code" = '' then + AgingData."Currency Code" := GeneralLedgerSetup.GetCurrencyCode('') + else + AgingData."Currency Code" := CustLedgerEntry."Currency Code"; AgingData."Posting Date" := CustLedgerEntry."Posting Date"; AgingData."Document Date" := CustLedgerEntry."Document Date"; AgingData."Due Date" := CustLedgerEntry."Due Date"; diff --git a/src/Apps/W1/ExcelReports/Test/src/AgedAccountsExcelReports.Codeunit.al b/src/Apps/W1/ExcelReports/Test/src/AgedAccountsExcelReports.Codeunit.al new file mode 100644 index 0000000000..aceb7f1645 --- /dev/null +++ b/src/Apps/W1/ExcelReports/Test/src/AgedAccountsExcelReports.Codeunit.al @@ -0,0 +1,391 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ + +namespace Microsoft.Finance.ExcelReports.Test; + +using Microsoft.Finance.ExcelReports; +using Microsoft.Finance.GeneralLedger.Journal; +using Microsoft.Finance.GeneralLedger.Setup; +using Microsoft.Purchases.Payables; +using Microsoft.Purchases.Vendor; +using Microsoft.Sales.Customer; +using Microsoft.Sales.Receivables; + +codeunit 139547 "Aged Accounts Excel Reports" +{ + Subtype = Test; + RequiredTestIsolation = Disabled; + TestPermissions = Disabled; + + var + LibraryRandom: Codeunit "Library - Random"; + LibraryReportDataset: Codeunit "Library - Report Dataset"; + Assert: Codeunit Assert; + DocumentTypeShouldBeInvoiceErr: Label 'Document Type should be Invoice'; + DocumentNoShouldMatchErr: Label 'Document No should match the ledger entry'; + + [Test] + [HandlerFunctions('EXRAgedAccPayableExcelHandler')] + procedure AgedAccountsPayableExportsDocumentTypeAndNo() + var + Vendor: Record Vendor; + VendorLedgerEntry: Record "Vendor Ledger Entry"; + Variant: Variant; + RequestPageXml: Text; + ReportDocumentType: Text; + ReportDocumentNo: Text; + begin + // [FEATURE] [AI test] + // [SCENARIO 622247] Aged Accounts Payable Excel report exports Document Type and Document No fields correctly for Invoice entries + InitializeAgingData(); + + // [GIVEN] Vendor "V" with an open vendor ledger entry of type Invoice + // Create vendor directly to avoid VAT posting setup requirements in some localizations + CreateMinimalVendor(Vendor); + CreateVendorLedgerEntry(VendorLedgerEntry, Vendor."No.", "Gen. Journal Document Type"::Invoice); + Commit(); + + // [WHEN] Running the Aged Accounts Payable Excel report + RequestPageXml := Report.RunRequestPage(Report::"EXR Aged Acc Payable Excel", RequestPageXml); + LibraryReportDataset.RunReportAndLoad(Report::"EXR Aged Acc Payable Excel", Variant, RequestPageXml); + + // [THEN] The exported data contains the Document Type "Invoice" and the correct Document No + LibraryReportDataset.SetXmlNodeList('DataItem[@name="AgingData"]'); + Assert.AreEqual(1, LibraryReportDataset.RowCount(), 'One aging entry should be exported'); + LibraryReportDataset.GetNextRow(); + LibraryReportDataset.FindCurrentRowValue('DocumentType', Variant); + ReportDocumentType := Variant; + Assert.AreEqual(Format("Gen. Journal Document Type"::Invoice), ReportDocumentType, DocumentTypeShouldBeInvoiceErr); + LibraryReportDataset.FindCurrentRowValue('DocumentNo', Variant); + ReportDocumentNo := Variant; + Assert.AreEqual(VendorLedgerEntry."Document No.", ReportDocumentNo, DocumentNoShouldMatchErr); + end; + + [Test] + [HandlerFunctions('EXRAgedAccountsRecExcelHandler')] + procedure AgedAccountsRecExportsDocumentTypeAndNo() + var + Customer: Record Customer; + CustLedgerEntry: Record "Cust. Ledger Entry"; + Variant: Variant; + RequestPageXml: Text; + ReportDocumentType: Text; + ReportDocumentNo: Text; + begin + // [FEATURE] [AI test] + // [SCENARIO 622247] Aged Accounts Receivable Excel report exports Document Type and Document No fields correctly for Invoice entries + InitializeAgingData(); + + // [GIVEN] Customer "C" with an open customer ledger entry of type Invoice + // Create customer directly to avoid VAT posting setup requirements in some localizations + CreateMinimalCustomer(Customer); + CreateCustLedgerEntry(CustLedgerEntry, Customer."No.", "Gen. Journal Document Type"::Invoice); + Commit(); + + // [WHEN] Running the Aged Accounts Receivable Excel report + RequestPageXml := Report.RunRequestPage(Report::"EXR Aged Accounts Rec Excel", RequestPageXml); + LibraryReportDataset.RunReportAndLoad(Report::"EXR Aged Accounts Rec Excel", Variant, RequestPageXml); + + // [THEN] The exported data contains the Document Type "Invoice" and the correct Document No + LibraryReportDataset.SetXmlNodeList('DataItem[@name="AgingData"]'); + Assert.AreEqual(1, LibraryReportDataset.RowCount(), 'One aging entry should be exported'); + LibraryReportDataset.GetNextRow(); + LibraryReportDataset.FindCurrentRowValue('DocumentType', Variant); + ReportDocumentType := Variant; + Assert.AreEqual(Format("Gen. Journal Document Type"::Invoice), ReportDocumentType, DocumentTypeShouldBeInvoiceErr); + LibraryReportDataset.FindCurrentRowValue('DocumentNo', Variant); + ReportDocumentNo := Variant; + Assert.AreEqual(CustLedgerEntry."Document No.", ReportDocumentNo, DocumentNoShouldMatchErr); + end; + + [Test] + [HandlerFunctions('EXRAgedAccPayablePostingDateHandler')] + procedure AgedAccountsPayableReportAgesByPostingDate() + var + Vendor: Record Vendor; + VendorLedgerEntry: Record "Vendor Ledger Entry"; + Variant: Variant; + RequestPageXml: Text; + ReportingDateText: Text; + ReportingDate: Date; + begin + // [FEATURE] [AI test 0.4] + // [SCENARIO] Aged Accounts Payable report uses Posting Date as Reporting Date when aging by Posting Date + InitializeAgingData(); + + // [GIVEN] Vendor "V" with an open ledger entry where Posting Date, Document Date, and Due Date are distinct + CreateMinimalVendor(Vendor); + CreateVendorLedgerEntry(VendorLedgerEntry, Vendor."No.", "Gen. Journal Document Type"::Invoice); + VendorLedgerEntry."Document Date" := WorkDate() - 10; + VendorLedgerEntry.Modify(); + Commit(); + + // [WHEN] Running the Aged Accounts Payable Excel report with Aging By = Posting Date + RequestPageXml := Report.RunRequestPage(Report::"EXR Aged Acc Payable Excel", RequestPageXml); + LibraryReportDataset.RunReportAndLoad(Report::"EXR Aged Acc Payable Excel", Variant, RequestPageXml); + + // [THEN] The Reporting Date matches the Posting Date of the vendor ledger entry + LibraryReportDataset.SetXmlNodeList('DataItem[@name="AgingData"]'); + Assert.AreEqual(1, LibraryReportDataset.RowCount(), 'One aging entry should be exported'); + LibraryReportDataset.GetNextRow(); + LibraryReportDataset.FindCurrentRowValue('ReportingDate', Variant); + ReportingDateText := Variant; + Evaluate(ReportingDate, ReportingDateText); + Assert.AreEqual(VendorLedgerEntry."Posting Date", ReportingDate, 'Reporting Date should match the Posting Date when aging by Posting Date'); + end; + + [Test] + [HandlerFunctions('EXRAgedAccountsRecExcelHandler')] + procedure AgedAccountsRecRendersCurrencyCodePerEntry() + var + Customer: Record Customer; + GeneralLedgerSetup: Record "General Ledger Setup"; + UsdEntry, LcyEntry : Record "Cust. Ledger Entry"; + Variant: Variant; + RequestPageXml: Text; + LcyCode: Code[10]; + ForeignCurrencyCode: Code[10]; + DocNo, CurrencyCode : Text; + i: Integer; + UsdRowSeen, LcyRowSeen : Boolean; + begin + // [SCENARIO 637444] Aged Accounts Receivable Excel renders each row's own Currency Code, not a single per-customer value + InitializeAgingData(); + + // [GIVEN] G/L Setup with a distinct LCY Code + LcyCode := 'LCY'; + ForeignCurrencyCode := 'USD'; + if not GeneralLedgerSetup.Get() then + GeneralLedgerSetup.Insert(); + GeneralLedgerSetup."LCY Code" := LcyCode; + GeneralLedgerSetup.Modify(); + + // [GIVEN] A customer with one foreign-currency entry and one LCY (empty Currency Code) entry + CreateMinimalCustomer(Customer); + CreateCustLedgerEntry(UsdEntry, Customer."No.", "Gen. Journal Document Type"::Invoice, ForeignCurrencyCode); + CreateCustLedgerEntry(LcyEntry, Customer."No.", "Gen. Journal Document Type"::Invoice, ''); + Commit(); + + // [WHEN] Running the Aged Accounts Receivable Excel report + RequestPageXml := Report.RunRequestPage(Report::"EXR Aged Accounts Rec Excel", RequestPageXml); + LibraryReportDataset.RunReportAndLoad(Report::"EXR Aged Accounts Rec Excel", Variant, RequestPageXml); + + // [THEN] The foreign-currency row shows the foreign code and the LCY row shows the LCY code + LibraryReportDataset.SetXmlNodeList('DataItem[@name="AgingData"]'); + Assert.AreEqual(2, LibraryReportDataset.RowCount(), 'Two aging entries should be exported'); + for i := 1 to 2 do begin + LibraryReportDataset.GetNextRow(); + LibraryReportDataset.FindCurrentRowValue('DocumentNo', Variant); + DocNo := Variant; + LibraryReportDataset.FindCurrentRowValue('CurrencyCode', Variant); + CurrencyCode := Variant; + if DocNo = UsdEntry."Document No." then begin + Assert.AreEqual(ForeignCurrencyCode, CurrencyCode, 'Foreign-currency row should show its own currency code'); + UsdRowSeen := true; + end else + if DocNo = LcyEntry."Document No." then begin + Assert.AreEqual(LcyCode, CurrencyCode, 'LCY (empty Currency Code) row should fall back to G/L Setup LCY Code'); + LcyRowSeen := true; + end; + end; + Assert.IsTrue(UsdRowSeen, 'Foreign-currency row should be present'); + Assert.IsTrue(LcyRowSeen, 'LCY row should be present'); + end; + + [Test] + [HandlerFunctions('EXRAgedAccPayableExcelHandler')] + procedure AgedAccountsPayableRendersCurrencyCodePerEntry() + var + Vendor: Record Vendor; + GeneralLedgerSetup: Record "General Ledger Setup"; + UsdEntry, LcyEntry : Record "Vendor Ledger Entry"; + Variant: Variant; + RequestPageXml: Text; + LcyCode: Code[10]; + ForeignCurrencyCode: Code[10]; + DocNo, CurrencyCode : Text; + i: Integer; + UsdRowSeen, LcyRowSeen : Boolean; + begin + // [SCENARIO 637444] Aged Accounts Payable Excel renders each row's own Currency Code, not a single per-vendor value + InitializeAgingData(); + + // [GIVEN] G/L Setup with a distinct LCY Code + LcyCode := 'LCY'; + ForeignCurrencyCode := 'USD'; + if not GeneralLedgerSetup.Get() then + GeneralLedgerSetup.Insert(); + GeneralLedgerSetup."LCY Code" := LcyCode; + GeneralLedgerSetup.Modify(); + + // [GIVEN] A vendor with one foreign-currency entry and one LCY (empty Currency Code) entry + CreateMinimalVendor(Vendor); + CreateVendorLedgerEntry(UsdEntry, Vendor."No.", "Gen. Journal Document Type"::Invoice, ForeignCurrencyCode); + CreateVendorLedgerEntry(LcyEntry, Vendor."No.", "Gen. Journal Document Type"::Invoice, ''); + Commit(); + + // [WHEN] Running the Aged Accounts Payable Excel report + RequestPageXml := Report.RunRequestPage(Report::"EXR Aged Acc Payable Excel", RequestPageXml); + LibraryReportDataset.RunReportAndLoad(Report::"EXR Aged Acc Payable Excel", Variant, RequestPageXml); + + // [THEN] The foreign-currency row shows the foreign code and the LCY row shows the LCY code + LibraryReportDataset.SetXmlNodeList('DataItem[@name="AgingData"]'); + Assert.AreEqual(2, LibraryReportDataset.RowCount(), 'Two aging entries should be exported'); + for i := 1 to 2 do begin + LibraryReportDataset.GetNextRow(); + LibraryReportDataset.FindCurrentRowValue('DocumentNo', Variant); + DocNo := Variant; + LibraryReportDataset.FindCurrentRowValue('CurrencyCode', Variant); + CurrencyCode := Variant; + if DocNo = UsdEntry."Document No." then begin + Assert.AreEqual(ForeignCurrencyCode, CurrencyCode, 'Foreign-currency row should show its own currency code'); + UsdRowSeen := true; + end else + if DocNo = LcyEntry."Document No." then begin + Assert.AreEqual(LcyCode, CurrencyCode, 'LCY (empty Currency Code) row should fall back to G/L Setup LCY Code'); + LcyRowSeen := true; + end; + end; + Assert.IsTrue(UsdRowSeen, 'Foreign-currency row should be present'); + Assert.IsTrue(LcyRowSeen, 'LCY row should be present'); + end; + + local procedure InitializeAgingData() + var + Vendor: Record Vendor; + Customer: Record Customer; + VendorLedgerEntry: Record "Vendor Ledger Entry"; + CustLedgerEntry: Record "Cust. Ledger Entry"; + DetailedVendorLedgEntry: Record "Detailed Vendor Ledg. Entry"; + DetailedCustLedgEntry: Record "Detailed Cust. Ledg. Entry"; + begin + DetailedVendorLedgEntry.DeleteAll(); + DetailedCustLedgEntry.DeleteAll(); + VendorLedgerEntry.DeleteAll(); + CustLedgerEntry.DeleteAll(); + Vendor.DeleteAll(); + Customer.DeleteAll(); + end; + + local procedure CreateMinimalVendor(var Vendor: Record Vendor) + begin + Vendor.Init(); + Vendor."No." := CopyStr(Format(CreateGuid()), 1, MaxStrLen(Vendor."No.")); + Vendor.Name := Vendor."No."; + Vendor.Insert(); + end; + + local procedure CreateMinimalCustomer(var Customer: Record Customer) + begin + Customer.Init(); + Customer."No." := CopyStr(Format(CreateGuid()), 1, MaxStrLen(Customer."No.")); + Customer.Name := Customer."No."; + Customer.Insert(); + end; + + local procedure CreateVendorLedgerEntry(var VendorLedgerEntry: Record "Vendor Ledger Entry"; VendorNo: Code[20]; DocumentType: Enum "Gen. Journal Document Type") + begin + CreateVendorLedgerEntry(VendorLedgerEntry, VendorNo, DocumentType, ''); + end; + + local procedure CreateVendorLedgerEntry(var VendorLedgerEntry: Record "Vendor Ledger Entry"; VendorNo: Code[20]; DocumentType: Enum "Gen. Journal Document Type"; CurrencyCode: Code[10]) + var + DetailedVendorLedgEntry: Record "Detailed Vendor Ledg. Entry"; + EntryNo: Integer; + Amount: Decimal; + begin + if VendorLedgerEntry.FindLast() then; + EntryNo := VendorLedgerEntry."Entry No." + 1; + + VendorLedgerEntry.Init(); + VendorLedgerEntry."Entry No." := EntryNo; + VendorLedgerEntry."Vendor No." := VendorNo; + VendorLedgerEntry."Vendor Name" := VendorNo; + VendorLedgerEntry."Document Type" := DocumentType; + VendorLedgerEntry."Document No." := 'DOC' + Format(EntryNo); + VendorLedgerEntry."Posting Date" := WorkDate(); + VendorLedgerEntry."Document Date" := WorkDate(); + VendorLedgerEntry."Due Date" := WorkDate() + 30; + VendorLedgerEntry."Currency Code" := CurrencyCode; + VendorLedgerEntry.Open := true; + VendorLedgerEntry.Insert(); + + // Create detailed vendor ledger entry for remaining amount + Amount := -LibraryRandom.RandDec(1000, 2); + if DetailedVendorLedgEntry.FindLast() then; + DetailedVendorLedgEntry.Init(); + DetailedVendorLedgEntry."Entry No." := DetailedVendorLedgEntry."Entry No." + 1; + DetailedVendorLedgEntry."Vendor Ledger Entry No." := VendorLedgerEntry."Entry No."; + DetailedVendorLedgEntry."Vendor No." := VendorNo; + DetailedVendorLedgEntry."Posting Date" := WorkDate(); + DetailedVendorLedgEntry."Entry Type" := DetailedVendorLedgEntry."Entry Type"::"Initial Entry"; + DetailedVendorLedgEntry.Amount := Amount; + DetailedVendorLedgEntry."Amount (LCY)" := Amount; + DetailedVendorLedgEntry.Insert(); + end; + + local procedure CreateCustLedgerEntry(var CustLedgerEntry: Record "Cust. Ledger Entry"; CustomerNo: Code[20]; DocumentType: Enum "Gen. Journal Document Type") + begin + CreateCustLedgerEntry(CustLedgerEntry, CustomerNo, DocumentType, ''); + end; + + local procedure CreateCustLedgerEntry(var CustLedgerEntry: Record "Cust. Ledger Entry"; CustomerNo: Code[20]; DocumentType: Enum "Gen. Journal Document Type"; CurrencyCode: Code[10]) + var + DetailedCustLedgEntry: Record "Detailed Cust. Ledg. Entry"; + EntryNo: Integer; + Amount: Decimal; + begin + if CustLedgerEntry.FindLast() then; + EntryNo := CustLedgerEntry."Entry No." + 1; + + CustLedgerEntry.Init(); + CustLedgerEntry."Entry No." := EntryNo; + CustLedgerEntry."Customer No." := CustomerNo; + CustLedgerEntry."Customer Name" := CustomerNo; + CustLedgerEntry."Document Type" := DocumentType; + CustLedgerEntry."Document No." := 'DOC' + Format(EntryNo); + CustLedgerEntry."Posting Date" := WorkDate(); + CustLedgerEntry."Document Date" := WorkDate(); + CustLedgerEntry."Due Date" := WorkDate() + 30; + CustLedgerEntry."Currency Code" := CurrencyCode; + CustLedgerEntry.Open := true; + CustLedgerEntry.Insert(); + + // Create detailed customer ledger entry for remaining amount + Amount := LibraryRandom.RandDec(1000, 2); + if DetailedCustLedgEntry.FindLast() then; + DetailedCustLedgEntry.Init(); + DetailedCustLedgEntry."Entry No." := DetailedCustLedgEntry."Entry No." + 1; + DetailedCustLedgEntry."Cust. Ledger Entry No." := CustLedgerEntry."Entry No."; + DetailedCustLedgEntry."Customer No." := CustomerNo; + DetailedCustLedgEntry."Posting Date" := WorkDate(); + DetailedCustLedgEntry."Entry Type" := DetailedCustLedgEntry."Entry Type"::"Initial Entry"; + DetailedCustLedgEntry.Amount := Amount; + DetailedCustLedgEntry."Amount (LCY)" := Amount; + DetailedCustLedgEntry.Insert(); + end; + + [RequestPageHandler] + procedure EXRAgedAccPayableExcelHandler(var EXRAgedAccPayableExcel: TestRequestPage "EXR Aged Acc Payable Excel") + begin + EXRAgedAccPayableExcel.AgedAsOfOption.SetValue(WorkDate()); + EXRAgedAccPayableExcel.OK().Invoke(); + end; + + [RequestPageHandler] + procedure EXRAgedAccountsRecExcelHandler(var EXRAgedAccountsRecExcel: TestRequestPage "EXR Aged Accounts Rec Excel") + begin + EXRAgedAccountsRecExcel.AgedAsOfOption.SetValue(WorkDate()); + EXRAgedAccountsRecExcel.OK().Invoke(); + end; + + [RequestPageHandler] + procedure EXRAgedAccPayablePostingDateHandler(var EXRAgedAccPayableExcel: TestRequestPage "EXR Aged Acc Payable Excel") + begin + EXRAgedAccPayableExcel.AgedAsOfOption.SetValue(WorkDate()); + EXRAgedAccPayableExcel.AgingbyOption.SetValue('Posting Date'); + EXRAgedAccPayableExcel.OK().Invoke(); + end; +} diff --git a/src/Apps/W1/ExcelReports/Test/src/TrialBalanceExcelReports.Codeunit.al b/src/Apps/W1/ExcelReports/Test/src/TrialBalanceExcelReports.Codeunit.al index c64ec5894b..9c97c0a32a 100644 --- a/src/Apps/W1/ExcelReports/Test/src/TrialBalanceExcelReports.Codeunit.al +++ b/src/Apps/W1/ExcelReports/Test/src/TrialBalanceExcelReports.Codeunit.al @@ -12,10 +12,6 @@ using Microsoft.Finance.GeneralLedger.Account; using Microsoft.Finance.GeneralLedger.Budget; using Microsoft.Finance.GeneralLedger.Journal; using Microsoft.Finance.GeneralLedger.Ledger; -using Microsoft.Purchases.Payables; -using Microsoft.Purchases.Vendor; -using Microsoft.Sales.Customer; -using Microsoft.Sales.Receivables; codeunit 139544 "Trial Balance Excel Reports" { @@ -26,11 +22,8 @@ codeunit 139544 "Trial Balance Excel Reports" var LibraryERM: Codeunit "Library - ERM"; - LibraryRandom: Codeunit "Library - Random"; LibraryReportDataset: Codeunit "Library - Report Dataset"; Assert: Codeunit Assert; - DocumentTypeShouldBeInvoiceErr: Label 'Document Type should be Invoice'; - DocumentNoShouldMatchErr: Label 'Document No should match the ledger entry'; [Test] [HandlerFunctions('EXRTrialBalanceExcelHandler')] @@ -667,116 +660,6 @@ codeunit 139544 "Trial Balance Excel Reports" Assert.AreEqual(0, TrialBalanceData."Starting Balance", 'Starting Balance should be zero after closing entries') end; - [Test] - [HandlerFunctions('EXRAgedAccPayableExcelHandler')] - procedure AgedAccountsPayableExportsDocumentTypeAndNo() - var - Vendor: Record Vendor; - VendorLedgerEntry: Record "Vendor Ledger Entry"; - Variant: Variant; - RequestPageXml: Text; - ReportDocumentType: Text; - ReportDocumentNo: Text; - begin - // [FEATURE] [AI test] - // [SCENARIO 622247] Aged Accounts Payable Excel report exports Document Type and Document No fields correctly for Invoice entries - InitializeAgingData(); - - // [GIVEN] Vendor "V" with an open vendor ledger entry of type Invoice - // Create vendor directly to avoid VAT posting setup requirements in some localizations - CreateMinimalVendor(Vendor); - CreateVendorLedgerEntry(VendorLedgerEntry, Vendor."No.", "Gen. Journal Document Type"::Invoice); - Commit(); - - // [WHEN] Running the Aged Accounts Payable Excel report - RequestPageXml := Report.RunRequestPage(Report::"EXR Aged Acc Payable Excel", RequestPageXml); - LibraryReportDataset.RunReportAndLoad(Report::"EXR Aged Acc Payable Excel", Variant, RequestPageXml); - - // [THEN] The exported data contains the Document Type "Invoice" and the correct Document No - LibraryReportDataset.SetXmlNodeList('DataItem[@name="AgingData"]'); - Assert.AreEqual(1, LibraryReportDataset.RowCount(), 'One aging entry should be exported'); - LibraryReportDataset.GetNextRow(); - LibraryReportDataset.FindCurrentRowValue('DocumentType', Variant); - ReportDocumentType := Variant; - Assert.AreEqual(Format("Gen. Journal Document Type"::Invoice), ReportDocumentType, DocumentTypeShouldBeInvoiceErr); - LibraryReportDataset.FindCurrentRowValue('DocumentNo', Variant); - ReportDocumentNo := Variant; - Assert.AreEqual(VendorLedgerEntry."Document No.", ReportDocumentNo, DocumentNoShouldMatchErr); - end; - - [Test] - [HandlerFunctions('EXRAgedAccountsRecExcelHandler')] - procedure AgedAccountsRecExportsDocumentTypeAndNo() - var - Customer: Record Customer; - CustLedgerEntry: Record "Cust. Ledger Entry"; - Variant: Variant; - RequestPageXml: Text; - ReportDocumentType: Text; - ReportDocumentNo: Text; - begin - // [FEATURE] [AI test] - // [SCENARIO 622247] Aged Accounts Receivable Excel report exports Document Type and Document No fields correctly for Invoice entries - InitializeAgingData(); - - // [GIVEN] Customer "C" with an open customer ledger entry of type Invoice - // Create customer directly to avoid VAT posting setup requirements in some localizations - CreateMinimalCustomer(Customer); - CreateCustLedgerEntry(CustLedgerEntry, Customer."No.", "Gen. Journal Document Type"::Invoice); - Commit(); - - // [WHEN] Running the Aged Accounts Receivable Excel report - RequestPageXml := Report.RunRequestPage(Report::"EXR Aged Accounts Rec Excel", RequestPageXml); - LibraryReportDataset.RunReportAndLoad(Report::"EXR Aged Accounts Rec Excel", Variant, RequestPageXml); - - // [THEN] The exported data contains the Document Type "Invoice" and the correct Document No - LibraryReportDataset.SetXmlNodeList('DataItem[@name="AgingData"]'); - Assert.AreEqual(1, LibraryReportDataset.RowCount(), 'One aging entry should be exported'); - LibraryReportDataset.GetNextRow(); - LibraryReportDataset.FindCurrentRowValue('DocumentType', Variant); - ReportDocumentType := Variant; - Assert.AreEqual(Format("Gen. Journal Document Type"::Invoice), ReportDocumentType, DocumentTypeShouldBeInvoiceErr); - LibraryReportDataset.FindCurrentRowValue('DocumentNo', Variant); - ReportDocumentNo := Variant; - Assert.AreEqual(CustLedgerEntry."Document No.", ReportDocumentNo, DocumentNoShouldMatchErr); - end; - - [Test] - [HandlerFunctions('EXRAgedAccPayablePostingDateHandler')] - procedure AgedAccountsPayableReportAgesByPostingDate() - var - Vendor: Record Vendor; - VendorLedgerEntry: Record "Vendor Ledger Entry"; - Variant: Variant; - RequestPageXml: Text; - ReportingDateText: Text; - ReportingDate: Date; - begin - // [FEATURE] [AI test 0.4] - // [SCENARIO] Aged Accounts Payable report uses Posting Date as Reporting Date when aging by Posting Date - InitializeAgingData(); - - // [GIVEN] Vendor "V" with an open ledger entry where Posting Date, Document Date, and Due Date are distinct - CreateMinimalVendor(Vendor); - CreateVendorLedgerEntry(VendorLedgerEntry, Vendor."No.", "Gen. Journal Document Type"::Invoice); - VendorLedgerEntry."Document Date" := WorkDate() - 10; - VendorLedgerEntry.Modify(); - Commit(); - - // [WHEN] Running the Aged Accounts Payable Excel report with Aging By = Posting Date - RequestPageXml := Report.RunRequestPage(Report::"EXR Aged Acc Payable Excel", RequestPageXml); - LibraryReportDataset.RunReportAndLoad(Report::"EXR Aged Acc Payable Excel", Variant, RequestPageXml); - - // [THEN] The Reporting Date matches the Posting Date of the vendor ledger entry - LibraryReportDataset.SetXmlNodeList('DataItem[@name="AgingData"]'); - Assert.AreEqual(1, LibraryReportDataset.RowCount(), 'One aging entry should be exported'); - LibraryReportDataset.GetNextRow(); - LibraryReportDataset.FindCurrentRowValue('ReportingDate', Variant); - ReportingDateText := Variant; - Evaluate(ReportingDate, ReportingDateText); - Assert.AreEqual(VendorLedgerEntry."Posting Date", ReportingDate, 'Reporting Date should match the Posting Date when aging by Posting Date'); - end; - local procedure CreateSampleBusinessUnits(HowMany: Integer) var BusinessUnit: Record "Business Unit"; @@ -900,109 +783,6 @@ codeunit 139544 "Trial Balance Excel Reports" GLEntry.Insert(); end; - local procedure InitializeAgingData() - var - Vendor: Record Vendor; - Customer: Record Customer; - VendorLedgerEntry: Record "Vendor Ledger Entry"; - CustLedgerEntry: Record "Cust. Ledger Entry"; - DetailedVendorLedgEntry: Record "Detailed Vendor Ledg. Entry"; - DetailedCustLedgEntry: Record "Detailed Cust. Ledg. Entry"; - begin - DetailedVendorLedgEntry.DeleteAll(); - DetailedCustLedgEntry.DeleteAll(); - VendorLedgerEntry.DeleteAll(); - CustLedgerEntry.DeleteAll(); - Vendor.DeleteAll(); - Customer.DeleteAll(); - end; - - local procedure CreateMinimalVendor(var Vendor: Record Vendor) - begin - Vendor.Init(); - Vendor."No." := CopyStr(Format(CreateGuid()), 1, MaxStrLen(Vendor."No.")); - Vendor.Name := Vendor."No."; - Vendor.Insert(); - end; - - local procedure CreateMinimalCustomer(var Customer: Record Customer) - begin - Customer.Init(); - Customer."No." := CopyStr(Format(CreateGuid()), 1, MaxStrLen(Customer."No.")); - Customer.Name := Customer."No."; - Customer.Insert(); - end; - - local procedure CreateVendorLedgerEntry(var VendorLedgerEntry: Record "Vendor Ledger Entry"; VendorNo: Code[20]; DocumentType: Enum "Gen. Journal Document Type") - var - DetailedVendorLedgEntry: Record "Detailed Vendor Ledg. Entry"; - EntryNo: Integer; - Amount: Decimal; - begin - if VendorLedgerEntry.FindLast() then; - EntryNo := VendorLedgerEntry."Entry No." + 1; - - VendorLedgerEntry.Init(); - VendorLedgerEntry."Entry No." := EntryNo; - VendorLedgerEntry."Vendor No." := VendorNo; - VendorLedgerEntry."Vendor Name" := VendorNo; - VendorLedgerEntry."Document Type" := DocumentType; - VendorLedgerEntry."Document No." := 'DOC' + Format(EntryNo); - VendorLedgerEntry."Posting Date" := WorkDate(); - VendorLedgerEntry."Document Date" := WorkDate(); - VendorLedgerEntry."Due Date" := WorkDate() + 30; - VendorLedgerEntry.Open := true; - VendorLedgerEntry.Insert(); - - // Create detailed vendor ledger entry for remaining amount - Amount := -LibraryRandom.RandDec(1000, 2); - if DetailedVendorLedgEntry.FindLast() then; - DetailedVendorLedgEntry.Init(); - DetailedVendorLedgEntry."Entry No." := DetailedVendorLedgEntry."Entry No." + 1; - DetailedVendorLedgEntry."Vendor Ledger Entry No." := VendorLedgerEntry."Entry No."; - DetailedVendorLedgEntry."Vendor No." := VendorNo; - DetailedVendorLedgEntry."Posting Date" := WorkDate(); - DetailedVendorLedgEntry."Entry Type" := DetailedVendorLedgEntry."Entry Type"::"Initial Entry"; - DetailedVendorLedgEntry.Amount := Amount; - DetailedVendorLedgEntry."Amount (LCY)" := Amount; - DetailedVendorLedgEntry.Insert(); - end; - - local procedure CreateCustLedgerEntry(var CustLedgerEntry: Record "Cust. Ledger Entry"; CustomerNo: Code[20]; DocumentType: Enum "Gen. Journal Document Type") - var - DetailedCustLedgEntry: Record "Detailed Cust. Ledg. Entry"; - EntryNo: Integer; - Amount: Decimal; - begin - if CustLedgerEntry.FindLast() then; - EntryNo := CustLedgerEntry."Entry No." + 1; - - CustLedgerEntry.Init(); - CustLedgerEntry."Entry No." := EntryNo; - CustLedgerEntry."Customer No." := CustomerNo; - CustLedgerEntry."Customer Name" := CustomerNo; - CustLedgerEntry."Document Type" := DocumentType; - CustLedgerEntry."Document No." := 'DOC' + Format(EntryNo); - CustLedgerEntry."Posting Date" := WorkDate(); - CustLedgerEntry."Document Date" := WorkDate(); - CustLedgerEntry."Due Date" := WorkDate() + 30; - CustLedgerEntry.Open := true; - CustLedgerEntry.Insert(); - - // Create detailed customer ledger entry for remaining amount - Amount := LibraryRandom.RandDec(1000, 2); - if DetailedCustLedgEntry.FindLast() then; - DetailedCustLedgEntry.Init(); - DetailedCustLedgEntry."Entry No." := DetailedCustLedgEntry."Entry No." + 1; - DetailedCustLedgEntry."Cust. Ledger Entry No." := CustLedgerEntry."Entry No."; - DetailedCustLedgEntry."Customer No." := CustomerNo; - DetailedCustLedgEntry."Posting Date" := WorkDate(); - DetailedCustLedgEntry."Entry Type" := DetailedCustLedgEntry."Entry Type"::"Initial Entry"; - DetailedCustLedgEntry.Amount := Amount; - DetailedCustLedgEntry."Amount (LCY)" := Amount; - DetailedCustLedgEntry.Insert(); - end; - [RequestPageHandler] procedure EXRTrialBalanceExcelHandler(var EXRTrialBalanceExcel: TestRequestPage "EXR Trial Balance Excel") begin @@ -1032,28 +812,6 @@ codeunit 139544 "Trial Balance Excel Reports" EXRConsolidatedTrialBalance.OK().Invoke(); end; - [RequestPageHandler] - procedure EXRAgedAccPayableExcelHandler(var EXRAgedAccPayableExcel: TestRequestPage "EXR Aged Acc Payable Excel") - begin - EXRAgedAccPayableExcel.AgedAsOfOption.SetValue(WorkDate()); - EXRAgedAccPayableExcel.OK().Invoke(); - end; - - [RequestPageHandler] - procedure EXRAgedAccountsRecExcelHandler(var EXRAgedAccountsRecExcel: TestRequestPage "EXR Aged Accounts Rec Excel") - begin - EXRAgedAccountsRecExcel.AgedAsOfOption.SetValue(WorkDate()); - EXRAgedAccountsRecExcel.OK().Invoke(); - end; - - [RequestPageHandler] - procedure EXRAgedAccPayablePostingDateHandler(var EXRAgedAccPayableExcel: TestRequestPage "EXR Aged Acc Payable Excel") - begin - EXRAgedAccPayableExcel.AgedAsOfOption.SetValue(WorkDate()); - EXRAgedAccPayableExcel.AgingbyOption.SetValue('Posting Date'); - EXRAgedAccPayableExcel.OK().Invoke(); - end; - #if not CLEAN27 #pragma warning disable AL0432 [EventSubscriber(ObjectType::Codeunit, Codeunit::"Trial Balance", OnIsPerformantTrialBalanceFeatureActive, '', false, false)] From c0c29c61937c2b7215b7137e495db41e103c0a45 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joshua=20Mart=C3=ADnez=20Pineda?= Date: Wed, 3 Jun 2026 08:29:47 +0200 Subject: [PATCH 2/5] Repopulate CurrencyCodeDisplayCode to satisfy analyzer CurrencyCodeDisplayCode is a protected variable and cannot be removed, so assign AgingData."Currency Code" to it after InsertAgingData. Co-Authored-By: Claude Opus 4.7 (1M context) --- .../App/src/Financials/EXRAgedAccPayableExcel.Report.al | 1 + .../App/src/Financials/EXRAgedAccountsRecExcel.Report.al | 1 + 2 files changed, 2 insertions(+) diff --git a/src/Apps/W1/ExcelReports/App/src/Financials/EXRAgedAccPayableExcel.Report.al b/src/Apps/W1/ExcelReports/App/src/Financials/EXRAgedAccPayableExcel.Report.al index 700e0f66b9..7dc8662512 100644 --- a/src/Apps/W1/ExcelReports/App/src/Financials/EXRAgedAccPayableExcel.Report.al +++ b/src/Apps/W1/ExcelReports/App/src/Financials/EXRAgedAccPayableExcel.Report.al @@ -127,6 +127,7 @@ report 4403 "EXR Aged Acc Payable Excel" Clear(AgingData); AgingData.DeleteAll(); InsertAgingData(VendorAgingData); + CurrencyCodeDisplayCode := AgingData."Currency Code"; end; } diff --git a/src/Apps/W1/ExcelReports/App/src/Financials/EXRAgedAccountsRecExcel.Report.al b/src/Apps/W1/ExcelReports/App/src/Financials/EXRAgedAccountsRecExcel.Report.al index 77b06f5274..e07ca9a845 100644 --- a/src/Apps/W1/ExcelReports/App/src/Financials/EXRAgedAccountsRecExcel.Report.al +++ b/src/Apps/W1/ExcelReports/App/src/Financials/EXRAgedAccountsRecExcel.Report.al @@ -126,6 +126,7 @@ report 4402 "EXR Aged Accounts Rec Excel" Clear(AgingData); AgingData.DeleteAll(); InsertAgingData(CustomerAgingData); + CurrencyCodeDisplayCode := AgingData."Currency Code"; end; } From 3ca6ec714d5c3befe49077a3b69ee0641c857cae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joshua=20Mart=C3=ADnez=20Pineda?= Date: Wed, 3 Jun 2026 09:16:31 +0200 Subject: [PATCH 3/5] Use codeunit ID 139550 to avoid conflict --- src/Apps/W1/ExcelReports/Test/app.json | 4 ++++ .../Test/src/AgedAccountsExcelReports.Codeunit.al | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/Apps/W1/ExcelReports/Test/app.json b/src/Apps/W1/ExcelReports/Test/app.json index 8b3a76d68a..9b2f9a60f3 100644 --- a/src/Apps/W1/ExcelReports/Test/app.json +++ b/src/Apps/W1/ExcelReports/Test/app.json @@ -38,6 +38,10 @@ { "from": 139543, "to": 139547 + }, + { + "from": 139550, + "to": 139550 } ], "resourceExposurePolicy": { diff --git a/src/Apps/W1/ExcelReports/Test/src/AgedAccountsExcelReports.Codeunit.al b/src/Apps/W1/ExcelReports/Test/src/AgedAccountsExcelReports.Codeunit.al index aceb7f1645..5555bfa709 100644 --- a/src/Apps/W1/ExcelReports/Test/src/AgedAccountsExcelReports.Codeunit.al +++ b/src/Apps/W1/ExcelReports/Test/src/AgedAccountsExcelReports.Codeunit.al @@ -13,7 +13,7 @@ using Microsoft.Purchases.Vendor; using Microsoft.Sales.Customer; using Microsoft.Sales.Receivables; -codeunit 139547 "Aged Accounts Excel Reports" +codeunit 139550 "Aged Accounts Excel Reports" { Subtype = Test; RequiredTestIsolation = Disabled; From 1445263929ff8e1b613a3efdb5c8a503ff29e046 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joshua=20Mart=C3=ADnez=20Pineda?= Date: Wed, 3 Jun 2026 13:29:40 +0200 Subject: [PATCH 4/5] Remove unused using directive to satisfy AL0792 --- .../ExcelReports/Test/src/AgedAccountsExcelReports.Codeunit.al | 1 - 1 file changed, 1 deletion(-) diff --git a/src/Apps/W1/ExcelReports/Test/src/AgedAccountsExcelReports.Codeunit.al b/src/Apps/W1/ExcelReports/Test/src/AgedAccountsExcelReports.Codeunit.al index 5555bfa709..2a0722aedc 100644 --- a/src/Apps/W1/ExcelReports/Test/src/AgedAccountsExcelReports.Codeunit.al +++ b/src/Apps/W1/ExcelReports/Test/src/AgedAccountsExcelReports.Codeunit.al @@ -6,7 +6,6 @@ namespace Microsoft.Finance.ExcelReports.Test; using Microsoft.Finance.ExcelReports; -using Microsoft.Finance.GeneralLedger.Journal; using Microsoft.Finance.GeneralLedger.Setup; using Microsoft.Purchases.Payables; using Microsoft.Purchases.Vendor; From a641253112429e202992456b2d2a1b2fd17ae2de Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joshua=20Mart=C3=ADnez=20Pineda?= Date: Thu, 4 Jun 2026 15:35:49 +0200 Subject: [PATCH 5/5] gate failures --- src/Apps/W1/ExcelReports/Test/app.json | 4 ++-- .../Test/src/AgedAccountsExcelReports.Codeunit.al | 3 ++- .../Test/src/TrialBalanceExcelReports.Codeunit.al | 1 - 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Apps/W1/ExcelReports/Test/app.json b/src/Apps/W1/ExcelReports/Test/app.json index 9b2f9a60f3..4a537eb680 100644 --- a/src/Apps/W1/ExcelReports/Test/app.json +++ b/src/Apps/W1/ExcelReports/Test/app.json @@ -40,8 +40,8 @@ "to": 139547 }, { - "from": 139550, - "to": 139550 + "from": 139555, + "to": 139555 } ], "resourceExposurePolicy": { diff --git a/src/Apps/W1/ExcelReports/Test/src/AgedAccountsExcelReports.Codeunit.al b/src/Apps/W1/ExcelReports/Test/src/AgedAccountsExcelReports.Codeunit.al index 2a0722aedc..6442d2d2a8 100644 --- a/src/Apps/W1/ExcelReports/Test/src/AgedAccountsExcelReports.Codeunit.al +++ b/src/Apps/W1/ExcelReports/Test/src/AgedAccountsExcelReports.Codeunit.al @@ -6,13 +6,14 @@ namespace Microsoft.Finance.ExcelReports.Test; using Microsoft.Finance.ExcelReports; +using Microsoft.Finance.GeneralLedger.Journal; using Microsoft.Finance.GeneralLedger.Setup; using Microsoft.Purchases.Payables; using Microsoft.Purchases.Vendor; using Microsoft.Sales.Customer; using Microsoft.Sales.Receivables; -codeunit 139550 "Aged Accounts Excel Reports" +codeunit 139555 "Aged Accounts Excel Reports" { Subtype = Test; RequiredTestIsolation = Disabled; diff --git a/src/Apps/W1/ExcelReports/Test/src/TrialBalanceExcelReports.Codeunit.al b/src/Apps/W1/ExcelReports/Test/src/TrialBalanceExcelReports.Codeunit.al index 9c97c0a32a..a802c622f0 100644 --- a/src/Apps/W1/ExcelReports/Test/src/TrialBalanceExcelReports.Codeunit.al +++ b/src/Apps/W1/ExcelReports/Test/src/TrialBalanceExcelReports.Codeunit.al @@ -10,7 +10,6 @@ using Microsoft.Finance.Dimension; using Microsoft.Finance.ExcelReports; using Microsoft.Finance.GeneralLedger.Account; using Microsoft.Finance.GeneralLedger.Budget; -using Microsoft.Finance.GeneralLedger.Journal; using Microsoft.Finance.GeneralLedger.Ledger; codeunit 139544 "Trial Balance Excel Reports"