Specify the tax category exactly once

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:AppliedTradeTax is missing ram:CategoryCode, or the element occurs more than once. It must occur exactly once.

What the rule means

ram:CategoryCode specifies the tax category for the tax information. If the category is missing or repeated, the information is structurally incomplete or ambiguous.

Please specify the tax category exactly once

The tax information does not contain the tax category exactly once. A single ram:CategoryCode resolves this issue.

What to do
  1. Check ram:AppliedTradeTax and make sure ram:CategoryCode occurs exactly once.
  2. Regenerate the invoice and validate it again.
What it looks like
✗ Triggers the message
<ram:AppliedTradeTax/>
✓ Correct
<ram:AppliedTradeTax>
  <ram:CategoryCode/>
</ram:AppliedTradeTax>
Technical details

The Schematron test counts the direct ram:CategoryCode elements in ram:AppliedTradeTax and requires exactly one.

Where the rule applies

The rule applies to ram:AppliedTradeTax within a document-level logistics service charge.

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