Decimal places in the allowance amount

Error BR-DEC-01 EN 16931

The allowed maximum number of decimals for the Document level allowance amount (BT-92) 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 ram:ActualAmount has more than two characters after the decimal point. The document-level allowance amount (BT-92) may have no more than two decimal places.

What the rule means

The two-decimal limit specifies the permitted precision of the allowance amount.

Affected fields BT-92
Please enter the allowance amount with no more than two decimal places

The allowance amount has more than two decimal places. Adjust the number of decimal places in ram:ActualAmount.

What to do
  1. Limit the value in ram:ActualAmount to no more than two decimal places.
  2. Check AbstractTradeAllowanceCharge.ActualAmount.
  3. Regenerate the invoice and validate it again.
What it looks like
✗ Triggers the message
<ram:ActualAmount>10.123</ram:ActualAmount>
✓ Correct
<ram:ActualAmount>10.12</ram:ActualAmount>
Check in FactoorSharp
  • AbstractTradeAllowanceCharge.ActualAmount (Document level allowance: BT-92)
Technical details

The test counts the characters after the decimal point in ram:ActualAmount[1] and requires no more than two.

Where the rule applies

The rule applies to ram:ActualAmount for a document-level allowance in ram:SpecifiedTradeAllowanceCharge.

Context (rule/@context)
//ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeAllowanceCharge/ram:ChargeIndicator[udt:Indicator='false']
Test expression (assert/@test)
string-length(substring-after(../ram:ActualAmount[1],'.'))<=2