Provide the taxable amount with no more than two decimal places

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

The value in ram:BasisAmount has more than two characters after the decimal point. The taxable amount (BT-116) may have no more than two decimal places.

What the rule means

The limit ensures that the taxable amount is expressed with no more than two decimal places.

Affected fields BT-116
Please enter the taxable amount with no more than two decimal places

The taxable amount in ram:BasisAmount has more than two decimal places. Adjust the value so that it has no more than two digits after the decimal point.

What to do
  1. Find the relevant ram:BasisAmount.
  2. Adjust the value so that no more than two digits follow the decimal point.
  3. Generate the invoice again and validate it once more.
What it looks like
✗ Triggers the message
<ram:BasisAmount>123.456</ram:BasisAmount>
✓ Correct
<ram:BasisAmount>123.45</ram:BasisAmount>
Technical details

The test counts the characters after the first period in the string value of ram:BasisAmount and allows no more than two.

Where the rule applies

The rule applies to ram:BasisAmount (BT-116) in the document-level VAT breakdown.

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