Rule reference

BR-CL-08 The invoice note subject code (BT-21) is "ZZ9", which is not in UNCL 4451 (383 codes)

The invoice note subject code (BT-21) is "ZZ9", which is not in UNCL 4451 (383 codes). UBL has no element for BT-21 at all: EN 16931's binding prefixes the code onto the note itself, so this library writes cbc:Note as "#ZZ9#" followed by your note text, and the validator parses it back out of that string.

This rule is implemented and its error payload below is real, but the long-form write-up — normative text, worked example, divergence note — is not written yet. Everything the library knows about this rule is on this page. Ask and we will prioritise it.

Business term
BT-21
Severity
fatal

What the library returns

The exact object in result.errors when this rule fires. Generated by running @attestwire/en16931, not transcribed:

TeachingError
{
  "rule": "BR-CL-08",
  "field": "BT-21",
  "severity": "fatal",
  "message": "The invoice note subject code (BT-21) is \"ZZ9\", which is not in UNCL 4451 (383 codes). UBL has no element for BT-21 at all: EN 16931's binding prefixes the code onto the note itself, so this library writes cbc:Note as \"#ZZ9#\" followed by your note text, and the validator parses it back out of that string.",
  "fix": "Set noteSubjectCode to a three-letter UNCL 4451 qualifier — \"AAI\" general information, \"REG\" regulatory information, \"ABL\" governing law, \"TXD\" tax declaration, \"PMT\" payment information, \"ACB\" additional information. Leave it unset if the note needs no subject; a plain note is perfectly valid.",
  "example": "\"note\": \"Leistungszeitraum Juli 2026\", \"noteSubjectCode\": \"AAI\"",
  "xpath": "/ubl:Invoice/cbc:Note",
  "docsUrl": "https://attestwire.com/rules/BR-CL-08"
}

xpath locates the element in the generated UBL document, which is where a KoSIT or Peppol validator will report the same problem.

A passing value

the shape this field expects
"note": "Leistungszeitraum Juli 2026", "noteSubjectCode": "AAI"

The fix

Set noteSubjectCode to a three-letter UNCL 4451 qualifier — "AAI" general information, "REG" regulatory information, "ABL" governing law, "TXD" tax declaration, "PMT" payment information, "ACB" additional information. Leave it unset if the note needs no subject; a plain note is perfectly valid.

Arrived from a stack trace? The docsUrl on every error links straight here. Something wrong on this page — tell us.