Limit decimals in the allowance total

Error BR-DEC-10 EN 16931

The allowed maximum number of decimals for the Sum of allowances on document level (BT-107) is 2.

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

AllowanceTotalAmount contains more than two digits after the decimal separator.

What the rule means

The sum of document-level allowances may have no more than two decimal places.

Affected fields BT-107
Please limit the decimal places in the allowance total

AllowanceTotalAmount has more decimal places than allowed for the document-level allowance total. You can adjust the amount to no more than two decimal places.

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

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

Where the rule applies

The rule applies to AllowanceTotalAmount, the sum of document-level allowances in SpecifiedTradeSettlementHeaderMonetarySummation.

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