Exactly one amount for the allowance

Error FX-SCH-A-000184 Factur-X

Element 'ram:ActualAmount' must occur exactly 1 times.

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

The selected allowance does not contain exactly one ram:ActualAmount. The element is either missing or occurs more than once.

What the rule means

ram:ActualAmount contains the allowance amount. The rule requires exactly one such amount for the allowance being checked.

Please provide exactly one amount for the allowance

ram:ActualAmount is missing from the allowance or is entered more than once. You can correct this by providing exactly one amount.

What to do
  1. Locate the allowance in ram:SpecifiedTradeAllowanceCharge with the value false in udt:Indicator.
  2. Ensure that it contains exactly one ram:ActualAmount.
  3. Generate the invoice again and validate it once more.
What it looks like
✗ Triggers the message
<ram:SpecifiedTradeAllowanceCharge>
  <ram:ChargeIndicator>
    <udt:Indicator>false</udt:Indicator>
  </ram:ChargeIndicator>
</ram:SpecifiedTradeAllowanceCharge>
✓ Correct
<ram:SpecifiedTradeAllowanceCharge>
  <ram:ChargeIndicator>
    <udt:Indicator>false</udt:Indicator>
  </ram:ChargeIndicator>
  <ram:ActualAmount>10.00</ram:ActualAmount>
</ram:SpecifiedTradeAllowanceCharge>
Technical details

The context selects ram:SpecifiedTradeAllowanceCharge with a ram:ChargeIndicator/udt:Indicator value of false. It then checks that there is exactly one direct ram:ActualAmount element.

Where the rule applies

The rule applies to a document-level allowance whose ram:ChargeIndicator has the value false in udt:Indicator.

Context (rule/@context)
/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ ram:SpecifiedTradeAllowanceCharge[ram:ChargeIndicator/udt:Indicator="false"]
Test expression (assert/@test)
count(ram:ActualAmount)=1