Exactly one tax type code for the advance payment

Error FX-SCH-A-000953 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 must occur exactly once in ram:IncludedTradeTax. The element is either missing or appears more than once.

What the rule means

The tax type code identifies the tax type in the advance payment’s tax information. Exactly one such code is required for this information.

Please provide the advance payment tax type code exactly once

The tax type code is missing from the advance payment’s tax information or appears more than once. The structure can be adjusted so that the code occurs exactly once.

What to do
  1. Locate ram:IncludedTradeTax for the advance payment.
  2. Check that it contains ram:TypeCode exactly once.
  3. Regenerate the invoice and validate it again.
What it looks like
✗ Triggers the message
<ram:IncludedTradeTax/>
✓ Correct
<ram:IncludedTradeTax>
  <ram:TypeCode>VAT</ram:TypeCode>
</ram:IncludedTradeTax>
Technical details

The rule checks whether ram:IncludedTradeTax contains exactly one direct child element named ram:TypeCode.

Where the rule applies

The rule applies within ram:IncludedTradeTax for the tax information of an advance payment.

Context (rule/@context)
/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ ram:SpecifiedAdvancePayment/ram:IncludedTradeTax
Test expression (assert/@test)
count(ram:TypeCode)=1