The legal organization identifier’s scheme must be allowed

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

A non-empty value of @schemeID on ram:ID is not included in the code list designated for this context. This check also accepts an empty value.

What the rule means

A non-empty value must match an entry in the identification-scheme code list with identifier 12. This restricts the scheme type of the legal organization identifier to the designated values.

Please use an allowed identification scheme for the legal organization identifier

The non-empty value of @schemeID on the legal organization identifier is not allowed in this context. The rule accepts an empty value or a value included in the designated code list.

What to do
  1. Locate ram:ID in ram:SpecifiedLegalOrganization under ProductEndUserTradeParty.
  2. Check the value of @schemeID against the code list applicable to this context.
  3. Regenerate the invoice and validate it again.
Technical details

The check accepts an empty value of @schemeID or a value present in the code list with id=12.

Where the rule applies

The rule checks the @schemeID attribute of ram:ID in the end user’s ram:SpecifiedLegalOrganization.

Context (rule/@context)
/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ ram:ProductEndUserTradeParty/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]