Attestwire › Rule reference › ATW-VAT-SCENARIO-FACT-MISSING
ATW-VAT-SCENARIO-FACT-MISSING A vatScenario needs a fact the invoice does not state
noun · Attestwire · fatal · BT-152
For a sample invoice, the library reports: Line 1 follows vatScenario "domestic" and states no vatRate. A domestic supply is taxed at the standard rate or at a reduced one, and which applies depends on what was sold, so the rate (BT-152) is never guessed: it has to come from you.
- Business term
BT-152- Severity
fatal
The fix
Set lines[0].vatRate to the percentage that applies to it, for example 19 or 7 in Germany, or 20, 10 or 5.5 in France.
A passing value
"vatScenario": "domestic", "vatRate": 19What 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:
{
"rule": "ATW-VAT-SCENARIO-FACT-MISSING",
"field": "BT-152",
"severity": "fatal",
"message": "Line 1 follows vatScenario \"domestic\" and states no vatRate. A domestic supply is taxed at the standard rate or at a reduced one, and which applies depends on what was sold, so the rate (BT-152) is never guessed: it has to come from you. Without it the line is standard rated with no rate, which EN 16931 rejects (BR-S-05).",
"fix": "Set lines[0].vatRate to the percentage that applies to it, for example 19 or 7 in Germany, or 20, 10 or 5.5 in France.",
"example": "\"vatScenario\": \"domestic\", \"vatRate\": 19",
"xpath": "/ubl:Invoice/cac:InvoiceLine[1]/cac:Item/cac:ClassifiedTaxCategory/cbc:Percent",
"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.