Invalid tax type code on an allowance

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 neither empty nor included in the applicable Factur-X code list. Therefore, the specified tax type code is not allowed.

What the rule means

The code specifies the tax type in the allowance’s tax details. An allowed code enables this tax detail to be classified in a standardized way.

Please check the allowance’s tax type code

The allowance’s tax type code is not recognized as an allowed value in the invoice. You can check it against the applicable code list.

What to do
  1. Locate ram:TypeCode in the allowance’s tax details.
  2. Check whether its value is included in the applicable code list.
  3. Generate the invoice again and validate it once more.
Technical details

The test accepts an empty value or a value present in code list 26 in FACTUR-X_EXTENDED_codedb.xml.

Where the rule applies

The rule applies to ram:TypeCode within the tax details of a document-level allowance.

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]