Use an allowed tax type code for the charge

Error FX-SCH-A-000483 Factur-X

Value of 'ram:TypeCode' is not allowed.

Mandatory rule: As long as it is violated, the invoice is invalid and will be rejected by validators.
What is wrong

A non-empty value of ram:TypeCode does not appear in the code list used by this rule. The XPath expression also permits an empty value.

What the rule means

The tax type code identifies the charge’s tax type. A non-empty code must come from the specified code list so that the tax type can be classified unambiguously.

Please use an allowed tax type code for the charge

The value in ram:TypeCode of the charge’s tax information is not in the corresponding code list. The rule also permits an empty value.

What to do
  1. Find ram:TypeCode within the charge’s tax information.
  2. Check whether the non-empty value is included in the code list specified for this rule.
  3. Generate the invoice again and validate it once more.
Technical details

The test permits an empty $codeValue13; otherwise, the value must occur as @value in codedb/cl[@id=13]/enumeration.

Where the rule applies

The rule checks ram:TypeCode in ram:CategoryTradeTax for a document-level charge in the settlement.

Context (rule/@context)
/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ ram:SpecifiedTradeAllowanceCharge[ram:ChargeIndicator/udt:Indicator="true"]/ ram:CategoryTradeTax/ram:TypeCode
Test expression (assert/@test)
string-length($codeValue13)=0 or document('FACTUR-X_BASIC-WL_codedb.xml')/codedb/cl[@id=13]/enumeration[@value=$codeValue13]