einvoiceconverter.come-invoice error codes

BR-DE-18

Early-payment discount (Skonto) terms are present but not in the strict machine-readable format XRechnung requires.

ErrorXRechnungUBLCII

Why it happens

Discount terms were written as free prose in the payment terms field. XRechnung requires a specific structured pattern inside BT-20.

How to fix it

Each discount must be its own line in BT-20, formatted as #SKONTO#TAGE=14#PROZENT=2.00#. Add #BASISBETRAG=…# where the discount applies to a partial amount. Free text may follow on separate lines, but the structured lines must match the pattern exactly.

The official rule

XRechnung, official German wordingSkonto Zeilen in … muessen diesem regulärem Ausdruck entsprechen: … . 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.

Our English rendering: Skonto (early-payment discount) lines must match the prescribed pattern. Discount information must be given in "Payment terms" (BT-20) as segments: "SKONTO" first, then "TAGE=n", then "PROZENT=n", with percentages unsigned and given to two decimal places separated by a point. If the discount applies to only part of the amount due (BT-115) rather than the whole, add a fourth segment "BASISBETRAG=n". Every entry starts with #, segments are separated by #, and each line closes with #. A complete Skonto entry must be followed by an XML-conformant line break. All Skonto information must be in capitals. Extra whitespace is not permitted, and no characters or text other than those specified are permitted.

Technical detail — where the rule is evaluated and the exact test
SyntaxContext and assertion
UBL/ubl:Invoice | /cn:CreditNote
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/rsm:CrossIndustryInvoice
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 your own invoice

Paste or drop your UBL or CII file into the free validator. It runs the official EN 16931 ruleset plus the German XRechnung layer and lists every rule that fires, BR-DE-18 included — no signup, no limit.

Validate an e-invoice free

Fixing the data at source instead? The CSV converter builds a compliant invoice from a spreadsheet export.

Other XRechnung (German CIUS) rules