Describe the issue
Item Charges (lines with Type = Charge (Item)) on a Sales Invoice are exported as regular invoice lines (IncludedSupplyChainTradeLineItem in CII). This is acceptable - an invoice line is a valid representation for such a charge. The problem is the unit of measure field: because an item charge has no real unit, the export emits either an empty unit code or PCE. Both fail validation.
EN16931 requires every invoice line (BG-25) to carry a unit of measure code (BT-130), and that code must come from UN/ECE Recommendation 20 (with Rec 21 extension). An empty value violates BR-23, and PCE violates BR-CL-23.
Note: an alternative would be to remodel item charges as document-level or line-level AllowanceCharge elements (BG-20/BG-21/BG-27/BG-28). That is a larger semantic change and is not what this issue requests — the concrete defect is the missing/invalid unit code on the existing line.
Expected behavior
Item Charge lines should continue to be exported as invoice lines, but with a valid UN/ECE Rec 20 unit code. For a charge that has no physical unit of measure, the correct code is C62 ("one"). Emitting C62 resolves both BR-23 and BR-CL-23 while keeping the charge visible as a line item on the invoice.
Steps to reproduce
- Use Business Central for Germany with XRechnung or ZUGFeRD E-Document Service configured.
- Create a Sales Invoice with at least one normal item line.
- Add one or more Item Charge lines (Type =
Charge (Item)), e.g. freight, packaging.
- Post the invoice and export the E-Document XML.
- Validate with an EN16931 / XRechnung validator (e.g. KoSIT / Mustang).
- Actual result: The item charge line has an empty unit code (or
PCE) on BilledQuantity → BR-23 / BR-CL-23 validation errors.
- Expected result: The line carries unit code
C62 and the document validates successfully.
Additional context
including @pri-kise and @marschmar into the loop.
I will provide a fix for a bug
Describe the issue
Item Charges (lines with Type =
Charge (Item)) on a Sales Invoice are exported as regular invoice lines (IncludedSupplyChainTradeLineItemin CII). This is acceptable - an invoice line is a valid representation for such a charge. The problem is the unit of measure field: because an item charge has no real unit, the export emits either an empty unit code orPCE. Both fail validation.EN16931 requires every invoice line (BG-25) to carry a unit of measure code (BT-130), and that code must come from UN/ECE Recommendation 20 (with Rec 21 extension). An empty value violates BR-23, and
PCEviolates BR-CL-23.Expected behavior
Item Charge lines should continue to be exported as invoice lines, but with a valid UN/ECE Rec 20 unit code. For a charge that has no physical unit of measure, the correct code is
C62("one"). EmittingC62resolves both BR-23 and BR-CL-23 while keeping the charge visible as a line item on the invoice.Steps to reproduce
Charge (Item)), e.g. freight, packaging.PCE) onBilledQuantity→ BR-23 / BR-CL-23 validation errors.C62and the document validates successfully.Additional context
including @pri-kise and @marschmar into the loop.
I will provide a fix for a bug