Skip to content

[Bug]: ZUGFeRD - Sending E-Document in PDF format attached with .xml extension #5220

@miljance

Description

@miljance

Describe the issue

When sending a ZUGFeRD e-document from Business Central for Germany via the Document Sending Profile and workflow, the email attachment is generated with a .xml file extension even though the file content is a valid PDF (ZUGFeRD-in-PDF).

Renaming the attachment from .xml to .pdf makes the document valid.

One part of this change should be done in "E-Document Core App" and the other part in the app "E-Document for Germany". Generally speaking, sending E-Documents as attachment in an E-Mail should be able to recognize if the file is an xml or pdf.

Expected behavior

  • The email attachment should be a PDF file with the .pdf extension containing the embedded ZUGFeRD XML payload.
  • The generated attachment name and MIME type should align with PDF (e.g., application/pdf).
  • No manual renaming should be required by the sender or recipient.

Steps to reproduce

  1. Use Business Central for Germany.
  2. Enable E-Document Service for ZUGFeRD.
  3. In setup:
    • Buyer Reference Mandatory = Yes
    • Buyer Reference = Your Reference
  4. Configure a Workflow for ZUGFeRD (per docs).
  5. Configure a Document Sending Profile for ZUGFeRD (per docs):
    • Email = Yes
    • E-Mail Attachment = E-Document
    • Electronic Document = E-Document Workflow
    • E-Document Workflow = MS-EDOCTOS-01
  6. Mark this sending profile as the default profile.
  7. Assign the sending profile to a Customer.
  8. Create a new Sales Invoice for the same Customer.
  9. Post the Sales Invoice.
  10. Open the Posted Sales Invoice and choose Send.
  11. Confirm the dialog.
  12. Observed: The Email Editor appears with an attachment that has a .xml extension. - If downloaded and renamed to .pdf, the ZUGFeRD file is valid.

Screenshot

Additional context

No response

I will provide a fix for a bug

  • I will provide a fix for a bug

Metadata

Metadata

Assignees

Labels

ApprovedThe issue is approvedFinanceGitHub request for Finance area

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions