Disallowed tax type code on a charge

Error FX-SCH-A-000977 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 of ram:TypeCode is not empty and does not match any value allowed by the code list for this element. An empty value passes this check.

What the rule means

The tax type code assigns the charge to a tax category. A disallowed code therefore cannot be reliably interpreted as the intended tax type.

Please use an allowed tax type code for the charge

The tax type code for the charge does not match the allowed code list. You can adjust the value or leave the element empty.

What to do
  1. Find the ram:TypeCode element in the charge.
  2. Compare its value with the codes allowed for this element.
  3. Adjust the value or leave ram:TypeCode empty.
  4. Generate the invoice again and validate it.
Technical details

The XPath allows an empty ram:TypeCode or requires its value to occur in the code list identified by 26.

Where the rule applies

The rule applies to ram:TypeCode in the tax details of a document-level ram:SpecifiedTradeAllowanceCharge when the entry is marked as a 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($codeValue26)=0 or document('FACTUR-X_EXTENDED_codedb.xml')/codedb/cl[@id=26]/enumeration[@value=$codeValue26]