Attestwire › Rule reference › BR-DE-18
BR-DE-18 Skonto entries in the payment terms must follow the XRechnung format
noun · XRechnung · fatal · BT-20
For a sample invoice, the library reports: Line 1 of the payment terms (BT-20) starts with "#", which marks it as a Skonto (early-payment discount) entry, but "#SKONTO#TAGE=14#PROZENT=2#" does not match the grammar XRechnung prescribes.
Diese Regel auf Deutsch: BR-DE-18 — auf Deutsch erklärt.
- Business term
BT-20- Severity
fatal
The fix
Write each discount as its own line, e.g. "#SKONTO#TAGE=14#PROZENT=2.00#". Add the base amount only when the discount applies to part of the invoice rather than to the full amount due (BT-115): "#SKONTO#TAGE=14#PROZENT=2.00#BASISBETRAG=1000.00#". Each entry must end with a newline. Human-readable prose is fine in BT-20 as well — it just must not start a line with "#".
A passing value
"paymentTerms": "Zahlbar innerhalb von 30 Tagen.\n#SKONTO#TAGE=14#PROZENT=2.00#\n"What the library returns
The full error returned by @attestwire/en16931. It includes the rule ID,
affected field and suggested correction. Developers can use this object in their application:
{
"rule": "BR-DE-18",
"field": "BT-20",
"severity": "fatal",
"message": "Line 1 of the payment terms (BT-20) starts with \"#\", which marks it as a Skonto (early-payment discount) entry, but \"#SKONTO#TAGE=14#PROZENT=2#\" does not match the grammar XRechnung prescribes. The format is rigid on purpose — it is the one place the standard turns free-text payment terms into something machine-readable — and it is: #SKONTO#TAGE=n#PROZENT=n.nn# with an optional fourth segment #BASISBETRAG=n.nn# before the closing #. Every segment is separated and terminated by \"#\", everything is upper case, the percentage carries exactly two decimals with a dot (never a comma) and no sign, and no whitespace of any kind is allowed inside the entry.",
"fix": "Write each discount as its own line, e.g. \"#SKONTO#TAGE=14#PROZENT=2.00#\". Add the base amount only when the discount applies to part of the invoice rather than to the full amount due (BT-115): \"#SKONTO#TAGE=14#PROZENT=2.00#BASISBETRAG=1000.00#\". Each entry must end with a newline. Human-readable prose is fine in BT-20 as well — it just must not start a line with \"#\".",
"example": "\"paymentTerms\": \"Zahlbar innerhalb von 30 Tagen.\\n#SKONTO#TAGE=14#PROZENT=2.00#\\n\"",
"xpath": "/ubl:Invoice/cac:PaymentTerms/cbc:Note",
"docsUrl": "https://attestwire.com/rules/BR-DE-18"
}
xpath is always a UBL path. On a CII invoice, look for the
matching CII field instead.