At most two decimal places for the amount due

Error BR-DEC-18 EN 16931

The allowed maximum number of decimals for the Amount due for payment (BT-115) is 2.

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

ram:DuePayableAmount contains more than two characters after a decimal point. The test counts the characters after the first point, so a value with three decimal places violates the rule.

What the rule means

The amount due for payment is a monetary amount and, under this rule, may have no more than two decimal places.

Affected fields BT-115
Please enter the amount due with no more than two decimal places

The amount due has more than two decimal places. You can adjust the value to the permitted precision.

What to do
  1. Check the value of ram:DuePayableAmount.
  2. Make sure there are no more than two digits after the decimal point.
  3. Check the mapping to the DuePayableAmount property.
  4. Generate the invoice again and validate it again.
What it looks like
✗ Triggers the message
<ram:DuePayableAmount>99.999</ram:DuePayableAmount>
✓ Correct
<ram:DuePayableAmount>100.00</ram:DuePayableAmount>
Check in FactoorSharp
  • FacturXInvoice.DuePayableAmount (BT-115)
Technical details

In the ram:SpecifiedTradeSettlementHeaderMonetarySummation context, the rule checks whether the substring after the point in ram:DuePayableAmount has a length of at most two.

Where the rule applies

The rule applies to ram:DuePayableAmount within the invoice header monetary summation.

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