Rule reference

BR-31 The document level allowance at allowances[0] has no usable allowance amount (BT-92): you supplied missing

The document level allowance at allowances[0] has no usable allowance amount (BT-92): you supplied missing. Each BG-20 group must have one, because it is the only figure that actually moves money — the percentage (BT-94) and base amount (BT-93) are documentation of how the figure was reached, not substitutes for it, and BT-107 is the sum of these amounts under BR-CO-11.

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-92
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-31",
  "field": "BT-92",
  "severity": "fatal",
  "message": "The document level allowance at allowances[0] has no usable allowance amount (BT-92): you supplied missing. Each BG-20 group must have one, because it is the only figure that actually moves money — the percentage (BT-94) and base amount (BT-93) are documentation of how the figure was reached, not substitutes for it, and BT-107 is the sum of these amounts under BR-CO-11.",
  "fix": "Set allowances[0].amount to a positive number of EUR — always positive, even for an allowance: it is the array the entry sits in, not its sign, that decides whether the figure is deducted or added.",
  "example": "\"allowances\": [{ \"amount\": 25.00, \"vatCategory\": \"S\", \"vatRate\": 19, \"reason\": \"Volume discount\" }]",
  "xpath": "/ubl:Invoice/cac:AllowanceCharge[1]/cbc:Amount",
  "docsUrl": "https://attestwire.com/rules/BR-31"
}

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
"allowances": [{ "amount": 25.00, "vatCategory": "S", "vatRate": 19, "reason": "Volume discount" }]

The fix

Set allowances[0].amount to a positive number of EUR — always positive, even for an allowance: it is the array the entry sits in, not its sign, that decides whether the figure is deducted or added.

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