Skip to content

[Bug]: ZUGFeRD Invoice: Seller Item Number (BT-155) not included in XML export #29871

@miljance

Description

@miljance

Describe the issue

When exporting a sales invoice as ZUGFeRD (or Factur-X), the generated XML does not include the seller's item number (ram:SellerAssignedID, BT-155) on the invoice line level. Only the line description (ram:Name) is populated.

According to the ZUGFeRD 2.x / Factur-X specification (EN 16931), the element BT-155 Item Seller's identifier is a recommended field at the SpecifiedTradeProduct level. Including it significantly improves automated processing on the recipient's side, as it allows the buyer's system to match invoice lines to catalog items or purchase orders without relying solely on free-text descriptions.

Notably, the XRechnung export already includes the item number in the generated XML, so the data is available - it is just not carried over to the ZUGFeRD export path.

Expected behavior

The ZUGFeRD XML export should populate ram:SellerAssignedID within ram:SpecifiedTradeProduct on each invoice line, using the item's "No." from the posted sales invoice line - consistent with how XRechnung already handles this.

Example of expected XML structure per line:

<ram:SpecifiedTradeProduct>
  <ram:SellerAssignedID>ITEM-1000</ram:SellerAssignedID>
  <ram:Name>Some item description</ram:Name>
</ram:SpecifiedTradeProduct>

Actual behavior:

The ram:SellerAssignedID element is omitted entirely. The output only contains:

<ram:SpecifiedTradeProduct>
  <ram:Name>Some item description</ram:Name>
</ram:SpecifiedTradeProduct>

Steps to reproduce

  1. Use Business Central for Germany.
  2. Enable E-Document Service for ZUGFeRD/Factur-X.
  3. Configure a Workflow and a Document Sending Profile for ZUGFeRD (per [docs]). Mark the sending profile as default.
  4. Create a Customer with a valid setup for e-invoicing.
  5. Create a new Sales Invoice for this Customer.
  6. Add one or more Sales Lines referencing Items that have a "No." assigned (e.g., Item No. = ITEM-1000).
  7. Post the Sales Invoice.
  8. Open the Posted Sales InvoiceRelated → E-Document → Open E-Document.
  9. From E-Document Logs, export the XML file.
  10. Inspect <ram:SpecifiedTradeProduct> in the XML.
    • Actual result: ram:SellerAssignedID is missing — only <ram:Name> is present.
    • Expected result: <ram:SellerAssignedID>ITEM-1000</ram:SellerAssignedID> is included.
  11. For comparison, export the same invoice as XRechnung and observe that the item number is correctly included in the XML.

Additional context

No response


Ready to paste. Want me to adjust anything?

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 area

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions