Exactly one VAT category for the allowance

Error FX-SCH-A-000185 Factur-X

Element 'ram:CategoryTradeTax' 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 selected allowance does not contain exactly one ram:CategoryTradeTax. The element is either missing or occurs more than once.

What the rule means

ram:CategoryTradeTax assigns a VAT category to the allowance. The rule requires exactly one such element for the allowance being checked.

Please provide exactly one VAT category for the allowance

ram:CategoryTradeTax is missing from the allowance or is entered more than once. Add or limit the VAT category so that there is exactly one entry.

What to do
  1. Locate the allowance in ram:SpecifiedTradeAllowanceCharge with the value false in udt:Indicator.
  2. Ensure that it contains exactly one ram:CategoryTradeTax.
  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:SpecifiedTradeAllowanceCharge>
✓ Correct
<ram:SpecifiedTradeAllowanceCharge>
  <ram:ChargeIndicator>
    <udt:Indicator>false</udt:Indicator>
  </ram:ChargeIndicator>
  <ram:CategoryTradeTax/>
</ram:SpecifiedTradeAllowanceCharge>
Technical details

The context selects ram:SpecifiedTradeAllowanceCharge with a ram:ChargeIndicator/udt:Indicator value of false. It then checks that there is exactly one direct ram:CategoryTradeTax element.

Where the rule applies

The rule applies to a document-level allowance whose ram:ChargeIndicator has the value false in udt:Indicator.

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