Rule reference

BR-21 A line has no invoice line identifier (BT-126)

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.

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-126
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-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 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
"id": "1"

The fix

Set line.id. Sequential strings ("1", "2", "3") are conventional and sufficient.

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