# BR-DE-18 Cash discount lines in payment terms must follow the XRechnung syntax

Under German commercial invoicing practices, early payment discounts (Skonto) are widely granted (e.g. "2% cash discount if paid within 14 days, net within 30 days"). Because the underlying European standard EN 16931 lacks dedicated structured XML fields for cash discounts at the invoice level, XRechnung standardizes the text format of payment terms (BT-20) using structured hashtags: #SKONTO#TAGE={days}#PROZENT={percentage}#. Public accounting software and automated ERP payment workflows parse these hashtags to calculate discount deadlines and net payable amounts automatically.

## Problem Description

> **ERROR**: German XRechnung rule (KoSIT, BR-DE) · XRechnung 3.0

> **Where BR-DE-18 is checked**
>
> A validator checks an e-invoice in stages. First the file must be well-formed XML that matches the UBL or CII schema (XSD). Then the EN 16931 business rules run: BR core rules, BR-CO calculations, BR-CL code lists, BR-DEC decimals and VAT-category rules such as BR-S. Next come the national or network rules that BT-24 selects: BR-DE for XRechnung, PEPPOL-EN16931 for Peppol BIS Billing. The report lists every failed rule: one error means reject, warnings alone still mean accept. BR-DE-18: XRechnung rule (Germany), reported in the stage “National rules (CIUS)”.

## Context and Significance

BR-DE-18 is a fatal rule in the KoSIT configuration for XRechnung 3.0.2. It checks only the lines of BT-20 that start with "#": each must follow the Skonto format, and the last one must end with a line break. Payment terms in plain text without "#" do not trigger it.

## Solution

In your ERP invoice export settings, format early discount terms in BT-20 according to the XRechnung hashtag convention: #SKONTO#TAGE=14#PROZENT=2.00#. For multi-tiered cash discounts, provide multiple lines such as #SKONTO#TAGE=10#PROZENT=3.00#
#SKONTO#TAGE=20#PROZENT=2.00#. In UBL 2.1 syntax, populate <cac:PaymentTerms><cbc:Note>#SKONTO#TAGE=14#PROZENT=2.00#</cbc:Note></cac:PaymentTerms>. In UN/CEFACT CII syntax, populate <ram:SpecifiedTradePaymentTerms><ram:Description>#SKONTO#TAGE=14#PROZENT=2.00#</ram:Description></ram:SpecifiedTradePaymentTerms>. Free-text descriptions may be appended after the hashtag expressions.

- [Validate XML](/en/xrechnung-validator?source=resource&rule=BR-DE-18)
- [Convert invoice](/en/pdf-to-xrechnung?source=resource&rule=BR-DE-18)

## Valid Examples

- BT-20 = "#SKONTO#TAGE=14#PROZENT=2.00#"
- BT-20 = "#SKONTO#TAGE=10#PROZENT=3.00#
#SKONTO#TAGE=20#PROZENT=1.50#
Zahlbar rein netto innerhalb von 30 Tagen."

## Invalid Examples

- BT-20 = "2% Skonto bei Zahlung innerhalb von 14 Tagen" (Unstructured plain German text without #SKONTO# tags)
- BT-20 = "#SKONTO#TAGE:14#PROZENT:2%#" (Malformed hashtag syntax using colons and percent sign inside value)

## Code Examples

### Valid XML
```
<cac:PaymentTerms>
  <cbc:Note>#SKONTO#TAGE=14#PROZENT=2.00#</cbc:Note>
</cac:PaymentTerms>
```

### Invalid XML
```
<cac:PaymentTerms>
  <cbc:Note>2% Skonto bei Zahlung innerhalb von 14 Tagen, rein netto nach 30 Tagen</cbc:Note>
</cac:PaymentTerms>
```

## Affected Fields

- [BT-20 Payment terms](/resources/xrechnung/bt-20-payment-terms)

## Validation Tools

- [Official KoSIT Validator](https://github.com/itplr-kosit/validator): Run the official KoSIT validator with the XRechnung configuration to check EN 16931 and XRechnung rules.
- [Convert PDF to XRechnung](/pdf-to-xrechnung): Find validation errors during conversion and review each correction.

## Related Resources

- [Official Specification](https://xeinkauf.de/xrechnung/)
- [Test Suite](https://github.com/itplr-kosit/xrechnung-testsuite)
- [All validation errors](/resources/kosit-validator-errors): Overview of the EN 16931, XRechnung and Peppol validation rules explained here.
