One ram:ActualAmount for the charge

Error FX-SCH-A-000478 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 element ram:ActualAmount does not occur exactly once in the charge. It is either missing or occurs more than once.

What the rule means

The charge must contain exactly one actual amount so that the amount for this entry is unambiguous.

Please provide exactly one actual amount for the charge

The charge entry is missing ram:ActualAmount, or the element occurs more than once. Ensure that the entry contains exactly one such element.

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

The test counts direct ram:ActualAmount children of the applicable ram:SpecifiedTradeAllowanceCharge and requires exactly one.

Where the rule applies

The rule applies to an entry marked as a charge in ram:SpecifiedTradeAllowanceCharge at document level.

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