Exactly one actual amount for the charge

Error FX-SCH-A-001035 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

ram:ActualAmount does not occur exactly once in this ram:AppliedTradeAllowanceCharge. The element must be present once; multiple occurrences are also not allowed.

What the rule means

ram:ActualAmount contains the actual amount of the charge. A single occurrence ensures that the amount is recorded unambiguously.

Please include the charge amount exactly once

The actual amount for the charge on the gross price is missing or appears more than once. One ram:ActualAmount provides an unambiguous amount.

What to do
  1. Locate the affected ram:AppliedTradeAllowanceCharge under ram:GrossPriceProductTradePrice.
  2. Make sure it contains exactly one ram:ActualAmount.
  3. Generate the invoice again and validate it again.
What it looks like
✗ Triggers the message
<ram:AppliedTradeAllowanceCharge>
  <ram:ChargeIndicator>
    <udt:Indicator>true</udt:Indicator>
  </ram:ChargeIndicator>
</ram:AppliedTradeAllowanceCharge>
✓ Correct
<ram:AppliedTradeAllowanceCharge>
  <ram:ChargeIndicator>
    <udt:Indicator>true</udt:Indicator>
  </ram:ChargeIndicator>
  <ram:ActualAmount>5.00</ram:ActualAmount>
</ram:AppliedTradeAllowanceCharge>
Technical details

The rule counts the direct ram:ActualAmount elements of the selected ram:AppliedTradeAllowanceCharge and requires exactly one occurrence.

Where the rule applies

The rule applies to the actual amount of a ram:AppliedTradeAllowanceCharge marked as a charge within an invoice line’s gross price.

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