AttestwireRule referenceBR-36

BR-36 Every document-level charge must have an amount

noun · EN 16931 · fatal · BT-99

For a sample invoice, the library reports: The document level charge at charges[0] has no usable charge amount (BT-99): you supplied missing.

Business term
BT-99
Severity
fatal

The fix

Set charges[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.

A passing value

the shape this field expects
"charges": [{ "amount": 25.00, "vatCategory": "S", "vatRate": 19, "reason": "Freight" }]

What 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:

TeachingError
{
  "rule": "BR-36",
  "field": "BT-99",
  "severity": "fatal",
  "message": "The document level charge at charges[0] has no usable charge amount (BT-99): you supplied missing. Each BG-21 group must have one, because it is the only figure that actually moves money — the percentage (BT-101) and base amount (BT-100) are documentation of how the figure was reached, not substitutes for it, and BT-108 is the sum of these amounts under BR-CO-12.",
  "fix": "Set charges[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": "\"charges\": [{ \"amount\": 25.00, \"vatCategory\": \"S\", \"vatRate\": 19, \"reason\": \"Freight\" }]",
  "xpath": "/ubl:Invoice/cac:AllowanceCharge[1]/cbc:Amount",
  "docsUrl": "https://attestwire.com/rules/BR-36"
}

xpath is always a UBL path. On a CII invoice, look for the matching CII field instead.