Attestwire › Rule reference › ATW-VAT-SCENARIO-UNKNOWN

ATW-VAT-SCENARIO-UNKNOWN A vatScenario must be one of the five scenarios this build knows

noun · Attestwire · fatal · BT-151

For a sample invoice, the library reports: Line 1 states vatScenario "domestic-ish", which is not one of the five scenarios this build knows: "domestic", "intra-eu-goods", "intra-eu-services", "export" and "small-business-exemption". Nothing was filled in from it, so the line has no VAT category.

Business term
BT-151
Severity
fatal

The fix

Set lines[0].vatScenario to one of the five, or remove it and state vatCategory (and vatRate) yourself.

A passing value

the shape this field expects
"vatScenario": "domestic"

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": "ATW-VAT-SCENARIO-UNKNOWN",
  "field": "BT-151",
  "severity": "fatal",
  "message": "Line 1 states vatScenario \"domestic-ish\", which is not one of the five scenarios this build knows: \"domestic\", \"intra-eu-goods\", \"intra-eu-services\", \"export\" and \"small-business-exemption\". Nothing was filled in from it, so the line has no VAT category.",
  "fix": "Set lines[0].vatScenario to one of the five, or remove it and state vatCategory (and vatRate) yourself.",
  "example": "\"vatScenario\": \"domestic\"",
  "xpath": "/ubl:Invoice/cac:InvoiceLine[1]/cac:Item/cac:ClassifiedTaxCategory/cbc:ID",
  "docsUrl": "https://github.com/attestwire/en16931#not-implemented-yet"
}

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