AttestwireRule referencePEPPOL-COMMON-R042

PEPPOL-COMMON-R042 A Danish CVR number must be eight digits, optionally prefixed DK

noun · Peppol BIS · fatal · BT-34

For a sample invoice, the library reports: The Seller electronic address (BT-34) is "DK1234567" under scheme "0184", which identifies the Danish CVR number. A value in that scheme must be eight digits, or "DK" followed by eight digits, and this one is not.

Business term
BT-34
Severity
fatal

The fix

Correct seller.electronicAddress, or change its scheme identifier if the value belongs to a different register. A check digit failing almost always means one digit was transposed or dropped in transcription — compare it against the source register rather than re-typing it.

A passing value

the shape this field expects
"electronicAddress": { "schemeId": "0184", "value": "DK12345678" }

What the library returns

The full error returned by @attestwire/en16931. It includes the rule ID, affected field and suggested correction. Developers can use this object in their application:

TeachingError
{
  "rule": "PEPPOL-COMMON-R042",
  "field": "BT-34",
  "severity": "fatal",
  "message": "The Seller electronic address (BT-34) is \"DK1234567\" under scheme \"0184\", which identifies the Danish CVR number. A value in that scheme must be eight digits, or \"DK\" followed by eight digits, and this one is not. The CVR number is accepted both bare and with the country prefix, and those are the only two forms — a nine-digit value, or \"DK\" with seven digits, is a typo rather than a variant. Peppol flags this fatal: the identifier is what an access point resolves to find your counterparty, so a value that fails its own check digit is undeliverable. This is a Peppol BIS Billing 3.0 profile rule: it applies because profile is \"peppol-bis-3\". It does not apply to the en16931, xrechnung-ubl or xrechnung-cii profiles, whose validators will accept the same document.",
  "fix": "Correct seller.electronicAddress, or change its scheme identifier if the value belongs to a different register. A check digit failing almost always means one digit was transposed or dropped in transcription — compare it against the source register rather than re-typing it.",
  "example": "\"electronicAddress\": { \"schemeId\": \"0184\", \"value\": \"DK12345678\" }",
  "xpath": "/ubl:Invoice/cac:AccountingSupplierParty/cac:Party/cbc:EndpointID",
  "docsUrl": "https://attestwire.com/rules/PEPPOL-COMMON-R042"
}

xpath is always a UBL path. On a CII invoice, look for the matching CII field instead.