Exactly one indicator for the allowance

Error FX-SCH-A-000183 Factur-X

Element 'ram:ChargeIndicator' 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:ChargeIndicator. The element is either missing or occurs more than once.

What the rule means

ram:ChargeIndicator indicates whether an amount is a charge or an allowance. For the allowance checked here, the element must occur exactly once.

Please provide exactly one indicator for the allowance

The allowance does not contain exactly one ram:ChargeIndicator. Adjust the number of indicators to match the required XML structure.

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:ChargeIndicator.
  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:ChargeIndicator>
    <udt:Indicator>false</udt:Indicator>
  </ram:ChargeIndicator>
</ram:SpecifiedTradeAllowanceCharge>
✓ Correct
<ram:SpecifiedTradeAllowanceCharge>
  <ram:ChargeIndicator>
    <udt:Indicator>false</udt:Indicator>
  </ram:ChargeIndicator>
</ram:SpecifiedTradeAllowanceCharge>
Technical details

The context selects ram:SpecifiedTradeAllowanceCharge with a ram:ChargeIndicator/udt:Indicator value of false. It then requires exactly one direct ram:ChargeIndicator 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:ChargeIndicator)=1