Tax type for the logistics service

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:TypeCode is missing from ram:AppliedTradeTax, or the element occurs more than once.

What the rule means

ram:TypeCode identifies the tax type for the tax information. Exactly one element makes this classification unambiguous.

Please state the tax type for the logistics service exactly once

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

What to do
  1. Find the relevant ram:AppliedTradeTax.
  2. Add exactly one ram:TypeCode 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:TypeCode>VAT</ram:TypeCode>
</ram:AppliedTradeTax>
Technical details

The test uses count(ram:TypeCode)=1 to check that ram:AppliedTradeTax contains exactly one ram:TypeCode 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:TypeCode)=1