AttestwireRule referenceBR-CL-18

BR-CL-18 A line VAT category code must be a UNTDID 5305 code

noun · EN 16931 · fatal · BT-151

For a sample invoice, the library reports: Line 1 has an invoiced item VAT category code (BT-151) of "X", which is not in UNTDID 5305. EN 16931 admits exactly 10 codes: "AE", "L", "M", "E", "S", "Z", "G", "O", "K", "B".

Business term
BT-151
Severity
fatal

The fix

Use "S" standard rated, "Z" zero rated, "E" exempt, "AE" reverse charge, "K" intra-community supply, "G" export outside the EU, "O" not subject to VAT, "L" IGIC (Canary Islands) or "M" IPSI (Ceuta and Melilla). The tenth code, "B" (split payment, Italy), is a valid EN 16931 code that this build does not express.

A passing value

the shape this field expects
"vatCategory": "S", "vatRate": 19

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-CL-18",
  "field": "BT-151",
  "severity": "fatal",
  "message": "Line 1 has an invoiced item VAT category code (BT-151) of \"X\", which is not in UNTDID 5305. EN 16931 admits exactly 10 codes: \"AE\", \"L\", \"M\", \"E\", \"S\", \"Z\", \"G\", \"O\", \"K\", \"B\". The category is not a label — it selects which BR-S/BR-Z/BR-E/BR-AE/BR-IC/BR-G/BR-O family of rules the line and its VAT breakdown are judged by.",
  "fix": "Use \"S\" standard rated, \"Z\" zero rated, \"E\" exempt, \"AE\" reverse charge, \"K\" intra-community supply, \"G\" export outside the EU, \"O\" not subject to VAT, \"L\" IGIC (Canary Islands) or \"M\" IPSI (Ceuta and Melilla). The tenth code, \"B\" (split payment, Italy), is a valid EN 16931 code that this build does not express.",
  "example": "\"vatCategory\": \"S\", \"vatRate\": 19",
  "xpath": "/ubl:Invoice/cac:InvoiceLine[1]/cac:Item/cac:ClassifiedTaxCategory/cbc:ID",
  "docsUrl": "https://attestwire.com/rules/BR-CL-18"
}

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