BR-38 The document level charge at charges[0] states neither a reason (BT-104) nor a reason code (BT-105); both are empty
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.
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-104 / BT-105- Severity
fatal
What the library returns
The exact object in result.errors when this rule fires.
Generated by running @attestwire/en16931, not transcribed:
{
"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 locates the element in the generated UBL document,
which is where a KoSIT or Peppol validator will report the same problem.
A passing value
"charges": [{ "amount": 25.00, "vatCategory": "S", "vatRate": 19, "reason": "Freight service", "reasonCode": "FC" }]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.