Exactly one charge indicator

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

ram:ChargeIndicator 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:ChargeIndicator indicates whether the amount is an allowance or a charge. For this charge, the indicator must be stated once and unambiguously.

Please include the charge indicator exactly once

The charge on the gross price is missing its indicator, or the indicator appears more than once. One ram:ChargeIndicator makes the entry unambiguous.

What to do
  1. Locate the affected ram:AppliedTradeAllowanceCharge under ram:GrossPriceProductTradePrice.
  2. Make sure it contains exactly one ram:ChargeIndicator.
  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:ChargeIndicator>
    <udt:Indicator>true</udt:Indicator>
  </ram:ChargeIndicator>
</ram:AppliedTradeAllowanceCharge>
✓ Correct
<ram:AppliedTradeAllowanceCharge>
  <ram:ChargeIndicator>
    <udt:Indicator>true</udt:Indicator>
  </ram:ChargeIndicator>
</ram:AppliedTradeAllowanceCharge>
Technical details

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

Where the rule applies

The rule applies to a ram:AppliedTradeAllowanceCharge within an invoice line’s gross price that is marked as a charge.

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:ChargeIndicator)=1