A charge requires exactly one amount

Error FX-SCH-A-000547 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 charge does not contain exactly one ram:ActualAmount. The rule checks the number of these elements within ram:SpecifiedTradeAllowanceCharge.

What the rule means

ram:ActualAmount contains the amount of the charge. Without exactly one such element, the charge amount is not specified unambiguously.

Please provide exactly one `ram:ActualAmount` for the charge

The charge on the invoice line does not contain exactly one amount. You can adjust the number of amount elements in the charge.

What to do
  1. Locate the relevant ram:SpecifiedTradeAllowanceCharge on the invoice line.
  2. Ensure 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>true</udt:Indicator>
  </ram:ChargeIndicator>
</ram:SpecifiedTradeAllowanceCharge>
✓ Correct
<ram:SpecifiedTradeAllowanceCharge>
  <ram:ChargeIndicator>
    <udt:Indicator>true</udt:Indicator>
  </ram:ChargeIndicator>
  <ram:ActualAmount>1.00</ram:ActualAmount>
</ram:SpecifiedTradeAllowanceCharge>
Technical details

The test counts the direct ram:ActualAmount elements in ram:SpecifiedTradeAllowanceCharge and requires a count of 1.

Where the rule applies

The rule applies to a charge on an invoice line whose ram:ChargeIndicator has the value true.

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