Maximum decimal places for the paid amount

Error BR-DEC-16 EN 16931

The allowed maximum number of decimals for the Paid amount (BT-113) 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 of ram:TotalPrepaidAmount contains more than two decimal places. The rule counts the characters after a decimal point and allows no more than two.

What the rule means

The paid amount (BT-113) is a monetary amount limited to two decimal places.

Affected fields BT-113
Please enter the paid amount with no more than two decimal places

The paid amount contains more than two decimal places. You can adjust the value in the paid amount field.

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

The XPath checks that the substring after . in ram:TotalPrepaidAmount is no longer than two characters.

Where the rule applies

The rule applies to the paid amount ram:TotalPrepaidAmount within the settlement monetary totals.

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