Attestwire › Rule reference › BR-22
BR-22 Every invoice line must have an invoiced quantity
noun · EN 16931 · fatal · BT-129
For a sample invoice, the library reports: 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.
- Business term
BT-129- Severity
fatal
The fix
Set line.quantity to a number. For a flat fee or a subscription period, use 1.
A passing value
"quantity": 10What 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-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 is always a UBL path. On a CII invoice, look for the
matching CII field instead.