Attestwire › Rule reference › BR-43
BR-43 Every line charge must have an amount
noun · EN 16931 · fatal · BT-141
For a sample invoice, the library reports: The invoice line charge at lines[0].charges[0], on line 1 (id "1"), has no usable amount (BT-141): you supplied missing.
- Business term
BT-141- Severity
fatal
The fix
Set lines[0].charges[0].amount to a positive number. Line level entries have no VAT category of their own: they inherit the line's, which is why a line discount changes BT-131 rather than appearing in the VAT breakdown on its own account.
A passing value
"charges": [{ "amount": 12.50, "reason": "Handling" }]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:
{
"rule": "BR-43",
"field": "BT-141",
"severity": "fatal",
"message": "The invoice line charge at lines[0].charges[0], on line 1 (id \"1\"), has no usable amount (BT-141): you supplied missing. Each BG-28 group must have one, and at line level the consequence is immediate — the line net amount is BT-129 x (BT-146 / BT-149) − Σ BT-136 + Σ BT-141, so an entry with no amount silently contributes nothing and the line total the buyer sees is not the one you meant to send.",
"fix": "Set lines[0].charges[0].amount to a positive number. Line level entries have no VAT category of their own: they inherit the line's, which is why a line discount changes BT-131 rather than appearing in the VAT breakdown on its own account.",
"example": "\"charges\": [{ \"amount\": 12.50, \"reason\": \"Handling\" }]",
"xpath": "/ubl:Invoice/cac:InvoiceLine[1]/cac:AllowanceCharge[2]/cbc:Amount",
"docsUrl": "https://attestwire.com/rules/BR-43"
}
xpath is always a UBL path. On a CII invoice, look for the
matching CII field instead.