Exactly one indicator for the allowance

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

In this ram:SpecifiedTradeAllowanceCharge, the ram:ChargeIndicator element does not occur exactly once. The test counts its occurrences and fails if the count is not one.

What the rule means

ram:ChargeIndicator identifies whether the amount represents a charge or an allowance. Here, false indicates an allowance, for which exactly one indicator must be present.

Please provide exactly one indicator for the allowance

The allowance on the invoice line does not contain exactly one ram:ChargeIndicator. A single occurrence identifies the allowance unambiguously.

What to do
  1. Locate the relevant ram:SpecifiedTradeAllowanceCharge on the invoice line.
  2. Ensure it contains exactly one ram:ChargeIndicator with udt:Indicator set to false.
  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 test requires count(ram:ChargeIndicator) to equal 1 in the selected ram:SpecifiedTradeAllowanceCharge.

Where the rule applies

The rule applies to ram:SpecifiedTradeAllowanceCharge at invoice line level when its ram:ChargeIndicator has the value false.

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