Skip to content

[Bug]: VAT Registration No. should not be mandatory for Public Sector customers in XRechnung/ZUGFeRD #29744

@miljance

Description

@miljance

Describe the issue

In the German localization of Business Central, when using XRechnung or ZUGFeRD via the E-Document framework, the system currently enforces that a Customer must have either a GLN or a VAT Registration No. before an invoice can be posted/exported.

While this is correct for B2B transactions, it creates a blocking issue for transactions with the German Public Sector (B2G). Public sector entities in Germany often do not have a VAT Registration Number because they are not "taxable businesses". Instead, they are uniquely identified by their E-Invoice Routing No. (Leitweg-ID). Currently, even if a valid Leitweg-ID is provided, the system fails the validation if the VAT Registration No. is missing.

Expected behavior

The validation logic should be updated to recognize the E-Invoice Routing No. (Leitweg-ID) as a valid identification for the buyer in the context of XRechnung and ZUGFeRD.

If the customer belongs to the public sector (identified by the presence of a Leitweg-ID/Routing No.), the requirement for VAT Registration No. or GLN should be bypassed, allowing the invoice to be posted and exported successfully.

Steps to reproduce

  1. Environment: Use a Business Central environment with German localization (DE).

  2. E-Document Setup:

    • Enable E-Document Service for ZUGFeRD and XRechnung.
    • Set Buyer Reference Mandatory = Yes.
    • Set Buyer Reference = Customer Reference.
  3. Workflow & Profiles:

    • Configure a Workflow for the selected e-document format.
    • Configure and assign a Document Sending Profile (with the e-document format) as default for a test customer.
  4. Customer Configuration:

    • Select a Customer that does not have a VAT Registration No..
    • Ensure the Customer has a valid E-Invoice Routing No. (Leitweg-ID).
  5. Transaction:

    • Create a new Sales Invoice for this Customer.
    • Add a Sales Line with any value.
    • Attempt to Post the Sales Invoice.
    • Observe the error: You must specify either GLN or VAT Registration No. for Customer XXXXX

Additional context

No response

I will provide a fix for a bug

  • I will provide a fix for a bug

Metadata

Metadata

Assignees

No one assigned

    Labels

    FinanceGitHub request for Finance areaapprovedThe issue is approved

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions