Maximum two decimal places for document-level allowances 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

The value in AllowanceTotalAmount has more than two decimal places.

What the rule means

The total of document-level allowances is stated with no more than two decimal places. This ensures a consistent decimal format for this monetary amount.

Affected fields BT-107
Please state the document-level allowances total with no more than two decimal places

The document-level allowances total has more than two decimal places. You can adjust the value to the permitted decimal format.

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

The XPath check counts the characters after the decimal point in AllowanceTotalAmount and allows at most two.

Where the rule applies

The rule applies to AllowanceTotalAmount in SpecifiedTradeSettlementHeaderMonetarySummation.

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