AttestwireRule referenceBR-CL-11

BR-CL-11 A legal registration identifier scheme must be an ISO 6523 ICD code

noun · EN 16931 · fatal · BT-30

For a sample invoice, the library reports: The scheme identifier on the seller legal registration identifier (BT-30-1) is "9930", which is not in the ISO 6523 ICD list.

Business term
BT-30
Severity
fatal

The fix

Set seller.legalRegistrationSchemeId to an ISO 6523 ICD code: "0088" GLN, "0060" D-U-N-S, "0037" Finnish OVT, "0106" Dutch KvK/OIN, "0198" Danish CVR, "0204" German Leitweg-ID, "0002" French SIRENE. Do not put the register's name here as free text — the attribute is a code, and a name fails the list test however accurate it is.

A passing value

the shape this field expects
"legalRegistrationId": "HRB 12345", "legalRegistrationSchemeId": "0198"

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": "BR-CL-11",
  "field": "BT-30",
  "severity": "fatal",
  "message": "The scheme identifier on the seller legal registration identifier (BT-30-1) is \"9930\", which is not in the ISO 6523 ICD list. A legal registration identifier is the number a company is entered under in a commercial register, and every member state runs its own — a German HRB number, a French SIREN and a Dutch KvK number are all \"the registration number\" and none of them means anything without the register being named. The scheme is what names it. Note that the scheme is optional: if you cannot map your register to an ICD code, leave it unset and emit the bare number rather than guessing.",
  "fix": "Set seller.legalRegistrationSchemeId to an ISO 6523 ICD code: \"0088\" GLN, \"0060\" D-U-N-S, \"0037\" Finnish OVT, \"0106\" Dutch KvK/OIN, \"0198\" Danish CVR, \"0204\" German Leitweg-ID, \"0002\" French SIRENE. Do not put the register's name here as free text — the attribute is a code, and a name fails the list test however accurate it is.",
  "example": "\"legalRegistrationId\": \"HRB 12345\", \"legalRegistrationSchemeId\": \"0198\"",
  "xpath": "/ubl:Invoice/cac:AccountingSupplierParty/cac:Party/cac:PartyLegalEntity/cbc:CompanyID/@schemeID",
  "docsUrl": "https://attestwire.com/rules/BR-CL-11"
}

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