Decimal places in the charge amount

Error BR-DEC-05 EN 16931

The allowed maximum number of decimals for the Document level charge amount (BT-99) is 2.

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

The amount in ram:ActualAmount has more than two digits after the decimal separator.

What the rule means

The document level charge amount may have no more than two decimal places, so the stated monetary amount uses the permitted precision.

Affected fields BT-99
Please limit the decimal places in the charge amount

The charge amount has more than two decimal places. Adjusting the amount will resolve this formatting issue.

What to do
  1. Check the value in the charge’s ram:ActualAmount.
  2. Limit the amount to no more than two decimal places.
  3. Check the ActualAmount property.
  4. Regenerate the invoice and validate it again.
What it looks like
✗ Triggers the message
<ram:SpecifiedTradeAllowanceCharge>
  <ram:ChargeIndicator>
    <udt:Indicator>true</udt:Indicator>
  </ram:ChargeIndicator>
  <ram:ActualAmount>10.123</ram:ActualAmount>
</ram:SpecifiedTradeAllowanceCharge>
✓ Correct
<ram:SpecifiedTradeAllowanceCharge>
  <ram:ChargeIndicator>
    <udt:Indicator>true</udt:Indicator>
  </ram:ChargeIndicator>
  <ram:ActualAmount>10.12</ram:ActualAmount>
</ram:SpecifiedTradeAllowanceCharge>
Check in FactoorSharp
  • AbstractTradeAllowanceCharge.ActualAmount (Document level charge: BT-99)
Technical details

The check counts the characters after the decimal point in the first ram:ActualAmount of the parent ram:SpecifiedTradeAllowanceCharge and allows no more than two.

Where the rule applies

The rule applies to ram:ActualAmount of a charge in ram:SpecifiedTradeAllowanceCharge within ram:ApplicableHeaderTradeSettlement.

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