DE-R-018: If both supplier and customer are located in Germany, information on cash discounts for…
Peppol BIS Billing 3.0.21 · UBL
Original rule text
[DE-R-018]-If both supplier and customer are located in Germany, information on cash discounts for prompt payment (Skonto) shall be provided within the element "Payment terms" BT-20 in the following way: First segment "SKONTO", second segment amount of days ("TAGE=N"), third segment percentage ("PROZENT=N"). Percentage must be separated by dot with two decimal places. In case the base value of the invoiced amount is not provided in BT-115 but as a partial amount, the base value shall be provided as fourth segment "BASISBETRAG=N" as semantic data type amount. Each entry shall start with a #, the segments must be separated by # and a row shall end with a #. A complete statement on cash discount for prompt payment shall end with a XML-conformant line break. All statements on cash discount for prompt payment shall be given in capital letters. Additional whitespaces (blanks, tabulators or line breaks) are not allowed. Other characters or texts than defined above are not allowed.
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' )DE-R-018 is a fatal rule in the country layer of Peppol BIS Billing 3.0.21 · UBL. An invoice that breaks it is rejected. It refers to BT-20, BT-115.
What this rule requires
This is a fatal UBL rule. It applies only to an ubl-invoice:Invoice or ubl-creditnote:CreditNote when both supplier and customer country identification codes are DE. The first cac:PaymentTerms/cbc:Note (BT-20) must contain Skonto terms in the form #SKONTO#TAGE=<days>#PROZENT=<percentage with two decimal places>#. Each such line may also include an optional #BASISBETRAG=<amount with two decimal places># segment. The XPath tests every line whose normalize-space() value starts with # against $XR-SKONTO-REGEX; because of normalize-space(), leading/trailing whitespace around a line is ignored, even though the message says no additional whitespace is allowed. The note must end with an XML line break after the final # line. The test does not enforce that non-# lines are absent.
How to fix
Set the first cac:PaymentTerms/cbc:Note to one or more lines such as #SKONTO#TAGE=14#PROZENT=2.00# and terminate each complete row with an XML line break. If the basis amount is stated as a partial amount, append #BASISBETRAG=<amount with two decimal places># before the line break. Use only uppercase SKONTO, TAGE, PROZENT, BASISBETRAG; write percentages and basis amounts as dot-separated values with exactly two decimal places; do not put spaces inside the #-delimited row.
Guidance on this rule. The original text above is authoritative.
Where to go next
DE-R-018 changed in 2 published Peppol BIS Billing UBL release comparisons:
- DE-R-018 in 3.0.20 → 3.0.21: Behaviour changed without the rule changing
- DE-R-018 in 3.0.17 → 3.0.18: New rule
Validate an invoice against these rules · All release changes