Maximum of two decimal places for the taxable amount

Error BR-DEC-19 EN 16931

The allowed maximum number of decimals for the VAT category taxable amount (BT-116) is 2.

Mandatory rule: As long as it is violated, the invoice is invalid and will be rejected by validators.
What is wrong

ram:BasisAmount contains more than two digits after the decimal point. The taxable amount (BT-116) may have no more than two decimal places.

What the rule means

The two-decimal limit ensures consistent decimal precision for the taxable amount in the VAT breakdown.

Affected fields BT-116
Please limit the taxable amount to two decimal places

The taxable amount in ram:BasisAmount has more than two decimal places. Reduce or round the value to no more than two decimal places.

What to do
  1. Check the value in ram:BasisAmount.
  2. Limit the decimal places to no more than two.
  3. Generate the invoice again and validate it once more.
What it looks like
✗ Triggers the message
<ram:ApplicableTradeTax>
  <ram:BasisAmount>100.001</ram:BasisAmount>
</ram:ApplicableTradeTax>
✓ Correct
<ram:ApplicableTradeTax>
  <ram:BasisAmount>100.00</ram:BasisAmount>
</ram:ApplicableTradeTax>
Technical details

The test counts the characters after the decimal point in ram:BasisAmount and permits no more than two.

Where the rule applies

The rule applies to ram:BasisAmount within each ram:ApplicableTradeTax in the invoice header settlement data.

Context (rule/@context)
//ram:ApplicableHeaderTradeSettlement/ram:ApplicableTradeTax
Test expression (assert/@test)
string-length(substring-after(ram:BasisAmount,'.'))<=2