Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Jan 27, 2026

XMLports were directly instantiating PEPPOL30 Common codeunit, bypassing the interface layer used throughout the rest of the PEPPOL codebase.

Changes

  • New interface: PEPPOL Document Processor with methods for document processing operations (GetTotals, GetInvoiceRoundingLine, SetFilters)
  • Updated PEPPOL30 Common: Implements new interface
  • Updated PEPPOL 3.0 Format enum: Added interface binding with default implementation
  • Updated XMLports: Replaced direct codeunit instantiation with interface usage in SalesInvoicePEPPOL30 and SalesCrMemoPEPPOL30

Example

Before:

var
    PEPPOL30Common: Codeunit "PEPPOL30 Common";
begin
    PEPPOL30Common.GetTotals(...);

After:

var
    PEPPOLDocumentProcessor: Interface "PEPPOL Document Processor";
    CurrentFormat: Enum "PEPPOL 3.0 Format";
begin
    CurrentFormat := GetFormat();
    PEPPOLDocumentProcessor := CurrentFormat;
    PEPPOLDocumentProcessor.GetTotals(...);

The format enum is cached to avoid redundant GetFormat() calls.

Original prompt

Could you please analyse the peppol xml ports in the PEPPOL app. It should be calls on an interface object. If we directly call peppol30 or the impl code unit then report it.


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI and others added 2 commits January 27, 2026 08:28
Co-authored-by: Groenbech96 <17690329+Groenbech96@users.noreply.github.com>
Co-authored-by: Groenbech96 <17690329+Groenbech96@users.noreply.github.com>
Copilot AI changed the title [WIP] Analyze PEPPOL XML ports in app for interface calls Enforce interface abstraction for PEPPOL XML exports Jan 27, 2026
Copilot AI requested a review from Groenbech96 January 27, 2026 08:33
Copilot AI and others added 4 commits January 27, 2026 08:57
Co-authored-by: Groenbech96 <17690329+Groenbech96@users.noreply.github.com>
Co-authored-by: Groenbech96 <17690329+Groenbech96@users.noreply.github.com>
Co-authored-by: Groenbech96 <17690329+Groenbech96@users.noreply.github.com>
Co-authored-by: Groenbech96 <17690329+Groenbech96@users.noreply.github.com>
Copilot AI changed the title Enforce interface abstraction for PEPPOL XML exports Replace direct codeunit calls with interface abstraction in PEPPOL XMLports Jan 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants