BR-DE-18: Skonto text in payment terms (BT-20) does not match the pattern
Severity: fatal · Syntax: CII, UBL
Official message
Skonto Zeilen in {name()} muessen diesem regulärem Ausdruck entsprechen: {$XR-SKONTO-REGEX}. Die Informationen zur Gewährung von Skonto müssen wie folgt im Element "Payment terms" (BT-20) übermittelt werden: Anzugeben ist im ersten Segment "SKONTO", im zweiten "TAGE=n", im dritten "PROZENT=n". Prozentzahlen sind ohne Vorzeichen sowie mit Punkt getrennt von zwei Nachkommastellen anzugeben. Liegt dem zu berechnenden Betrag nicht BT-115, "fälliger Betrag" zugrunde, sondern nur ein Teil des fälligen Betrags der Rechnung, ist der Grundwert zur Berechnung von Skonto als viertes Segment "BASISBETRAG=n" gemäß dem semantischen Datentypen Amount anzugeben. Jeder Eintrag beginnt mit einer #, die Segmente sind mit einer # getrennt und eine Zeile schließt mit einer # ab. Am Ende einer vollständigen Skontoangabe muss ein XML-konformer Zeilenumbruch folgen. Alle Angaben zur Gewährung von Skonto müssen in Großbuchstaben gemacht werden. Zusätzliches Whitespace (Leerzeichen, Tabulatoren oder Zeilenumbrüche) ist nicht zulässig. Andere Zeichen oder Texte als in den oberen Vorgaben genannt sind nicht zulässig.
What this means
Skonto lines in payment terms (BT-20) must match the XRechnung Schematron expression XR-SKONTO-REGEX: (^|\r?\n)#(SKONTO)#TAGE=([0-9]+#PROZENT=[0-9]+\.[0-9]{2})(#BASISBETRAG=-?[0-9]+\.[0-9]{2})?#$. The message requires the segments SKONTO, TAGE=n and PROZENT=n with two decimal places and a dot, optional BASISBETRAG=n, all uppercase, no extra whitespace, each line opened and closed with #, then an XML line break. The compiled stylesheet fills the document name and the expression with xsl:value-of; the static message text alone does not show those two slots.
Typical cause
The discount is written as a normal sentence instead of the required pattern.
How to fix it
Write one line in the pattern and end it with a line break.
UBL
<cbc:Note>#SKONTO#TAGE=14#PROZENT=2.00#
</cbc:Note>CII
<ram:Description>#SKONTO#TAGE=14#PROZENT=2.00#
</ram:Description>
Business term
Payment terms (BT-20), BT-115
Related rules
Context and assertion
UBL /ubl:Invoice | /cn:CreditNote
CII /rsm:CrossIndustryInvoice
UBL
every $line in cac:PaymentTerms/cbc:Note[1]/tokenize(. , '(\r?\n)')[starts-with( normalize-space(.) , '#')] satisfies matches ( normalize-space ($line), $XR-SKONTO-REGEX) and matches( cac:PaymentTerms/cbc:Note[1]/tokenize(. , '#.+#')[last()], '^\s*\n' )CII
every $line in rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradePaymentTerms/ram:Description[1]/tokenize(. , '(\r?\n)')[starts-with( normalize-space(.) , '#')] satisfies matches ( normalize-space ($line), $XR-SKONTO-REGEX ) and matches( rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradePaymentTerms/ram:Description[1]/tokenize(. , '#.+#')[last()], '^\s*\n' )
Check a file now, free of charge
curl -F "file=@rechnung.xml" https://checkxrechnung.com/v1/validate
Questions
What does BR-DE-18 actually check?
Skonto lines in payment terms (BT-20) must match the XRechnung Schematron expression XR-SKONTO-REGEX: (^|\r?\n)#(SKONTO)#TAGE=([0-9]+#PROZENT=[0-9]+\.[0-9]{2})(#BASISBETRAG=-?[0-9]+\.[0-9]{2})?#$. The message requires the segments SKONTO, TAGE=n and PROZENT=n with two decimal places and a dot, optional BASISBETRAG=n, all uppercase, no extra whitespace, each line opened and closed with #, then an XML line break. The compiled stylesheet fills the document name and the expression with xsl:value-of; the static message text alone does not show those two slots.
How do I fix BR-DE-18?
Write one line in the pattern and end it with a line break.
If BR-DE-18 passes, is the invoice legally compliant?
No. This page helps you read this one Schematron assertion. A pass is not a statement about tax law, portal acceptance, or bank overlays.