ActualAmount must occur exactly once

Error FX-SCH-A-000531 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 relevant ram:AppliedTradeAllowanceCharge is missing ram:ActualAmount or contains it more than once. The allowance must contain exactly one actual amount.

What the rule means

ram:ActualAmount states the actual amount of the allowance on the gross price. Without exactly one such element, the amount is not stated unambiguously.

Please state the allowance amount with exactly one `ActualAmount`

ram:ActualAmount is missing for the allowance on the gross price or appears more than once. Exactly one element states the amount unambiguously.

What to do
  1. Find the relevant ram:AppliedTradeAllowanceCharge on the invoice line’s gross price.
  2. Make sure it contains exactly one ram:ActualAmount.
  3. Regenerate the invoice and validate it again.
What it looks like
✗ Triggers the message
<ram:AppliedTradeAllowanceCharge/>
✓ Correct
<ram:AppliedTradeAllowanceCharge>
  <ram:ActualAmount>1.00</ram:ActualAmount>
</ram:AppliedTradeAllowanceCharge>
Technical details

The test counts the direct ram:ActualAmount elements in the selected ram:AppliedTradeAllowanceCharge and requires exactly one.

Where the rule applies

The rule applies to allowances on an invoice line’s gross price marked with false by ram:ChargeIndicator.

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