Use no more than two decimal places for the amount with VAT

Error BR-DEC-14 EN 16931

The allowed maximum number of decimals for the Invoice total amount with VAT (BT-112) is 2.

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

ram:GrandTotalAmount contains more than two characters after the decimal point. The invoice total amount with VAT therefore exceeds the permitted number of decimal places.

What the rule means

The invoice total amount with VAT may have no more than two decimal places. This keeps its stated precision within the limit set for this amount.

Affected fields BT-112
Please limit the decimal places of the amount with VAT

ram:GrandTotalAmount has more than two decimal places. Adjust the value so that no more than two digits follow the decimal point.

What to do
  1. Check the value of ram:GrandTotalAmount.
  2. Limit the decimal places to no more than two.
  3. Check the value of GrandTotalAmount.
  4. Generate the invoice again and validate it again.
What it looks like
✗ Triggers the message
<ram:SpecifiedTradeSettlementHeaderMonetarySummation>
  <ram:GrandTotalAmount>119.123</ram:GrandTotalAmount>
</ram:SpecifiedTradeSettlementHeaderMonetarySummation>
✓ Correct
<ram:SpecifiedTradeSettlementHeaderMonetarySummation>
  <ram:GrandTotalAmount>119.12</ram:GrandTotalAmount>
</ram:SpecifiedTradeSettlementHeaderMonetarySummation>
Check in FactoorSharp
  • FacturXInvoice.GrandTotalAmount (BT-112)
Technical details

The test counts the characters after the first decimal point in ram:GrandTotalAmount and requires a length of no more than two.

Where the rule applies

The rule checks ram:GrandTotalAmount in the totals of ram:SpecifiedTradeSettlementHeaderMonetarySummation.

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