Maximum of two decimal places for the VAT amount

Error BR-DEC-20 EN 16931

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

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

The value in ram:CalculatedAmount has more than two digits after the decimal point. The tax amount in the VAT breakdown may have no more than two decimal places.

What the rule means

The tax amount in a VAT breakdown is represented as a monetary amount with no more than two decimal places.

Affected fields BT-117
Please enter the VAT amount with no more than two decimal places

The VAT amount in ram:CalculatedAmount has too many decimal places. You can limit the value to no more than two decimal places.

What to do
  1. Find the relevant VAT breakdown ram:ApplicableTradeTax.
  2. Check the value in ram:CalculatedAmount.
  3. Enter the tax amount with no more than two decimal places.
  4. Generate the invoice again and validate it again.
What it looks like
✗ Triggers the message
<ram:ApplicableTradeTax>
  <ram:CalculatedAmount>12.345</ram:CalculatedAmount>
</ram:ApplicableTradeTax>
✓ Correct
<ram:ApplicableTradeTax>
  <ram:CalculatedAmount>12.34</ram:CalculatedAmount>
</ram:ApplicableTradeTax>
Technical details

The test checks the length of the text after the period in ram:CalculatedAmount; no more than two characters are allowed.

Where the rule applies

The rule applies to the tax amount ram:CalculatedAmount in each document-level VAT breakdown ram:ApplicableTradeTax.

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