Attestwire › Rule reference › BR-38
BR-38 Every document-level charge must state a reason or reason code
noun · EN 16931 · fatal · BT-104 / BT-105
For a sample invoice, the library reports: The document level charge at charges[0] states neither a reason (BT-104) nor a reason code (BT-105); both are empty.
- Business term
BT-104 / BT-105- Severity
fatal
The fix
Set charges[0].reason to a short description in the invoice language, or charges[0].reasonCode to a UNCL 7161 code, or both. Under XRechnung, prefer the free text: the mandated visualisation renders the code verbatim, so a buyer looking at the rendered invoice sees the bare code and not what it means.
A passing value
"charges": [{ "amount": 25.00, "vatCategory": "S", "vatRate": 19, "reason": "Freight service", "reasonCode": "FC" }]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-38",
"field": [
"BT-104",
"BT-105"
],
"severity": "fatal",
"message": "The document level charge at charges[0] states neither a reason (BT-104) nor a reason code (BT-105); both are empty. Every BG-21 group must carry at least one of them, because an unexplained addition to an invoice total is the single most disputed thing on a commercial document — the buyer's accounts-payable clerk has to decide whether to approve it, and \"+missing\" on its own gives them nothing to decide on.",
"fix": "Set charges[0].reason to a short description in the invoice language, or charges[0].reasonCode to a UNCL 7161 code, or both. Under XRechnung, prefer the free text: the mandated visualisation renders the code verbatim, so a buyer looking at the rendered invoice sees the bare code and not what it means.",
"example": "\"charges\": [{ \"amount\": 25.00, \"vatCategory\": \"S\", \"vatRate\": 19, \"reason\": \"Freight service\", \"reasonCode\": \"FC\" }]",
"xpath": "/ubl:Invoice/cac:AllowanceCharge[1]/cbc:AllowanceChargeReason",
"docsUrl": "https://attestwire.com/rules/BR-38"
}
xpath is always a UBL path. On a CII invoice, look for the
matching CII field instead.