Specify the allowance indicator exactly once

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

This ram:SpecifiedTradeAllowanceCharge does not contain ram:ChargeIndicator exactly once. The indicator is missing or appears more than once.

What the rule means

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

Please specify the allowance indicator exactly once

The allowance does not contain ram:ChargeIndicator exactly once. You can resolve this by specifying the indicator a single time.

What to do
  1. Check ram:SpecifiedTradeAllowanceCharge and make sure ram:ChargeIndicator occurs exactly once.
  2. Confirm that the indicator for this allowance is false.
  3. Regenerate the invoice and validate it again.
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 Schematron test counts the direct ram:ChargeIndicator elements in the ram:SpecifiedTradeAllowanceCharge selected by the context and requires exactly one.

Where the rule applies

The rule applies to ram:SpecifiedTradeAllowanceCharge at document level when its ram:ChargeIndicator/udt:Indicator has the value false, indicating an allowance.

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