AttestwireRule referenceBR-O-05

BR-O-05 Lines not subject to VAT must not have a VAT rate at all

noun · EN 16931 · fatal · BT-152

For a sample invoice, the library reports: Line 1 uses VAT category O (not subject to VAT), so it must not carry an invoiced item VAT rate (BT-152) at all — not even 0. "Outside the scope of VAT" means the transaction has no rate, which is a different statement from "the rate is zero".

Business term
BT-152
Severity
fatal

The fix

Remove vatRate from this line. If the supply is inside the scope of VAT but taxed at 0%, use category Z instead.

A passing value

the shape this field expects
"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-05",
  "field": "BT-152",
  "severity": "fatal",
  "message": "Line 1 uses VAT category O (not subject to VAT), so it must not carry an invoiced item VAT rate (BT-152) at all — not even 0. \"Outside the scope of VAT\" means the transaction has no rate, which is a different statement from \"the rate is zero\".",
  "fix": "Remove vatRate from this line. If the supply is inside the scope of VAT but taxed at 0%, use category Z instead.",
  "example": "\"vatCategory\": \"O\"",
  "xpath": "/ubl:Invoice/cac:InvoiceLine[1]/cac:Item/cac:ClassifiedTaxCategory/cbc:Percent",
  "docsUrl": "https://attestwire.com/rules/BR-O-05"
}

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