Allowance tax type

Error FX-SCH-A-000473 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:CategoryTradeTax, or the element occurs more than once. The tax information must contain exactly one type code.

What the rule means

ram:TypeCode identifies the tax type in the allowance’s tax information. Exactly one type code makes this information structurally unambiguous.

Please provide the allowance tax type

The tax type is missing from the allowance’s tax information or has been provided more than once. Exactly one ram:TypeCode makes the entry unambiguous.

What to do
  1. Add exactly one ram:TypeCode to ram:CategoryTradeTax.
  2. Remove duplicate ram:TypeCode elements if present.
  3. Generate the invoice again and validate it.
What it looks like
✗ Triggers the message
<ram:CategoryTradeTax/>
✓ Correct
<ram:CategoryTradeTax>
  <ram:TypeCode/>
</ram:CategoryTradeTax>
Technical details

The test counts ram:TypeCode within ram:CategoryTradeTax and requires the count to equal 1.

Where the rule applies

The rule applies to ram:TypeCode within ram:CategoryTradeTax, the tax information for a document-level allowance. The allowance in ram:SpecifiedTradeAllowanceCharge is identified by ram:ChargeIndicator having the value false.

Context (rule/@context)
/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ ram:SpecifiedTradeAllowanceCharge[ram:ChargeIndicator/udt:Indicator="false"]/ ram:CategoryTradeTax
Test expression (assert/@test)
count(ram:TypeCode)=1