Allowed schemeID value for the legal organization

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

The value of @schemeID is neither empty nor present in the code list defined for this identifier.

What the rule means

schemeID identifies the scheme of the legal organization's identifier. A value that is not allowed does not associate the identifier with a scheme accepted by this rule.

Please use an allowed `schemeID` for the payer's legal organization

The schemeID of ram:ID in ram:SpecifiedLegalOrganization has a value that is not in the allowed code list. You can check it against the list that applies to this identifier.

What to do
  1. Check the value of the schemeID attribute on ram:ID in ram:SpecifiedLegalOrganization.
  2. Leave the attribute empty or use a value allowed by the code list.
  3. Generate the invoice again and validate it once more.
Technical details

The test accepts an empty value or a value from the enumeration of code list ID 12 in FACTUR-X_EXTENDED_codedb.xml.

Where the rule applies

The rule applies to the schemeID attribute of ram:ID in the payer's ram:SpecifiedLegalOrganization.

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