Peppol BIS Billing 3.0.21 · UBL

PEPPOL-COMMON-R042: Danish organization number (CVR) MUST be stated in the correct format

Peppol BIS Billing 3.0.21 · UBL

fatalformat

Original rule text

[PEPPOL-COMMON-R042]-Danish organization number (CVR) MUST be stated in the correct format.

Stored validation assertion
(string-length(string()) = 10 and substring(string(), 1, 2) = 'DK' and string-length(translate(substring(string(), 3, 8), '1234567890', '')) = 0)
or
(string-length(string()) = 8) and (string-length(translate(substring(string(), 1, 8),'1234567890', '')) = 0)

PEPPOL-COMMON-R042 is a fatal rule in the format layer of Peppol BIS Billing 3.0.21 · UBL. An invoice that breaks it is rejected.

What this rule requires

The rule requires that any cbc:EndpointID[@schemeID = '0184'], cac:PartyIdentification/cbc:ID[@schemeID = '0184'], or cbc:CompanyID[@schemeID = '0184'] contains a Danish organization number (CVR) in the correct format. The value must be either exactly 8 digits, or exactly DK followed by 8 digits (10 characters in total). A document fails when the element contains anything else, for example extra characters, separators, lowercase dk, or the wrong length.

How to fix

Set the relevant element to either an 8-digit number without the DK prefix (e.g., 12345678) or DK plus 8 digits (e.g., DK12345678). Remove any spaces, punctuation, or other characters. Ensure the @schemeID remains 0184 on the element. Apply this to every element listed.

Guidance on this rule. The original text above is authoritative.

Where to go next

PEPPOL-COMMON-R042 changed in 2 published Peppol BIS Billing UBL release comparisons:

Validate an invoice against these rules · All release changes