How to Fix KoSIT Error BR-DE-18: Skonto Format Violation in BT-20
KoSIT 1.6.3 rejects the invoice due to incorrect Skonto formatting in BT-20. The regex requires uppercase, dot-decimal percentages, and a trailing #. Fix by replacing '2%#' with '2.00#'.
1. Why KoSIT Validator v1.6.3 Rejects This Invoice
The official XPath test for BR-DE-18 enforces a strict regex pattern for Skonto lines in the <ram:Description> of BT-20. The regex (^|\r?\n)#(SKONTO)#TAGE=([0-9]+#PROZENT=[0-9]+\.[0-9]{2})(#BASISBETRAG=-?[0-9]+\.[0-9]{2})?#$ ensures correct formatting. Any deviation, such as using a percent sign instead of a dot-decimal format, or missing the trailing #, causes a fatal error. This applies to both CII and UBL-based XRechnung 3.0.2.
/rsm:CrossIndustryInvoiceevery $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' )/ubl:Invoice | /cn:CreditNote2. KoSIT-Verified XML Example: Broken vs. Fixed
</ram:ApplicableTradeTax>
<ram:SpecifiedTradePaymentTerms>
<ram:Description>#SKONTO#TAGE=14#PROZENT=2%#</ram:Description>
<ram:DueDateDateTime>
<udt:DateTimeString format="102">20261221</udt:DateTimeString>
</ram:DueDateDateTime>
</ram:SpecifiedTradePaymentTerms>
<ram:SpecifiedTradeSettlementHeaderMonetarySummation>
</ram:ApplicableTradeTax>
<ram:SpecifiedTradePaymentTerms>
<ram:Description>#SKONTO#TAGE=14#PROZENT=2.00#
</ram:Description>
<ram:DueDateDateTime>
<udt:DateTimeString format="102">20261221</udt:DateTimeString>
</ram:DueDateDateTime>
</ram:SpecifiedTradePaymentTerms>
The broken XML uses 'PROZENT=2%#' which fails because percentages must be in dot-decimal format (e.g., 2.00) and end with a #. The fixed XML replaces '2%#' with '2.00#' and adds a newline, satisfying the regex and passing KoSIT validation.
3. Step-by-Step Fix Checklist
- Step 1: Inspect the <ram:Description> element in BT-20 (Payment Terms) for Skonto lines.
- Step 2: Replace any percent signs (%) with dot-decimal format (e.g., 2.00), ensure all segments are uppercase and end with a #.
- Step 3: Re-validate the XML using Beleq's free KoSIT v1.6.3 validator to confirm compliance.
4. Common Shopify Store & DATEV Workflow Trigger
German Shopify B2B merchants often manually enter Skonto terms like '2% Skonto bei Zahlung in 14 Tagen' into BT-20, which violates the strict regex. Beleq helps by validating the invoice format before sending it to DATEV, preventing rejections and ensuring compliance with XRechnung 3.0.2.
5. Frequently Asked Questions
What is the correct format for Skonto in XRechnung 3.0.2?
Skonto must be in uppercase, with segments like #SKONTO#TAGE=14#PROZENT=2.00#, and must end with a # followed by a newline.
Does this rule apply to ZUGFeRD 2.3 (Factur-X) as well?
No, BR-DE-18 is specific to XRechnung 3.0.2. ZUGFeRD 2.3 uses a different format for Skonto in the <PaymentMeans> element.
Related KoSIT Error Codes
Check your hybrid ZUGFeRD PDF or XRechnung XML in under 1 second against the official German KoSIT Validator v1.6.3 — 100% RAM-based on Frankfurt servers with zero retention and no registration.
Open Free KoSIT v1.6.3 Validator → See Beleq for Shopify