Attestwire › Rule reference › ATW-VAT-RATE-FRACTION
ATW-VAT-RATE-FRACTION A VAT rate is a percentage: 19% is 19, not 0.19
noun · Attestwire · warning · BT-152
For a sample invoice, the library reports: lines[0] has a VAT rate of 0.19 in category S (Standard rated), which the invoice states as 0.19%. VAT rates are percentages and no EU VAT rate is below 1%, so this is usually a rate kept as a fraction and passed through unconverted: as a percentage, 0.19 is 19%.
- Business term
BT-152- Severity
warning
The fix
If you meant 19%, set lines[0].vatRate to 19: multiply a rate your system stores as a fraction by 100 before it reaches the invoice. If 0.19% really is the rate, leave it; this is a warning, and the regulation allows the value.
A passing value
"vatCategory": "S", "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-RATE-FRACTION",
"field": "BT-152",
"severity": "warning",
"message": "lines[0] has a VAT rate of 0.19 in category S (Standard rated), which the invoice states as 0.19%. VAT rates are percentages and no EU VAT rate is below 1%, so this is usually a rate kept as a fraction and passed through unconverted: as a percentage, 0.19 is 19%. On 150.00 EUR that is 0.29 of VAT; at 19% it would be 28.50.",
"fix": "If you meant 19%, set lines[0].vatRate to 19: multiply a rate your system stores as a fraction by 100 before it reaches the invoice. If 0.19% really is the rate, leave it; this is a warning, and the regulation allows the value.",
"example": "\"vatCategory\": \"S\", \"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.