AttestwireRule referenceBR-O-11

BR-O-11 A not-subject-to-VAT invoice can have no other VAT breakdown group

noun · EN 16931 · fatal · BT-118

For a sample invoice, the library reports: This invoice contains a VAT breakdown group (BG-23) with the VAT category code (BT-118) "Not subject to VAT", so it must not contain any other VAT breakdown group — but your lines, document level allowances and document level charges also produce "S".

Business term
BT-118
Severity
fatal

The fix

Split the document. Put everything in category O on its own invoice, and the S lines, allowances and charges on another. There is no way to express a mixed document here, and none is intended: BR-O-11, BR-O-12, BR-O-13 and BR-O-14 close every route to it.

A passing value

the shape this field expects
"lines": [{ "id": "1", "description": "Statutory levy", "quantity": 1, "unitCode": "C62", "unitPrice": 100, "vatCategory": "O" }]

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-O-11",
  "field": "BT-118",
  "severity": "fatal",
  "message": "This invoice contains a VAT breakdown group (BG-23) with the VAT category code (BT-118) \"Not subject to VAT\", so it must not contain any other VAT breakdown group — but your lines, document level allowances and document level charges also produce \"S\". \"Not subject to VAT\" is a statement about the whole document: the transaction falls outside the scope of VAT altogether, which cannot be true of the invoice and false of one figure on it.",
  "fix": "Split the document. Put everything in category O on its own invoice, and the S lines, allowances and charges on another. There is no way to express a mixed document here, and none is intended: BR-O-11, BR-O-12, BR-O-13 and BR-O-14 close every route to it.",
  "example": "\"lines\": [{ \"id\": \"1\", \"description\": \"Statutory levy\", \"quantity\": 1, \"unitCode\": \"C62\", \"unitPrice\": 100, \"vatCategory\": \"O\" }]",
  "xpath": "/ubl:Invoice/cac:TaxTotal/cac:TaxSubtotal/cac:TaxCategory/cbc:ID",
  "docsUrl": "https://attestwire.com/rules/BR-O-11"
}

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