Limit decimals in the net total

Error BR-DEC-09 EN 16931

The allowed maximum number of decimals for the Sum of Invoice line net amount (BT-106) is 2.

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

LineTotalAmount contains more than two digits after the decimal separator.

What the rule means

The sum of invoice line net amounts may have no more than two decimal places.

Affected fields BT-106
Please limit the decimal places in the net total

LineTotalAmount has more decimal places than allowed for the net total. You can adjust the amount to no more than two decimal places.

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

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

Where the rule applies

The rule applies to LineTotalAmount, the sum of invoice line net amounts in SpecifiedTradeSettlementHeaderMonetarySummation.

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