A charge requires exactly one indicator

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

What the rule means

ram:ChargeIndicator indicates whether the amount is an allowance or a charge. This charge must contain the indicator exactly once.

Please include exactly one `ram:ChargeIndicator` for the charge

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

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

The test counts the direct ram:ChargeIndicator 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:ChargeIndicator)=1