Attestwire › Rule reference › ATW-VAT-RATE-OUT-OF-RANGE
ATW-VAT-RATE-OUT-OF-RANGE A VAT rate must be between -100% and 100%
noun · Attestwire · fatal · BG-25
For a sample invoice, the library reports: lines[0].vatRate is 1e+308%. No VAT regime charges more than the price itself, and a rate this size cannot be computed exactly.
- Business term
BG-25- Severity
fatal
The fix
Set the rate as a percentage: 19 for 19%, not 0.19 or 1900.
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:
{
"rule": "ATW-VAT-RATE-OUT-OF-RANGE",
"field": "BG-25",
"severity": "fatal",
"message": "lines[0].vatRate is 1e+308%. No VAT regime charges more than the price itself, and a rate this size cannot be computed exactly.",
"fix": "Set the rate as a percentage: 19 for 19%, not 0.19 or 1900.",
"docsUrl": "https://github.com/attestwire/en16931#not-implemented-yet"
}