{
  "id": "BR-CL-01",
  "country": "EU",
  "syntax": "ubl",
  "group": "code-list",
  "severity": "fatal",
  "severity_note": "fatal, from the Flag column of the Peppol BIS Billing 3.0 UBL rules index retrieved 2026-10-18.",
  "spec": "Peppol BIS Billing 3.0, May 2026 release, EN 16931 model bound to UBL",
  "statement": "The document type code MUST be coded by the invoice and credit note related code lists of UNTDID 1001.",
  "statement_lang": "en",
  "context": "cbc:InvoiceTypeCode | cbc:CreditNoteTypeCode",
  "test": "(self::cbc:InvoiceTypeCode and ((not(contains(normalize-space(.), ' ')) and contains(' 71 80 81 82 84 102 130 202 203 204 211 218 219 295 325 326 331 380 382 383 384 385 386 387 388 389 390 393 394 395 456 457 471 472 473 500 501 527 553 575 623 633 751 780 817 870 875 876 877 935 ', concat(' ', normalize-space(.), ' '))))) or (self::cbc:CreditNoteTypeCode and ((not(contains(normalize-space(.), ' ')) and contains(' 81 83 261 262 296 308 381 396 420 458 502 503 532 ', concat(' ', normalize-space(.), ' ')))))",
  "meaning": "The document type code must use the invoice and credit note code lists of UNTDID 1001. The statement says MUST and ends with a period. The context is cbc:InvoiceTypeCode or cbc:CreditNoteTypeCode, with spaces around the bar. The invoice branch checks self::cbc:InvoiceTypeCode. The credit-note branch checks self::cbc:CreditNoteTypeCode. Both branches reject a value that contains a space, then look the value up in that list. Neither branch calls exists.",
  "fix": "Put an invoice type code from the invoice list of UNTDID 1001 on cbc:InvoiceTypeCode, or a credit note type code from the credit note list on cbc:CreditNoteTypeCode. Do not put a space in the code.",
  "example_fail": "The invoice type code contains a space, or it is not in the invoice list of UNTDID 1001.",
  "example_pass": "The invoice type code is 380, with no space. A credit note type code of 381, with no space, passes the credit-note branch.",
  "example_note": "Illustration of the condition in the official statement. Not an example published by the source.",
  "source_url": "https://docs.peppol.eu/poacc/billing/3.0/rules/ubl-tc434/BR-CL-01/",
  "source_retrieved": "2026-10-18",
  "last_verified": "2026-10-18"
}
