---
id: change/bcapps/9955
type: change
title: "#9955 XRechnung – Invalid XML Generated When Invoice Discount Percentage Exceeds 2 Decimals"
summary: Fixed invalid XML generation in XRechnung when invoice discount percentage has more than 2 decimal places by reverting a previous regression.
tier: official
language: en
tags:
  - fix
  - main
  - bc30
  - codeunit export xrechnung document
system: integration
review:
  state: reviewed
  by: opus
  at: "2026-10-08T02:10:12.573Z"
  flags: []
generated:
  at: "2026-10-08T01:26:53.141Z"
  pipeline: 0.2.0
  prompts:
    extract-change: 1
  input_hash: db137aa4091859e916e678ff8f76f25de3478dad
evidence:
  - kind: code
    url: https://github.com/microsoft/BCApps/pull/9955
    title: "microsoft/BCApps#9955: XRechnung – Invalid XML Generated When Invoice Discount Percentage Exceeds 2 Decimals"
    date: "2026-08-05"
    commit: db137aa4091859e916e678ff8f76f25de3478dad
    t: null
    quote: null
links:
  learn: []
  objects:
    - object/codeunit/13916-de
  features: []
  topics: []
  localizations: []
  videos: []
  posts: []
  guidelines: []
  changes: []
number: 9955
repo: microsoft/BCApps
source_id: bcapps-prs
url: https://github.com/microsoft/BCApps/pull/9955
kind: pr
base_branch: main
major: "30"
merged_at: "2026-08-05T13:59:53Z"
author: dcenic
author_type: User
community_contribution: false
labels:
  - "Team: Integrations"
change_class: code
change_kind: fix
behavior_change: true
breaking: false
files:
  count: 2
  additions: 38
  deletions: 26
  al: 1
apps:
  - EDocumentDE
objects_touched:
  - key: codeunit/13916
    page: codeunit/13916-de
    type: codeunit
    id: 13916
    name: Export XRechnung Document
    app: EDocumentDE
    status: modified
objects_unjoined: []
obsoletions: []
backports: []
fixes_issues: []
work_items:
  - 645078
systems:
  - integration
quote: null
joined_against:
  major: "30"
  commit: a4406cfa9e57437fedc49c53c327a199a854491e
---

# #9955 XRechnung – Invalid XML Generated When Invoice Discount Percentage Exceeds 2 Decimals

> Fixed invalid XML generation in XRechnung when invoice discount percentage has more than 2 decimal places by reverting a previous regression.

[Pull request](https://github.com/microsoft/BCApps/pull/9955) · merged into `main` (BC30) on 2026-08-05 by dcenic · 2 files (+38 -26), 1 AL · fix · tier official · reviewed (checked by Opus)

## What changed

- Corrects XML output for XRechnung e-invoices with discount percentages exceeding 2 decimals
- Reverts a prior regression that caused invalid XML formatting
- Includes updated test coverage for the corrected behavior
- Affects German e-document integration module
- Behaviour changes for users or extensions.

## AL objects touched

- [Codeunit 13916 "Export XRechnung Document"](../../objects/codeunit/13916-de.md), EDocumentDE (DE layer): modified

## Context

- Work items: AB#645078
- Labels: Team: Integrations
- Systems: integration

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).
