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
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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

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

2 participants