DE-R-019: If both supplier and customer are located in Germany, the element "Payment account…
Peppol BIS Billing 3.0.21 · UBL
Original rule text
[DE-R-019]-If both supplier and customer are located in Germany, the element "Payment account identifier" (BT-84) should contain a valid IBAN if code 58 SEPA is provided in "Payment means type code" (BT-81).
not(normalize-space(cbc:PaymentMeansCode) = '58') or matches(normalize-space(replace(cac:PayeeFinancialAccount/cbc:ID, '([ \n\r\t\s])', '')), '^[A-Z]{2}[0-9]{2}[a-zA-Z0-9]{0,30}$') and xs:integer(string-join(for $cp in string-to-codepoints(concat(substring(normalize-space(replace(cac:PayeeFinancialAccount/cbc:ID, '([ \n\r\t\s])', '')),5),upper-case(substring(normalize-space(replace(cac:PayeeFinancialAccount/cbc:ID, '([ \n\r\t\s])', '')),1,2)),substring(normalize-space(replace(cac:PayeeFinancialAccount/cbc:ID, '([ \n\r\t\s])', '')),3,2))) return (if($cp > 64) then string($cp - 55) else string($cp - 48)),'')) mod 97 = 1DE-R-019 is a warning rule in the country layer of Peppol BIS Billing 3.0.21 · UBL. An invoice that breaks it is flagged but not rejected. It refers to BT-84, BT-81.
What this rule requires
This warning rule applies to UBL invoices and credit notes when both supplier and customer country codes are DE and PaymentMeansCode is either 30 or 58. If PaymentMeansCode is 58 (SEPA), PayeeFinancialAccount/cbc:ID (BT-84) should be a valid IBAN; the test checks the IBAN structure and modulo 97 check digit. If PaymentMeansCode is 30, the rule does not require an IBAN. As a warning, a document that does not satisfy the rule is not rejected, but the validator reports it.
How to fix
If PaymentMeansCode is 58 and both parties are in Germany, ensure PayeeFinancialAccount/cbc:ID contains a valid IBAN (correct format and check digits; internal whitespace is ignored by the rule). If SEPA payment is not intended, change PaymentMeansCode to a value other than 58 (for example 30, which the rule also considers but does not require an IBAN).
Guidance on this rule. The original text above is authoritative.
Where to go next
DE-R-019 changed in 2 published Peppol BIS Billing UBL release comparisons:
- DE-R-019 in 3.0.20 → 3.0.21: Test expression rewritten
- DE-R-019 in 3.0.17 → 3.0.18: New rule
Validate an invoice against these rules · All release changes