Attestwire › Rule reference › BR-21
BR-21 Every invoice line must have a line identifier
noun · EN 16931 · fatal · BT-126
For a sample invoice, the library reports: Line 1 has no invoice line identifier (BT-126). Every line needs an identifier that is unique within the document, because allowances, charges and dispute references all point at lines by this value.
- Business term
BT-126- Severity
fatal
The fix
Set line.id. Sequential strings ("1", "2", "3") are conventional and sufficient.
A passing value
"id": "1"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:
{
"rule": "BR-21",
"field": "BT-126",
"severity": "fatal",
"message": "Line 1 has no invoice line identifier (BT-126). Every line needs an identifier that is unique within the document, because allowances, charges and dispute references all point at lines by this value.",
"fix": "Set line.id. Sequential strings (\"1\", \"2\", \"3\") are conventional and sufficient.",
"example": "\"id\": \"1\"",
"xpath": "/ubl:Invoice/cac:InvoiceLine[1]/cbc:ID",
"docsUrl": "https://attestwire.com/rules/BR-21"
}
xpath is always a UBL path. On a CII invoice, look for the
matching CII field instead.