At most two decimal places for the allowance or charge base amount

Error BR-DEC-06 EN 16931

The allowed maximum number of decimals for the Document level charge base amount (BT-100) 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:BasisAmount for such a charge contains more than two digits after the decimal separator.

What the rule means

The base amount of a document-level charge may have no more than two decimal places. This enforces the decimal precision specified for this amount.

Affected fields BT-100
Please limit the charge base amount to two decimal places

The base amount of a charge has more than two decimal places. You can enter the amount with no more than two decimal places.

What to do
  1. Check the value of ram:BasisAmount for the document-level charge.
  2. Limit this amount to two decimal places, then regenerate the invoice and check it again.
What it looks like
✗ Triggers the message
<ram:SpecifiedTradeAllowanceCharge>
  <ram:ChargeIndicator>
    <udt:Indicator>true</udt:Indicator>
  </ram:ChargeIndicator>
  <ram:BasisAmount>12.345</ram:BasisAmount>
</ram:SpecifiedTradeAllowanceCharge>
✓ Correct
<ram:SpecifiedTradeAllowanceCharge>
  <ram:ChargeIndicator>
    <udt:Indicator>true</udt:Indicator>
  </ram:ChargeIndicator>
  <ram:BasisAmount>12.34</ram:BasisAmount>
</ram:SpecifiedTradeAllowanceCharge>
Check in FactoorSharp
  • AbstractTradeAllowanceCharge.BasisAmount (Document level charge: BT-100)
Technical details

The test counts the characters after the decimal point in ram:BasisAmount and allows no more than two. It applies in the context of a ram:ChargeIndicator whose udt:Indicator has the value true.

Where the rule applies

The rule applies to the base amount ram:BasisAmount of a document-level charge in ram:ApplicableHeaderTradeSettlement when ram:ChargeIndicator contains the value true.

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