Specify the tax type exactly once

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

ram:AppliedTradeTax is missing ram:TypeCode, or the element occurs more than once. It must occur exactly once.

What the rule means

ram:TypeCode identifies the type of tax to which the tax information relates. A missing or repeated tax type makes this information structurally ambiguous or incomplete.

Please specify the tax type exactly once

The tax information does not contain the tax type exactly once. Including a single ram:TypeCode resolves this issue.

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

The Schematron test counts the direct ram:TypeCode 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:TypeCode)=1