Limit decimals in the charge 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

ChargeTotalAmount contains more than two digits after the decimal separator.

What the rule means

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

Affected fields BT-108
Please limit the decimal places in the charge total

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

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

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

Where the rule applies

The rule applies to ChargeTotalAmount, the sum of document-level charges in SpecifiedTradeSettlementHeaderMonetarySummation.

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