Invoice line tax type

Error FX-SCH-A-000535 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:ApplicableTradeTax does not contain exactly one ram:TypeCode. The element is missing or occurs more than once.

What the rule means

The tax type is specified within the invoice line tax entry. A single ram:TypeCode makes this entry unambiguous.

Please include the invoice line tax type exactly once

ram:TypeCode is missing or appears more than once in this invoice line tax entry. You can adjust the entry in ram:ApplicableTradeTax.

What to do
  1. Make sure ram:ApplicableTradeTax contains exactly one ram:TypeCode.
  2. Generate the invoice again and check it again.
What it looks like
✗ Triggers the message
<ram:ApplicableTradeTax/>
✓ Correct
<ram:ApplicableTradeTax>
  <ram:TypeCode/>
</ram:ApplicableTradeTax>
Technical details

The check counts the direct ram:TypeCode elements in ram:ApplicableTradeTax and requires a count of 1.

Where the rule applies

In ram:ApplicableTradeTax within the settlement of an invoice line.

Context (rule/@context)
/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ ram:SpecifiedLineTradeSettlement/ram:ApplicableTradeTax
Test expression (assert/@test)
count(ram:TypeCode)=1