ChargeIndicator must occur exactly once

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

The relevant ram:AppliedTradeAllowanceCharge is missing ram:ChargeIndicator or contains it more than once. Exactly one such element is required for this charge.

What the rule means

ram:ChargeIndicator indicates whether the amount is an allowance or a charge. This rule identifies a charge by the value true; the indicator must be present unambiguously.

Please mark the charge with exactly one `ChargeIndicator`

The charge on the gross price is missing the ram:ChargeIndicator indicator or contains it more than once. You can resolve this by providing exactly one such element.

What to do
  1. Find the relevant ram:AppliedTradeAllowanceCharge on the invoice line’s gross price.
  2. Make sure it contains exactly one ram:ChargeIndicator.
  3. Regenerate the invoice and validate it again.
What it looks like
✗ Triggers the message
<ram:AppliedTradeAllowanceCharge/>
✓ Correct
<ram:AppliedTradeAllowanceCharge>
  <ram:ChargeIndicator>
    <udt:Indicator>true</udt:Indicator>
  </ram:ChargeIndicator>
</ram:AppliedTradeAllowanceCharge>
Technical details

The test counts the direct ram:ChargeIndicator elements in the selected ram:AppliedTradeAllowanceCharge and requires exactly one.

Where the rule applies

The rule applies to charges on an invoice line’s gross price where ChargeIndicator has the value true.

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