Invalid tax type code on a charge

Error FX-SCH-A-000522 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

The value in ram:TypeCode is not included in the code list specified for this field. An empty value does not trigger this error according to the test condition.

What the rule means

The tax type code assigns the charge to a permitted tax type. A code not in the list can affect the correct business classification of the tax information.

Please use an allowed tax type code for the charge

The tax type code ram:TypeCode on the charge is not included in the specified code list. You can correct the entry by using a value allowed in that list.

What to do
  1. Locate the document-level charge and check its ram:CategoryTradeTax/ram:TypeCode.
  2. Replace the disallowed value with one included in the specified code list.
  3. Regenerate the invoice and validate it again.
Technical details

The test accepts an empty code or a value included in code list 7 of the Factur-X code database.

Where the rule applies

The rule applies to the tax type code ram:TypeCode in the tax information for a document-level charge.

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($codeValue7)=0 or document('FACTUR-X_BASIC_codedb.xml')/codedb/cl[@id=7]/enumeration[@value=$codeValue7]