#9860 [Bug]: [DE] XRechnung/ZUGFeRD - Item Charge lines exported without a valid unit of measure code (BR-CL-23 / BR-23 on BT-130)
Item charge lines are now correctly exported as allowances or charges in XRechnung and ZUGFeRD documents instead of fabricated invoice lines, with configurable mapping strategies to comply with EN 16931 validation rules.
- 21files
- 14AL files
- 13objects
Pull request · merged into main (BC30) on 2026-09-05 by miljance (community contribution) · 21 files (+5873 -54), 14 AL · fix · tier official · reviewed (checked by Opus)
What changed
- New Item Charge E-Invoice Mapping setting on E-Document Service: Automatic, document-level or line-level allowance/charge, or line with unit code
- Per-item-charge override for mapping, reason text, reason code and fallback unit code
- Automatic mode uses Value Entry assignments to choose line-level or document-level, with integration events to override the result
- XRechnung and ZUGFeRD exporters emit allowance/charge structures and adjust totals and tax subtotals accordingly
- Removes a duplicate features key that stopped the DE demo data app from compiling
- Behaviour changes for users or extensions.
AL objects touched
- Page extension 11036 “E-Doc Item Charges DE”, EDocumentDE (DE layer): added
- Codeunit 11038 “E-Document DE Helper”, EDocumentDE (DE layer): modified
- Codeunit 13916 “Export XRechnung Document”, EDocumentDE (DE layer): modified
- Codeunit 13917 “Export ZUGFeRD Document”, EDocumentDE (DE layer): modified
- Permission set 6100 “E-Doc. Core - Objects”, EDocument: modified
- Table extension 6536 “E-Doc. Item Charge”, EDocument: added
- Page extension 6537 “E-Doc. Item Charges”, EDocument: added
- Enum 6535 “Item Charge Mapping Override”, EDocument: added
- Codeunit 6246 “E-Doc. Item Charge Mapping”, EDocument: added
- Enum 6534 “Item Charge E-Doc. Structure”, EDocument: added
- Table 6103 “E-Document Service”, EDocument: modified
- Page 6133 “E-Document Service”, EDocument: modified
- Enum 6533 “Item Charge E-Invoice Mapping”, EDocument: added
src/Apps/DE/EDocumentDE/app/src/EDocumentServiceDE.PageExt.al: modified, not in the BC30 snapshot
Also merged into
- #11099 into
releases/29.xon 2026-09-14
Context
- Fixes: #8417 [Bug]: [DE] XRechnung/ZUGFeRD - Item Charge lines exported without a valid unit of measure code (BR-CL-23 / BR-23 on BT-130) (closed)
- Work items: AB#641600
- Labels: ADO: Sync, AL: Apps (W1), From Fork, Ownership: Needs Review, Team: Other
- Systems: integration, inventory
Source: metadata of a merged pull request in microsoft/BCApps (bcapps): title, labels, changed paths and counts, with a summary in our words. No source text and no description beyond one short quote (D10, D61).