Skip to content

Conversation

@Groenbech96
Copy link
Contributor

@Groenbech96 Groenbech96 commented Jan 23, 2026

Summary

Work Item(s)

Fixes AB#563709

@Groenbech96 Groenbech96 requested review from a team as code owners January 23, 2026 16:31
@github-actions github-actions bot added the AL: Apps (W1) Add-on apps for W1 label Jan 23, 2026
@github-actions github-actions bot added this to the Version 28.0 milestone Jan 23, 2026
mynjj
mynjj previously approved these changes Jan 26, 2026
aholstrup1
aholstrup1 previously approved these changes Jan 26, 2026
Copilot AI and others added 3 commits January 27, 2026 13:41
#6311)

The PEPPOL BIS Billing test's `Initialize()` method called
`CompanyInfo.Get()` without ensuring the record exists, causing test
failures in clean database scenarios.

## Changes

Added existence check before accessing Company Information record:

```al
// Before
CompanyInfo.Get();

// After
if not CompanyInfo.Get() then begin
    CompanyInfo.Init();
    CompanyInfo.Insert();
end;
```

This follows standard AL pattern for setup records and ensures tests run
regardless of initial database state.

<!-- START COPILOT CODING AGENT SUFFIX -->



<!-- START COPILOT ORIGINAL PROMPT -->



<details>

<summary>Original prompt</summary>

> Pull Request: #6267
> 
> There is an issue currently in they no company information record
exist.
> 
> In the initialise method in the test, ensure it exists, and set some
default values.


</details>



<!-- START COPILOT CODING AGENT TIPS -->
---

