Specify the charge tax type exactly once

Error FX-SCH-A-000480 Factur-X

Element 'ram:TypeCode' 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

For a charge, ram:TypeCode is missing from ram:CategoryTradeTax or occurs there more than once. It must occur exactly once.

What the rule means

The tax type is part of the charge’s tax information. Exactly one value ensures that this information is present unambiguously.

Please provide the charge’s tax type exactly once

For a charge, the tax type does not occur exactly once in ram:CategoryTradeTax. You can resolve this in the charge’s tax information.

What to do
  1. Find the charge and its ram:CategoryTradeTax.
  2. Ensure that it contains exactly one ram:TypeCode.
  3. Generate the invoice again and validate it once more.
What it looks like
✗ Triggers the message
<ram:CategoryTradeTax/>
✓ Correct
<ram:CategoryTradeTax>
  <ram:TypeCode/>
</ram:CategoryTradeTax>
Technical details

Within ram:CategoryTradeTax, the number of ram:TypeCode elements is checked to be exactly one.

Where the rule applies

The rule applies to CategoryTradeTax for a document-level charge in the settlement.

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