Attestwire › Rule reference › BR-DEC-19
BR-DEC-19 A VAT category taxable amount may have at most two decimals
noun · EN 16931 · fatal · BT-116
For a sample invoice, the library reports: The allowed maximum number of decimals for the VAT category taxable amount (BT-116) is 2, but the document writes in VAT breakdown group 1 "1500.000", which has 3.
- Business term
BT-116- Severity
fatal
The fix
Serialise the amount with exactly two decimal places. This is almost always a formatting setting rather than a data problem — a ledger or ORM emitting its native decimal scale (six places is the usual default) straight into the XML. Fixing it at the point of serialisation fixes every amount in the document at once.
A passing value
<cbc:TaxableAmount>1500.00</cbc:TaxableAmount>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": "BR-DEC-19",
"field": "BT-116",
"severity": "fatal",
"message": "The allowed maximum number of decimals for the VAT category taxable amount (BT-116) is 2, but the document writes in VAT breakdown group 1 \"1500.000\", which has 3. BR-DEC rules are measured on the serialised value, not on the number behind it: trailing zeros count, so \"1500.000\" fails even though it is arithmetically identical to a two-decimal amount and every total in the document still balances. The taxable amount is a sum of already-rounded line amounts, less already-rounded document allowances, plus already-rounded document charges.",
"fix": "Serialise the amount with exactly two decimal places. This is almost always a formatting setting rather than a data problem — a ledger or ORM emitting its native decimal scale (six places is the usual default) straight into the XML. Fixing it at the point of serialisation fixes every amount in the document at once.",
"example": "<cbc:TaxableAmount>1500.00</cbc:TaxableAmount>",
"xpath": "/ubl:Invoice/cac:TaxTotal/cac:TaxSubtotal[1]/cbc:TaxableAmount",
"docsUrl": "https://attestwire.com/rules/BR-DEC-19"
}
xpath is always a UBL path. On a CII invoice, look for the
matching CII field instead.