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

This comment was marked as outdated.

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

This comment was marked as outdated.

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

This comment was marked as outdated.

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 6 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>
@Groenbech96
Copy link
Contributor Author

@copilot Change the name to PEPPOL Tests

Copy link
Contributor

Copilot AI commented Jan 29, 2026

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

Updated the app name in `app.json` to follow consistent naming
convention.

**Changes:**
- Renamed app from `Tests-PEPPOL` to `PEPPOL Tests` in
`/src/Apps/W1/PEPPOL/Test/app.json`

<!-- 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>
@Groenbech96 Groenbech96 enabled auto-merge (squash) January 30, 2026 08:40
@Groenbech96 Groenbech96 merged commit 3279f79 into main Jan 30, 2026
48 checks passed
@Groenbech96 Groenbech96 deleted the private/magnushar/morepeppol branch January 30, 2026 08:40
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.

5 participants