💬 We'd love your input! Share your thoughts on Copilot coding agent in
our [2 minute survey](https://gh.io/copilot-coding-agent-survey).

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: Groenbech96 <17690329+Groenbech96@users.noreply.github.com>
Removed multiple test folder entries and added a specific test folder for PEPPOL.
@github-actions github-actions bot added the Build: scripts & configs Build scripts and configuration files label Jan 27, 2026
@github-actions github-actions bot removed the Build: scripts & configs Build scripts and configuration files label Jan 28, 2026
@Groenbech96
Copy link
Contributor Author

@copilot Fix
Testfunction ExportXml_PEPPOL_BIS3_ServiceInvoice Failure (0.083 seconds)
Error:
Serv. Invoice Template Name must have a value in Service Mgt. Setup: Primary Key=. It cannot be zero or empty.
Call Stack:
Service Header(Table 5900).TestNoSeries line 25 - Base Application by Microsoft version 28.0.45184.0
Service Header(Table 5900).InitInsert line 10 - Base Application by Microsoft version 28.0.45184.0
Service Header(Table 5900).OnInsert(Trigger) line 9 - Base Application by Microsoft version 28.0.45184.0
Library - Service(CodeUnit 131902).CreateServiceHeader line 7 - Application Test Library by Microsoft version 28.0.45184.0
PEPPOL BIS BillingTests(CodeUnit 139236).CreatePostServiceDoc line 7 - Tests-PEPPOL by Microsoft version 28.0.2147483647.69951
PEPPOL BIS BillingTests(CodeUnit 139236).CreatePostServiceInvoice line 4 - Tests-PEPPOL by Microsoft version 28.0.2147483647.69951
PEPPOL BIS BillingTests(CodeUnit 139236).ExportXml_PEPPOL_BIS3_ServiceInvoice line 11 - Tests-PEPPOL by Microsoft version 28.0.2147483647.69951
Test Runner - Mgt(CodeUnit 130454).RunTests line 26 - Test Runner by Microsoft version 28.0.2147483647.69951
Test Runner - Isol. Codeunit(CodeUnit 130450).OnRun(Trigger) line 4 - Test Runner by Microsoft version 28.0.2147483647.69951
Test Suite Mgt.(CodeUnit 130456).RunTests line 2 - Test Runner by Microsoft version 28.0.2147483647.69951
Test Suite Mgt.(CodeUnit 130456).RunSelectedTests line 35 - Test Runner by Microsoft version 28.0.2147483647.69951
Test Suite Mgt.(CodeUnit 130456).RunNextTest line 20 - Test Runner by Microsoft version 28.0.2147483647.69951
Command Line Test Tool(Page 130455).RunNextTest - OnAction(Trigger) line 7 - Test Runner by Microsoft version 28.0.2147483647.69951
Error: Function ExportXml_PEPPOL_BIS3_ServiceCrMemo Serv. Cr. Memo Template Name must have a value in Service Mgt. Setup: Primary Key=. It cannot be zero or empty.
Testfunction ExportXml_PEPPOL_BIS3_ServiceCrMemo Failure (0.077 seconds)
Error:
Serv. Cr. Memo Template Name must have a value in Service Mgt. Setup: Primary Key=. It cannot be zero or empty.
Call Stack:
Service Header(Table 5900).TestNoSeries line 31 - Base Application by Microsoft version 28.0.45184.0
Service Header(Table 5900).InitInsert line 10 - Base Application by Microsoft version 28.0.45184.0
Service Header(Table 5900).OnInsert(Trigger) line 9 - Base Application by Microsoft version 28.0.45184.0
Library - Service(CodeUnit 131902).CreateServiceHeader line 7 - Application Test Library by Microsoft version 28.0.45184.0
PEPPOL BIS BillingTests(CodeUnit 139236).CreatePostServiceDoc line 7 - Tests-PEPPOL by Microsoft version 28.0.2147483647.69951
PEPPOL BIS BillingTests(CodeUnit 139236).CreatePostServiceCrMemo line 4 - Tests-PEPPOL by Microsoft version 28.0.2147483647.69951
PEPPOL BIS BillingTests(CodeUnit 139236).ExportXml_PEPPOL_BIS3_ServiceCrMemo line 11 - Tests-PEPPOL by Microsoft version 28.0.2147483647.69951
Test Runner - Mgt(CodeUnit 130454).RunTests line 26 - Test Runner by Microsoft version 28.0.2147483647.69951
Test Runner - Isol. Codeunit(CodeUnit 130450).OnRun(Trigger) line 4 - Test Runner by Microsoft version 28.0.2147483647.69951
Test Suite Mgt.(CodeUnit 130456).RunTests line 2 - Test Runner by Microsoft version 28.0.2147483647.69951
Test Suite Mgt.(CodeUnit 130456).RunSelectedTests line 35 - Test Runner by Microsoft version 28.0.2147483647.69951
Test Suite Mgt.(CodeUnit 130456).RunNextTest line 20 - Test Runner by Microsoft version 28.0.2147483647.69951
Command Line Test Tool(Page 130455).RunNextTest - OnAction(Trigger) line 7 - Test Runner by Microsoft version 28.0.2147483647.69951
Testfunction ExportXml_PEPPOL_BIS3_SalesInvoice_BlankFields Success (0.237 seconds)
Testfunction ExportXml_PEPPOL_BIS3_SalesCreditMemo_BlankFields Success (0.23 seconds)
Testfunction ExportXml_PEPPOL_BIS3_SalesInvoiceFCY Success (0.28 seconds)
Testfunction ExportXml_PEPPOL_BIS3_SalesCreditMemoFCY Success (0.243 seconds)
Error: Function ExportXml_PEPPOL_BIS3_ServiceInvoiceFCY Serv. Invoice Template Name must have a value in Service Mgt. Setup: Primary Key=. It cannot be zero or empty.
Testfunction ExportXml_PEPPOL_BIS3_ServiceInvoiceFCY Failure (0.086 seconds)
Error:
Serv. Invoice Template Name must have a value in Service Mgt. Setup: Primary Key=. It cannot be zero or empty.
Call Stack:
Service Header(Table 5900).TestNoSeries line 25 - Base Application by Microsoft version 28.0.45184.0
Service Header(Table 5900).InitInsert line 10 - Base Application by Microsoft version 28.0.45184.0
Service Header(Table 5900).OnInsert(Trigger) line 9 - Base Application by Microsoft version 28.0.45184.0
Library - Service(CodeUnit 131902).CreateServiceHeader line 7 - Application Test Library by Microsoft version 28.0.45184.0
PEPPOL BIS BillingTests(CodeUnit 139236).CreatePostServiceDoc line 7 - Tests-PEPPOL by Microsoft version 28.0.2147483647.69951
PEPPOL BIS BillingTests(CodeUnit 139236).CreatePostServiceInvoice line 4 - Tests-PEPPOL by Microsoft version 28.0.2147483647.69951
PEPPOL BIS BillingTests(CodeUnit 139236).ExportXml_PEPPOL_BIS3_ServiceInvoiceFCY line 11 - Tests-PEPPOL by Microsoft version 28.0.2147483647.69951
Test Runner - Mgt(CodeUnit 130454).RunTests line 26 - Test Runner by Microsoft version 28.0.2147483647.69951
Test Runner - Isol. Codeunit(CodeUnit 130450).OnRun(Trigger) line 4 - Test Runner by Microsoft version 28.0.2147483647.69951
Test Suite Mgt.(CodeUnit 130456).RunTests line 2 - Test Runner by Microsoft version 28.0.2147483647.69951
Test Suite Mgt.(CodeUnit 130456).RunSelectedTests line 35 - Test Runner by Microsoft version 28.0.2147483647.69951
Test Suite Mgt.(CodeUnit 130456).RunNextTest line 20 - Test Runner by Microsoft version 28.0.2147483647.69951
Command Line Test Tool(Page 130455).RunNextTest - OnAction(Trigger) line 7 - Test Runner by Microsoft version 28.0.2147483647.69951
Error: Function ExportXml_PEPPOL_BIS3_ServiceCrMemoFCY Serv. Cr. Memo Template Name must have a value in Service Mgt. Setup: Primary Key=. It cannot be zero or empty.
Testfunction ExportXml_PEPPOL_BIS3_ServiceCrMemoFCY Failure (0.083 seconds)
Error:
Serv. Cr. Memo Template Name must have a value in Service Mgt. Setup: Primary Key=. It cannot be zero or empty.
Call Stack:
Service Header(Table 5900).TestNoSeries line 31 - Base Application by Microsoft version 28.0.45184.0
Service Header(Table 5900).InitInsert line 10 - Base Application by Microsoft version 28.0.45184.0
Service Header(Table 5900).OnInsert(Trigger) line 9 - Base Application by Microsoft version 28.0.45184.0
Library - Service(CodeUnit 131902).CreateServiceHeader line 7 - Application Test Library by Microsoft version 28.0.45184.0
PEPPOL BIS BillingTests(CodeUnit 139236).CreatePostServiceDoc line 7 - Tests-PEPPOL by Microsoft version 28.0.2147483647.69951
PEPPOL BIS BillingTests(CodeUnit 139236).CreatePostServiceCrMemo line 4 - Tests-PEPPOL by Microsoft version 28.0.2147483647.69951
PEPPOL BIS BillingTests(CodeUnit 139236).ExportXml_PEPPOL_BIS3_ServiceCrMemoFCY line 11 - Tests-PEPPOL by Microsoft version 28.0.2147483647.69951
Test Runner - Mgt(CodeUnit 130454).RunTests line 26 - Test Runner by Microsoft version 28.0.2147483647.69951
Test Runner - Isol. Codeunit(CodeUnit 130450).OnRun(Trigger) line 4 - Test Runner by Microsoft version 28.0.2147483647.69951
Test Suite Mgt.(CodeUnit 130456).RunTests line 2 - Test Runner by Microsoft version 28.0.2147483647.69951
Test Suite Mgt.(CodeUnit 130456).RunSelectedTests line 35 - Test Runner by Microsoft version 28.0.2147483647.69951
Test Suite Mgt.(CodeUnit 130456).RunNextTest line 20 - Test Runner by Microsoft version 28.0.2147483647.69951
Command Line Test Tool(Page 130455).RunNextTest - OnAction(Trigger) line 7 - Test Runner by Microsoft version 28.0.2147483647.69951
Testfunction ExportXml_SalesInvoiceLCY_InvRounding_Positive Success (0.353 seconds)
Testfunction ExportXml_SalesInvoiceLCY_InvRounding_Negative Success (0.263 seconds)
Testfunction ExportXml_SalesInvoiceLCY_InvRounding_NegativeTwoDiffVAT Success (0.407 seconds)
Testfunction ExportXml_SalesCrMemoLCY_InvRounding_Positive Success (0.383 seconds)
Error: Function ExportXml_ServiceInvoiceLCY_InvRounding_Positive Serv. Invoice Template Name must have a value in Service Mgt. Setup: Primary Key=. It cannot be zero or empty.
Testfunction ExportXml_ServiceInvoiceLCY_InvRounding_Positive Failure (0.094 seconds)
Error:
Serv. Invoice Template Name must have a value in Service Mgt. Setup: Primary Key=. It cannot be zero or empty.
Call Stack:
Service Header(Table 5900).TestNoSeries line 25 - Base Application by Microsoft version 28.0.45184.0
Service Header(Table 5900).InitInsert line 10 - Base Application by Microsoft version 28.0.45184.0
Service Header(Table 5900).OnInsert(Trigger) line 9 - Base Application by Microsoft version 28.0.45184.0
Library - Service(CodeUnit 131902).CreateServiceHeader line 7 - Application Test Library by Microsoft version 28.0.45184.0
PEPPOL BIS BillingTests(CodeUnit 139236).ExportXml_ServiceInvoiceLCY_InvRounding_Positive line 18 - Tests-PEPPOL by Microsoft version 28.0.2147483647.69951
Test Runner - Mgt(CodeUnit 130454).RunTests line 26 - Test Runner by Microsoft version 28.0.2147483647.69951
Test Runner - Isol. Codeunit(CodeUnit 130450).OnRun(Trigger) line 4 - Test Runner by Microsoft version 28.0.2147483647.69951
Test Suite Mgt.(CodeUnit 130456).RunTests line 2 - Test Runner by Microsoft version 28.0.2147483647.69951
Test Suite Mgt.(CodeUnit 130456).RunSelectedTests line 35 - Test Runner by Microsoft version 28.0.2147483647.69951
Test Suite Mgt.(CodeUnit 130456).RunNextTest line 20 - Test Runner by Microsoft version 28.0.2147483647.69951
Command Line Test Tool(Page 130455).RunNextTest - OnAction(Trigger) line 7 - Test Runner by Microsoft version 28.0.2147483647.69951
Testfunction ExportXmlToVerifyFileName Success (0.263 seconds)
Testfunction GetAccountingSupplierPartyLegalEntity_VATRegNo_DK Success (0.037 seconds)
Testfunction GetAccountingCustomerPartyLegalEntity_VATRegNo_DK Success (0.043 seconds)
Testfunction ExportXml_PEPPOL_BIS3_SalesInvoiceDocumentAttachment Success (0.253 seconds)
Testfunction ExportXml_PEPPOL_BIS3_SalesInvoice_CheckTaxTotalWhenUnitPriceZero Success (0.343 seconds)

Copy link
Contributor

Copilot AI commented Jan 28, 2026

@Groenbech96 I've opened a new pull request, #6354, to work on those changes. Once the pull request is ready, I'll request review from you.

@Groenbech96
Copy link
Contributor Author

@copilot Fix

Error: Function ExportXml_SalesInvoiceLCY_InvRounding_Positive The VAT Posting Setup does not exist. Identification fields and values: VAT Bus. Posting Group='DOMESTIC',VAT Prod. Posting Group=''
Testfunction ExportXml_SalesInvoiceLCY_InvRounding_Positive Failure (0.36 seconds)
Error:
The VAT Posting Setup does not exist. Identification fields and values: VAT Bus. Posting Group='DOMESTIC',VAT Prod. Posting Group=''
Call Stack:
Sales Line(Table 37).VAT Prod. Posting Group - OnValidate(Trigger) line 15 - Base Application by Microsoft version 28.0.45184.0
Sales Line(Table 37).ValidateVATProdPostingGroup line 9 - Base Application by Microsoft version 28.0.45184.0
Sales Line(Table 37).No. - OnValidate(Trigger) line 115 - Base Application by Microsoft version 28.0.45184.0
Sales-Post(CodeUnit 80).InvoiceRounding line 34 - Base Application by Microsoft version 28.0.45184.0
Sales-Post(CodeUnit 80).UpdateInvoiceRounding line 8 - Base Application by Microsoft version 28.0.45184.0
Sales-Post(CodeUnit 80).ProcessPostingLines line 59 - Base Application by Microsoft version 28.0.45184.0
Sales-Post(CodeUnit 80).ProcessPostingLinesCommitBehaviorIgnore line 5 - Base Application by Microsoft version 28.0.45184.0
Sales-Post(CodeUnit 80).ProcessPosting line 11 - Base Application by Microsoft version 28.0.45184.0
Sales-Post(CodeUnit 80).RunWithCheck line 59 - Base Application by Microsoft version 28.0.45184.0
Sales-Post(CodeUnit 80).OnRun(Trigger) line 2 - Base Application by Microsoft version 28.0.45184.0
Library - Sales(CodeUnit 130509).DoPostSalesDocument line 64 - Application Test Library by Microsoft version 28.0.45184.0
Library - Sales(CodeUnit 130509).PostSalesDocument line 2 - Application Test Library by Microsoft version 28.0.45184.0
PEPPOL BIS BillingTests(CodeUnit 139236).ExportXml_SalesInvoiceLCY_InvRounding_Positive line 24 - Tests-PEPPOL by Microsoft version 28.0.2147483647.69951
Test Runner - Mgt(CodeUnit 130454).RunTests line 26 - Test Runner by Microsoft version 28.0.2147483647.69951
Test Runner - Isol. Codeunit(CodeUnit 130450).OnRun(Trigger) line 4 - Test Runner by Microsoft version 28.0.2147483647.69951
Test Suite Mgt.(CodeUnit 130456).RunTests line 2 - Test Runner by Microsoft version 28.0.2147483647.69951
Test Suite Mgt.(CodeUnit 130456).RunSelectedTests line 35 - Test Runner by Microsoft version 28.0.2147483647.69951
Test Suite Mgt.(CodeUnit 130456).RunNextTest line 20 - Test Runner by Microsoft version 28.0.2147483647.69951
Command Line Test Tool(Page 130455).RunNextTest - OnAction(Trigger) line 7 - Test Runner by Microsoft version 28.0.2147483647.69951
Error: Function ExportXml_SalesInvoiceLCY_InvRounding_Negative The VAT Posting Setup does not exist. Identification fields and values: VAT Bus. Posting Group='DOMESTIC',VAT Prod. Posting Group=''
Testfunction ExportXml_SalesInvoiceLCY_InvRounding_Negative Failure (0.257 seconds)
Error:
The VAT Posting Setup does not exist. Identification fields and values: VAT Bus. Posting Group='DOMESTIC',VAT Prod. Posting Group=''
Call Stack:
Sales Line(Table 37).VAT Prod. Posting Group - OnValidate(Trigger) line 15 - Base Application by Microsoft version 28.0.45184.0
Sales Line(Table 37).ValidateVATProdPostingGroup line 9 - Base Application by Microsoft version 28.0.45184.0
Sales Line(Table 37).No. - OnValidate(Trigger) line 115 - Base Application by Microsoft version 28.0.45184.0
Sales-Post(CodeUnit 80).InvoiceRounding line 34 - Base Application by Microsoft version 28.0.45184.0
Sales-Post(CodeUnit 80).UpdateInvoiceRounding line 8 - Base Application by Microsoft version 28.0.45184.0
Sales-Post(CodeUnit 80).ProcessPostingLines line 59 - Base Application by Microsoft version 28.0.45184.0
Sales-Post(CodeUnit 80).ProcessPostingLinesCommitBehaviorIgnore line 5 - Base Application by Microsoft version 28.0.45184.0
Sales-Post(CodeUnit 80).ProcessPosting line 11 - Base Application by Microsoft version 28.0.45184.0
Sales-Post(CodeUnit 80).RunWithCheck line 59 - Base Application by Microsoft version 28.0.45184.0
Sales-Post(CodeUnit 80).OnRun(Trigger) line 2 - Base Application by Microsoft version 28.0.45184.0
Library - Sales(CodeUnit 130509).DoPostSalesDocument line 64 - Application Test Library by Microsoft version 28.0.45184.0
Library - Sales(CodeUnit 130509).PostSalesDocument line 2 - Application Test Library by Microsoft version 28.0.45184.0
PEPPOL BIS BillingTests(CodeUnit 139236).ExportXml_SalesInvoiceLCY_InvRounding_Negative line 22 - Tests-PEPPOL by Microsoft version 28.0.2147483647.69951
Test Runner - Mgt(CodeUnit 130454).RunTests line 26 - Test Runner by Microsoft version 28.0.2147483647.69951
Test Runner - Isol. Codeunit(CodeUnit 130450).OnRun(Trigger) line 4 - Test Runner by Microsoft version 28.0.2147483647.69951
Test Suite Mgt.(CodeUnit 130456).RunTests line 2 - Test Runner by Microsoft version 28.0.2147483647.69951
Test Suite Mgt.(CodeUnit 130456).RunSelectedTests line 35 - Test Runner by Microsoft version 28.0.2147483647.69951
Test Suite Mgt.(CodeUnit 130456).RunNextTest line 20 - Test Runner by Microsoft version 28.0.2147483647.69951
Command Line Test Tool(Page 130455).RunNextTest - OnAction(Trigger) line 7 - Test Runner by Microsoft version 28.0.2147483647.69951
Error: Function ExportXml_SalesInvoiceLCY_InvRounding_NegativeTwoDiffVAT The VAT Posting Setup does not exist. Identification fields and values: VAT Bus. Posting Group='DOMESTIC',VAT Prod. Posting Group=''
Testfunction ExportXml_SalesInvoiceLCY_InvRounding_NegativeTwoDiffVAT Failure (0.284 seconds)
Error:
The VAT Posting Setup does not exist. Identification fields and values: VAT Bus. Posting Group='DOMESTIC',VAT Prod. Posting Group=''
Call Stack:
Sales Line(Table 37).VAT Prod. Posting Group - OnValidate(Trigger) line 15 - Base Application by Microsoft version 28.0.45184.0
Sales Line(Table 37).ValidateVATProdPostingGroup line 9 - Base Application by Microsoft version 28.0.45184.0
Sales Line(Table 37).No. - OnValidate(Trigger) line 115 - Base Application by Microsoft version 28.0.45184.0
Sales-Post(CodeUnit 80).InvoiceRounding line 34 - Base Application by Microsoft version 28.0.45184.0
Sales-Post(CodeUnit 80).UpdateInvoiceRounding line 8 - Base Application by Microsoft version 28.0.45184.0
Sales-Post(CodeUnit 80).ProcessPostingLines line 59 - Base Application by Microsoft version 28.0.45184.0
Sales-Post(CodeUnit 80).ProcessPostingLinesCommitBehaviorIgnore line 5 - Base Application by Microsoft version 28.0.45184.0
Sales-Post(CodeUnit 80).ProcessPosting line 11 - Base Application by Microsoft version 28.0.45184.0
Sales-Post(CodeUnit 80).RunWithCheck line 59 - Base Application by Microsoft version 28.0.45184.0
Sales-Post(CodeUnit 80).OnRun(Trigger) line 2 - Base Application by Microsoft version 28.0.45184.0
Library - Sales(CodeUnit 130509).DoPostSalesDocument line 64 - Application Test Library by Microsoft version 28.0.45184.0
Library - Sales(CodeUnit 130509).PostSalesDocument line 2 - Application Test Library by Microsoft version 28.0.45184.0
PEPPOL BIS BillingTests(CodeUnit 139236).ExportXml_SalesInvoiceLCY_InvRounding_NegativeTwoDiffVAT line 25 - Tests-PEPPOL by Microsoft version 28.0.2147483647.69951
Test Runner - Mgt(CodeUnit 130454).RunTests line 26 - Test Runner by Microsoft version 28.0.2147483647.69951
Test Runner - Isol. Codeunit(CodeUnit 130450).OnRun(Trigger) line 4 - Test Runner by Microsoft version 28.0.2147483647.69951
Test Suite Mgt.(CodeUnit 130456).RunTests line 2 - Test Runner by Microsoft version 28.0.2147483647.69951
Test Suite Mgt.(CodeUnit 130456).RunSelectedTests line 35 - Test Runner by Microsoft version 28.0.2147483647.69951
Test Suite Mgt.(CodeUnit 130456).RunNextTest line 20 - Test Runner by Microsoft version 28.0.2147483647.69951
Command Line Test Tool(Page 130455).RunNextTest - OnAction(Trigger) line 7 - Test Runner by Microsoft version 28.0.2147483647.69951
Error: Function ExportXml_SalesCrMemoLCY_InvRounding_Positive The VAT Posting Setup does not exist. Identification fields and values: VAT Bus. Posting Group='DOMESTIC',VAT Prod. Posting Group=''
Testfunction ExportXml_SalesCrMemoLCY_InvRounding_Positive Failure (0.347 seconds)
Error:
The VAT Posting Setup does not exist. Identification fields and values: VAT Bus. Posting Group='DOMESTIC',VAT Prod. Posting Group=''
Call Stack:
Sales Line(Table 37).VAT Prod. Posting Group - OnValidate(Trigger) line 15 - Base Application by Microsoft version 28.0.45184.0
Sales Line(Table 37).ValidateVATProdPostingGroup line 9 - Base Application by Microsoft version 28.0.45184.0
Sales Line(Table 37).No. - OnValidate(Trigger) line 115 - Base Application by Microsoft version 28.0.45184.0
Sales-Post(CodeUnit 80).InvoiceRounding line 34 - Base Application by Microsoft version 28.0.45184.0
Sales-Post(CodeUnit 80).UpdateInvoiceRounding line 8 - Base Application by Microsoft version 28.0.45184.0
Sales-Post(CodeUnit 80).ProcessPostingLines line 59 - Base Application by Microsoft version 28.0.45184.0
Sales-Post(CodeUnit 80).ProcessPostingLinesCommitBehaviorIgnore line 5 - Base Application by Microsoft version 28.0.45184.0
Sales-Post(CodeUnit 80).ProcessPosting line 11 - Base Application by Microsoft version 28.0.45184.0
Sales-Post(CodeUnit 80).RunWithCheck line 59 - Base Application by Microsoft version 28.0.45184.0
Sales-Post(CodeUnit 80).OnRun(Trigger) line 2 - Base Application by Microsoft version 28.0.45184.0
Library - Sales(CodeUnit 130509).DoPostSalesDocument line 64 - Application Test Library by Microsoft version 28.0.45184.0
Library - Sales(CodeUnit 130509).PostSalesDocument line 2 - Application Test Library by Microsoft version 28.0.45184.0
PEPPOL BIS BillingTests(CodeUnit 139236).ExportXml_SalesCrMemoLCY_InvRounding_Positive line 23 - Tests-PEPPOL by Microsoft version 28.0.2147483647.69951
Test Runner - Mgt(CodeUnit 130454).RunTests line 26 - Test Runner by Microsoft version 28.0.2147483647.69951
Test Runner - Isol. Codeunit(CodeUnit 130450).OnRun(Trigger) line 4 - Test Runner by Microsoft version 28.0.2147483647.69951
Test Suite Mgt.(CodeUnit 130456).RunTests line 2 - Test Runner by Microsoft version 28.0.2147483647.69951
Test Suite Mgt.(CodeUnit 130456).RunSelectedTests line 35 - Test Runner by Microsoft version 28.0.2147483647.69951
Test Suite Mgt.(CodeUnit 130456).RunNextTest line 20 - Test Runner by Microsoft version 28.0.2147483647.69951
Command Line Test Tool(Page 130455).RunNextTest - OnAction(Trigger) line 7 - Test Runner by Microsoft version 28.0.2147483647.69951
Error: Function ExportXml_ServiceInvoiceLCY_InvRounding_Positive The VAT Posting Setup does not exist. Identification fields and values: VAT Bus. Posting Group='DOMESTIC',VAT Prod. Posting Group=''
Testfunction ExportXml_ServiceInvoiceLCY_InvRounding_Positive Failure (0.19 seconds)
Error:
The VAT Posting Setup does not exist. Identification fields and values: VAT Bus. Posting Group='DOMESTIC',VAT Prod. Posting Group=''
Call Stack:
Service Line(Table 5902).VAT Prod. Posting Group - OnValidate(Trigger) line 6 - Base Application by Microsoft version 28.0.45184.0
Service Line(Table 5902).No. - OnValidate(Trigger) line 71 - Base Application by Microsoft version 28.0.45184.0
Serv-Amounts Mgt.(CodeUnit 5986).InvoiceRounding line 35 - Base Application by Microsoft version 28.0.45184.0
Serv-Documents Mgt.(CodeUnit 5988).PostDocumentLines line 242 - Base Application by Microsoft version 28.0.45184.0
Service-Post(CodeUnit 5980).PostWithLines line 85 - Base Application by Microsoft version 28.0.45184.0
Library - Service(CodeUnit 131902).PostServiceOrder line 8 - Application Test Library by Microsoft version 28.0.45184.0
PEPPOL BIS BillingTests(CodeUnit 139236).ExportXml_ServiceInvoiceLCY_InvRounding_Positive line 26 - Tests-PEPPOL by Microsoft version 28.0.2147483647.69951
Test Runner - Mgt(CodeUnit 130454).RunTests line 26 - Test Runner by Microsoft version 28.0.2147483647.69951
Test Runner - Isol. Codeunit(CodeUnit 130450).OnRun(Trigger) line 4 - Test Runner by Microsoft version 28.0.2147483647.69951
Test Suite Mgt.(CodeUnit 130456).RunTests line 2 - Test Runner by Microsoft version 28.0.2147483647.69951
Test Suite Mgt.(CodeUnit 130456).RunSelectedTests line 35 - Test Runner by Microsoft version 28.0.2147483647.69951
Test Suite Mgt.(CodeUnit 130456).RunNextTest line 20 - Test Runner by Microsoft version 28.0.2147483647.69951
Command Line Test Tool(Page 130455).RunNextTest - OnAction(Trigger) line 7 - Test Runner by Microsoft version 28.0.2147483647.69951
Testfunction ExportXmlToVerifyFileName Success (0.346 seconds)
Testfunction GetAccountingSupplierPartyLegalEntity_VATRegNo_DK Success (0.01 seconds)
Testfunction GetAccountingCustomerPartyLegalEntity_VATRegNo_DK Success (0.04 seconds)
Testfunction ExportXml_PEPPOL_BIS3_SalesInvoiceDocumentAttachment Success (0.293 seconds)
Testfunction ExportXml_PEPPOL_BIS3_SalesInvoice_CheckTaxTotalWhenUnitPriceZero Success (0.37 seconds)

Copy link
Contributor

Copilot AI commented Jan 28, 2026

@Groenbech96 I've opened a new pull request, #6355, to work on those changes. Once the pull request is ready, I'll request review from you.

@Groenbech96
Copy link
Contributor Author

@copilot Fix
Testfunction ExportXml_PEPPOL_BIS3_SalesInvoice_CheckTaxTotalWhenUnitPriceZero Failure (0.167 seconds)
Error:
VAT Period does not exist for date 01/28/26.
Call Stack:
VAT Date Handler CZL(CodeUnit 11742).VATPeriodCZLCheck line 11 - Core Localization Pack for Czech by Microsoft version 28.0.45184.0
VAT Date Handler CZL(CodeUnit 11742).CheckVATDateCZL line 10 - Core Localization Pack for Czech by Microsoft version 28.0.45184.0
Sales Posting Handler CZL(CodeUnit 31038).CheckVatDateOnAfterCheckSalesDoc line 4 - Core Localization Pack for Czech by Microsoft version 28.0.45184.0
Sales-Post(CodeUnit 80).OnAfterCheckSalesDoc(Event) line 2 - Base Application by Microsoft version 28.0.45184.0
Sales-Post(CodeUnit 80).CheckSalesDocument line 80 - Base Application by Microsoft version 28.0.45184.0
Sales-Post(CodeUnit 80).CheckAndUpdate line 9 - Base Application by Microsoft version 28.0.45184.0
Sales-Post(CodeUnit 80).RunWithCheck line 57 - Base Application by Microsoft version 28.0.45184.0
Sales-Post(CodeUnit 80).OnRun(Trigger) line 2 - Base Application by Microsoft version 28.0.45184.0
Library - Sales(CodeUnit 130509).DoPostSalesDocument line 64 - Application Test Library by Microsoft version 28.0.45184.0
Library - Sales(CodeUnit 130509).PostSalesDocument line 2 - Application Test Library by Microsoft version 28.0.45184.0
PEPPOL BIS BillingTests(CodeUnit 139236).ExportXml_PEPPOL_BIS3_SalesInvoice_CheckTaxTotalWhenUnitPriceZero line 16 - Tests-PEPPOL by Microsoft version 28.0.2147483647.69951
Test Runner - Mgt(CodeUnit 130454).RunTests line 26 - Test Runner by Microsoft version 28.0.2147483647.69951
Test Runner - Isol. Codeunit(CodeUnit 130450).OnRun(Trigger) line 4 - Test Runner by Microsoft version 28.0.2147483647.69951
Test Suite Mgt.(CodeUnit 130456).RunTests line 2 - Test Runner by Microsoft version 28.0.2147483647.69951
Test Suite Mgt.(CodeUnit 130456).RunSelectedTests line 35 - Test Runner by Microsoft version 28.0.2147483647.69951
Test Suite Mgt.(CodeUnit 130456).RunNextTest line 20 - Test Runner by Microsoft version 28.0.2147483647.69951
Command Line Test Tool(Page 130455).RunNextTest - OnAction(Trigger) line 7 - Test Runner by Microsoft version 28.0.2147483647.69951

    By setting VAT reporting date to disabled in GLSetup inside the init function.

Copy link
Contributor

Copilot AI commented Jan 28, 2026

@Groenbech96 I've opened a new pull request, #6356, to work on those changes. Once the pull request is ready, I'll request review from you.

Copilot AI and others added 5 commits January 28, 2026 19:37
Test `ExportXml_PEPPOL_BIS3_SalesInvoice_CheckTaxTotalWhenUnitPriceZero`
failed when Czech localization validated VAT periods for test dates that
don't exist in the test environment.

**Changes**
- Disable VAT Reporting Date Usage in GL Setup during test
initialization to prevent localization-specific VAT period validation

```al
GLSetup.GetRecordOnce();
GLSetup."VAT Reporting Date Usage" := GLSetup."VAT Reporting Date Usage"::Disabled;
GLSetup.Modify(false);
```

This aligns with the existing pattern in
`PEPPOL30ManagementTests.Codeunit.al`.

<!-- START COPILOT CODING AGENT TIPS -->
---

💡 You can make Copilot smarter by setting up custom instructions,
customizing its development environment and configuring Model Context
Protocol (MCP) servers. Learn more [Copilot coding agent
tips](https://gh.io/copilot-coding-agent-tips) in the docs.

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: Groenbech96 <17690329+Groenbech96@users.noreply.github.com>
…#6354)

Service invoice and credit memo tests were failing because Service
Management Setup lacked required template names when creating Service
Headers.

## Changes

- **Added `SetupServiceMgtSetupTemplates()` helper**: Configures Service
Mgt. Setup with Gen. Journal Template names for both invoice and credit
memo templates before creating service documents

- **Applied in two locations**:
- `CreatePostServiceDoc()` - affects multiple service invoice/credit
memo tests
- `ExportXml_ServiceInvoiceLCY_InvRounding_Positive()` - direct service
header creation

Pattern follows existing implementation in
`PEPPOL30ManagementTests.Codeunit.al`.

```al
local procedure SetupServiceMgtSetupTemplates()
begin
    LibraryERM.FindGenJournalTemplate(GenJournalTemplate);
    GenJournalTemplate."Posting No. Series" := LibraryERM.CreateNoSeriesCode();
    GenJournalTemplate.Modify(false);
    ServMgtSetup.GetRecordOnce();
    ServMgtSetup."Serv. Inv. Template Name" := GenJournalTemplate.Name;
    ServMgtSetup."Serv. Cr. Memo Templ. Name" := GenJournalTemplate.Name;
    ServMgtSetup.Modify(false);
end;
```

Fixes 5 failing tests: `ExportXml_PEPPOL_BIS3_ServiceInvoice`,
`ExportXml_PEPPOL_BIS3_ServiceCrMemo`,
`ExportXml_PEPPOL_BIS3_ServiceInvoiceFCY`,
`ExportXml_PEPPOL_BIS3_ServiceCrMemoFCY`,
`ExportXml_ServiceInvoiceLCY_InvRounding_Positive`.

<!-- START COPILOT CODING AGENT TIPS -->
---

💬 We'd love your input! Share your thoughts on Copilot coding agent in
our [2 minute survey](https://gh.io/copilot-coding-agent-survey).

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: Groenbech96 <17690329+Groenbech96@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

AL: Apps (W1) Add-on apps for W1

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants