-
Notifications
You must be signed in to change notification settings - Fork 687
Closed
Copy link
Labels
FinanceGitHub request for Finance areaGitHub request for Finance areaapprovedThe issue is approvedThe issue is approved
Description
Describe the issue
When a Sales Invoice is posted for a customer record that is missing mandatory master data (e.g., address fields, email), the generated xRechnung XML file is invalid.
The XML export does not enforce validation of required customer fields before posting, which results in missing elements in the XML.
As a consequence, the file fails validation in the official xRechnung validator with multiple errors related to incomplete customer address information.
Expected behavior
- A posted Sales Invoice should always produce a valid xRechnung XML file.
- If mandatory customer data is missing, the system should prevent posting until the required information is completed.
- Users should not discover XML errors only after posting; the export must remain compliant with posted document values.
Steps to reproduce
Repro
- Use Business Central for Germany.
- Enable E-Document Service for XRechnung.
- In setup:
- Set Buyer Reference Mandatory = Yes
- Set Buyer Reference = Your Reference
- Configure a Workflow for XRechnung (per docs).
- Configure a Document Sending Profile for XRechnung (per docs) and mark it as default.
- Create a new domestic customer without using customer templates.
- Enter only a name for the customer (no address, no email).
- Assign posting groups: Gen. Bus. Posting Group, VAT Bus. Posting Group, and Customer Posting Group (e.g., INLAND).
- Create a new Sales Invoice for this customer and enter any value in Your Reference.
- Add a Sales Line with any value (e.g., 4.000,00 EUR).
- Post the Sales Invoice.
- Open the Posted Sales Invoice.
- Navigate to Related → E-Document → Open E-Document.
- From E-Document Logs, export the XML file.
- Upload the file to the xRechnung Validator.
- Observe the errors: validator reports multiple missing address fields.
Additional context
Fixes
AB#609594
I will provide a fix for a bug
- I will provide a fix for a bug
DanielGoehler
Metadata
Metadata
Assignees
Labels
FinanceGitHub request for Finance areaGitHub request for Finance areaapprovedThe issue is approvedThe issue is approved