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 the decimal point. The amount due may have no more than two decimal places.

What the rule means

BT-115 states the amount still payable for the invoice. Limiting it to two decimal places ensures that this monetary amount is expressed with the specified decimal precision.

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

The amount due in ram:DuePayableAmount has more than two decimal places. You can adjust the value in the invoice amount.

What to do
  1. Check the value of FacturXInvoice.DuePayableAmount.
  2. Enter the amount due with no more than two decimal places.
  3. Generate the invoice again and validate it again.
What it looks like
✗ Triggers the message
<ram:DuePayableAmount>123.456</ram:DuePayableAmount>
✓ Correct
<ram:DuePayableAmount>123.45</ram:DuePayableAmount>
Check in FactoorSharp
  • FacturXInvoice.DuePayableAmount (BT-115)
Technical details

The XPath counts the characters after the first period in ram:DuePayableAmount and allows no more than two.

Where the rule applies

The rule applies to ram:DuePayableAmount in the document-level monetary summation.

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