Use an allowed identifier scheme for the legal organization

Error FX-SCH-A-000823 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 non-empty value of schemeID on ram:ID is not included in the designated code list for this identifier scheme.

What the rule means

The schemeID attribute associates the legal organization’s identifier with a defined identifier scheme. Any provided non-empty value must be included in the corresponding code list.

Please use an allowed identifier scheme for the legal organization

The identifier scheme for the recipient’s legal organization has a value that is not in the designated code list. Use a value listed there or leave the attribute empty.

What to do
  1. Locate ram:ID in ram:SpecifiedLegalOrganization for the party at the ship-to address.
  2. Check the value of schemeID against the designated code list.
  3. Replace a value that is not listed with an allowed value, or leave schemeID empty.
  4. Generate the invoice again and validate it.
Technical details

The test permits an empty value; otherwise, the value of schemeID must occur as an entry in code list 12.

Where the rule applies

The rule applies to the value of the schemeID attribute on ram:ID in ram:SpecifiedLegalOrganization of the party at the ship-to address.

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