Rule reference

BR-16 An invoice must have at least one invoice line (BG-25)

An invoice must have at least one invoice line (BG-25). A document with no lines has no taxable supply to describe, so it cannot be an invoice — even if its totals are zero.

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
BG-25
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-16",
  "field": "BG-25",
  "severity": "fatal",
  "message": "An invoice must have at least one invoice line (BG-25). A document with no lines has no taxable supply to describe, so it cannot be an invoice — even if its totals are zero.",
  "fix": "Add at least one entry to lines. To invoice a flat fee, use quantity 1 with unitCode \"C62\" (one/piece) and the fee as unitPrice.",
  "example": "\"lines\": [{ \"id\": \"1\", \"description\": \"Retainer\", \"quantity\": 1, \"unitCode\": \"C62\", \"unitPrice\": 500, \"vatCategory\": \"S\", \"vatRate\": 19 }]",
  "xpath": "/ubl:Invoice/cac:InvoiceLine",
  "docsUrl": "https://attestwire.com/rules/BR-16"
}

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
"lines": [{ "id": "1", "description": "Retainer", "quantity": 1, "unitCode": "C62", "unitPrice": 500, "vatCategory": "S", "vatRate": 19 }]

The fix

Add at least one entry to lines. To invoice a flat fee, use quantity 1 with unitCode "C62" (one/piece) and the fee as unitPrice.

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