BR-54 Item attribute 1 on line 1 has neither a name (BT-160) nor a value (BT-161)
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.
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-160 / BT-161- Severity
fatal
What the library returns
The exact object in result.errors when this rule fires.
Generated by running @attestwire/en16931, not transcribed:
{
"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 locates the element in the generated UBL document,
which is where a KoSIT or Peppol validator will report the same problem.
A passing value
"itemAttributes": [{ "name": "Farbe", "value": "anthrazit" }]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.