Limit decimals in the invoice total including 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

GrandTotalAmount contains more than two digits after the decimal separator.

What the rule means

The invoice total including VAT may have no more than two decimal places.

Affected fields BT-112
Please limit the decimal places in the invoice total including VAT

GrandTotalAmount has more decimal places than allowed for the invoice total including VAT. You can adjust the amount to no more than two decimal places.

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

The XPath counts the characters after the decimal point in GrandTotalAmount and allows no more than two.

Where the rule applies

The rule applies to GrandTotalAmount, the invoice total including VAT in SpecifiedTradeSettlementHeaderMonetarySummation.

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