Invalid schemeID code for the payee’s legal identifier

Error FX-SCH-A-000997 Factur-X

Value of '@schemeID' is not allowed.

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

If ram:ID contains a non-empty value for schemeID, that value must be permitted by the schemeID code list. A value not found in the list causes an error.

What the rule means

The schemeID value identifies the scheme used for the legal organization identifier. An allowed value permits that identifier to be associated with the intended scheme.

Please use an allowed schemeID code for the payee’s legal identifier

The schemeID value on ram:ID for the payee’s legal organization is not included in the allowed code list. Using a value listed there can resolve the error.

What to do
  1. Check the value of schemeID on ram:ID in the payee’s ram:SpecifiedLegalOrganization.
  2. Compare the non-empty value with the code list applicable to this identifier.
  3. Generate the invoice again and validate it once more.
Technical details

The test accepts an empty value or a value present in the code list with identifier 12. It checks the value of @schemeID on ram:ID.

Where the rule applies

The rule applies to ram:ID in the payee’s ram:SpecifiedLegalOrganization within the payment terms.

Context (rule/@context)
/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ ram:SpecifiedTradePaymentTerms/ram:PayeeTradeParty/ram:SpecifiedLegalOrganization/ ram:ID
Test expression (assert/@test)
string-length($codeValue12)=0 or document('FACTUR-X_EXTENDED_codedb.xml')/codedb/cl[@id=12]/enumeration[@value=$codeValue12]