Rule reference

BR-22 A line has no invoiced quantity (BT-129)

Line 1 has no invoiced quantity (BT-129). The quantity is a required factor of the line net amount, so it must be present even when it is 1.

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-129
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-22",
  "field": "BT-129",
  "severity": "fatal",
  "message": "Line 1 has no invoiced quantity (BT-129). The quantity is a required factor of the line net amount, so it must be present even when it is 1.",
  "fix": "Set line.quantity to a number. For a flat fee or a subscription period, use 1.",
  "example": "\"quantity\": 10",
  "xpath": "/ubl:Invoice/cac:InvoiceLine[1]/cbc:InvoicedQuantity",
  "docsUrl": "https://attestwire.com/rules/BR-22"
}

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
"quantity": 10

The fix

Set line.quantity to a number. For a flat fee or a subscription period, use 1.

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