Attestwire › Rule reference › BR-DEC-17
BR-DEC-17 The rounding amount may have at most two decimals
noun · EN 16931 · fatal · BT-114
For a sample invoice, the library reports: The rounding amount (BT-114) is 0.005, which carries 3 decimals; EN 16931 allows at most 2.
- Business term
BT-114- Severity
fatal
The fix
Round roundingAmount to 2 decimals. Derive it as the difference between the rounded payable figure and BT-112 minus BT-113, rather than carrying an unrounded remainder into the field.
A passing value
"roundingAmount": -0.03What 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-17",
"field": "BT-114",
"severity": "fatal",
"message": "The rounding amount (BT-114) is 0.005, which carries 3 decimals; EN 16931 allows at most 2. BT-114 is the small correction added to make the payable amount a convenient figure — a few cents up or down, or the five-cent rounding some cash regimes require — so a rounding amount that is itself unrounded is a contradiction in terms, and one that leaves BT-115 no rounder than it started. The value may be negative; only the precision is constrained.",
"fix": "Round roundingAmount to 2 decimals. Derive it as the difference between the rounded payable figure and BT-112 minus BT-113, rather than carrying an unrounded remainder into the field.",
"example": "\"roundingAmount\": -0.03",
"xpath": "/ubl:Invoice/cac:LegalMonetaryTotal/cbc:PayableRoundingAmount",
"docsUrl": "https://attestwire.com/rules/BR-DEC-17"
}
xpath is always a UBL path. On a CII invoice, look for the
matching CII field instead.