Tax category for the logistics service

Error FX-SCH-A-000965 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

ram:CategoryCode is missing from ram:AppliedTradeTax, or the element occurs more than once.

What the rule means

ram:CategoryCode assigns the tax information to a tax category. Exactly one element ensures that the category is stated unambiguously.

Please state the tax category for the logistics service exactly once

The tax information for the logistics service is missing the tax category, or it includes it more than once. A single entry makes the category clear.

What to do
  1. Find the relevant ram:AppliedTradeTax.
  2. Add exactly one ram:CategoryCode inside it and remove any duplicates.
  3. Generate the invoice again and validate it again.
What it looks like
✗ Triggers the message
<ram:AppliedTradeTax/>
✓ Correct
<ram:AppliedTradeTax>
  <ram:CategoryCode>S</ram:CategoryCode>
</ram:AppliedTradeTax>
Technical details

The test uses count(ram:CategoryCode)=1 to check that ram:AppliedTradeTax contains exactly one ram:CategoryCode element.

Where the rule applies

The rule applies inside ram:AppliedTradeTax, which belongs to the tax information for a logistics service.

Context (rule/@context)
/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ ram:SpecifiedLogisticsServiceCharge/ram:AppliedTradeTax
Test expression (assert/@test)
count(ram:CategoryCode)=1