Attestwire › Rule reference › BR-54
BR-54 Every item attribute must have both a name and a value
noun · EN 16931 · fatal · BT-160 / BT-161
For a sample invoice, the library reports: Item attribute 1 on line 1 has neither a name (BT-160) nor a value (BT-161). BG-32 is a name/value pair and EN 16931 requires both halves, because half a pair carries no information at all: a value with no name is a number nobody can interpret, and a name with no value is a question.
- Business term
BT-160 / BT-161- Severity
fatal
The fix
Give every entry in line.itemAttributes both a name and a value, or drop the entry. Put unstructured detail in line.longDescription (BT-154) instead.
A passing value
"itemAttributes": [{ "name": "Farbe", "value": "anthrazit" }]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-54",
"field": [
"BT-160",
"BT-161"
],
"severity": "fatal",
"message": "Item attribute 1 on line 1 has neither a name (BT-160) nor a value (BT-161). BG-32 is a name/value pair and EN 16931 requires both halves, because half a pair carries no information at all: a value with no name is a number nobody can interpret, and a name with no value is a question. These attributes are what a buyer's catalogue matching reads to confirm that the thing invoiced is the thing ordered — colour, capacity, licence term — so an unmatched half silently breaks that check rather than failing it visibly.",
"fix": "Give every entry in line.itemAttributes both a name and a value, or drop the entry. Put unstructured detail in line.longDescription (BT-154) instead.",
"example": "\"itemAttributes\": [{ \"name\": \"Farbe\", \"value\": \"anthrazit\" }]",
"xpath": "/ubl:Invoice/cac:InvoiceLine[1]/cac:Item/cac:AdditionalItemProperty[1]/cbc:Name",
"docsUrl": "https://attestwire.com/rules/BR-54"
}
xpath is always a UBL path. On a CII invoice, look for the
matching CII field instead.