Specify the charge tax category exactly once

Error FX-SCH-A-000481 Factur-X

Element 'ram:CategoryCode' 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:CategoryCode is missing from ram:CategoryTradeTax or occurs there more than once. It must occur exactly once.

What the rule means

The tax category code assigns the charge’s tax information to a category. Exactly one value ensures that this assignment is present unambiguously.

Please provide the charge’s tax category exactly once

For a charge, the tax category 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:CategoryCode.
  3. Generate the invoice again and validate it once more.
What it looks like
✗ Triggers the message
<ram:CategoryTradeTax/>
✓ Correct
<ram:CategoryTradeTax>
  <ram:CategoryCode/>
</ram:CategoryTradeTax>
Technical details

Within ram:CategoryTradeTax, the number of ram:CategoryCode 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:CategoryCode)=1