Skip to content

Conversation

@pri-kise
Copy link
Contributor

@pri-kise pri-kise commented Dec 22, 2025

Summary

This PR simplifies the custom report integration for ZUGFeRD Export

A partner now only needs to add the following snippet to their custom sales invoice / credit memo report for the ZUGFeRD xml.

    trigger OnPreRendering(var RenderingPayload: JsonObject)
    begin
        AddXMLAttachmentforZUGFeRDExport(RenderingPayload);
    end;

    local procedure AddXMLAttachmentforZUGFeRDExport(var RenderingPayload: JsonObject)
    var
        ExportZUGFeRDDocument: Codeunit "Export ZUGFeRD Document";
    begin
        if CurrReport.TargetFormat() <> ReportFormat::PDF then
            exit;

        if not ExportZUGFeRDDocument.IsZUGFeRDPrintProcess() then
            exit;

        ExportZUGFeRDDocument.CreateAndAddXMLAttachmentToRenderingPayload(Header, RenderingPayload);
    end;

Work Item(s)

Fixes #29541

Fixes AB#617052

@JesperSchulz JesperSchulz added the Finance GitHub request for Finance area label Jan 6, 2026
@pri-kise pri-kise changed the title [DRAFT] Simplify ZUGFeRD Report Integration Simplify ZUGFeRD Report Integration Jan 8, 2026
@pri-kise pri-kise marked this pull request as ready for review January 8, 2026 08:28
@pri-kise pri-kise requested a review from a team as a code owner January 8, 2026 08:28
@github-actions github-actions bot added the linked Issue is linked to a Azure Boards work item label Jan 8, 2026
@JesperSchulz JesperSchulz self-assigned this Jan 29, 2026
@JesperSchulz JesperSchulz added the processing-PR The PR is currently being reviewed label Jan 29, 2026
@github-actions
Copy link
Contributor

Processing this PR. The branch is now locked 🔒 Please don't push updates unless otherwise agreed.

@JesperSchulz JesperSchulz enabled auto-merge (squash) January 30, 2026 08:37
@JesperSchulz JesperSchulz merged commit 0cdb8e0 into microsoft:main Jan 30, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Finance GitHub request for Finance area linked Issue is linked to a Azure Boards work item processing-PR The PR is currently being reviewed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BC Idea]: ZUGFeRD - Simplify Integration into custom reports

3 participants