Rule reference

BR-37 The document level charge at charges[0] has no VAT category code (BT-102): you supplied missing

The document level charge at charges[0] has no VAT category code (BT-102): you supplied missing. A document level charge is not a neutral adjustment to a total — it enters the VAT breakdown on its own account, adding to the taxable amount (BT-116) of exactly one category-and-rate group. Without a category there is no group to put it in, and the document's VAT would silently disagree with its totals.

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-102
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-37",
  "field": "BT-102",
  "severity": "fatal",
  "message": "The document level charge at charges[0] has no VAT category code (BT-102): you supplied missing. A document level charge is not a neutral adjustment to a total — it enters the VAT breakdown on its own account, adding to the taxable amount (BT-116) of exactly one category-and-rate group. Without a category there is no group to put it in, and the document's VAT would silently disagree with its totals.",
  "fix": "Set charges[0].vatCategory to the category of the supply this charge relates to — \"S\" Standard rated, \"Z\" Zero rated, \"E\" Exempt from VAT, \"AE\" Reverse charge, \"K\" Intra-community supply, \"G\" Export outside the EU, \"O\" Not subject to VAT, \"L\" Canary Islands general indirect tax (IGIC), \"M\" Tax on production, services and imports in Ceuta and Melilla (IPSI) — which should normally be the category of the lines it adjusts.",
  "example": "\"vatCategory\": \"S\", \"vatRate\": 19",
  "xpath": "/ubl:Invoice/cac:AllowanceCharge[1]/cac:TaxCategory/cbc:ID",
  "docsUrl": "https://attestwire.com/rules/BR-37"
}

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
"vatCategory": "S", "vatRate": 19

The fix

Set charges[0].vatCategory to the category of the supply this charge relates to — "S" Standard rated, "Z" Zero rated, "E" Exempt from VAT, "AE" Reverse charge, "K" Intra-community supply, "G" Export outside the EU, "O" Not subject to VAT, "L" Canary Islands general indirect tax (IGIC), "M" Tax on production, services and imports in Ceuta and Melilla (IPSI) — which should normally be the category of the lines it adjusts.

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