Maximum two decimal places for document-level charges total

Error BR-DEC-11 EN 16931

The allowed maximum number of decimals for the Sum of charges on document level (BT-108) 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 ChargeTotalAmount has more than two decimal places.

What the rule means

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

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

The document-level charges 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 ChargeTotalAmount.
  2. Use no more than two decimal places.
  3. Check the ChargeTotalAmount property.
  4. Generate the invoice again and validate it again.
What it looks like
✗ Triggers the message
<ram:ChargeTotalAmount>12.345</ram:ChargeTotalAmount>
✓ Correct
<ram:ChargeTotalAmount>12.34</ram:ChargeTotalAmount>
Check in FactoorSharp
  • FacturXInvoice.ChargeTotalAmount (BT-108)
Technical details

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

Where the rule applies

The rule applies to ChargeTotalAmount in SpecifiedTradeSettlementHeaderMonetarySummation.

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