Buyer organization identifier scheme code not allowed

Error FX-SCH-A-000496 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 the @schemeID attribute on ram:ID is not included in the applicable code list. An empty code value is also permitted by the test.

What the rule means

ram:ID in ram:SpecifiedLegalOrganization identifies the buyer organization; @schemeID indicates the identification scheme used. The scheme must be an allowed value.

Please use an allowed scheme for the buyer organization identifier

The scheme for the buyer organization identifier was not recognized as an allowed value. An appropriate scheme identifies the organization identifier unambiguously.

What to do
  1. Check @schemeID on ram:ID in the buyer’s ram:SpecifiedLegalOrganization.
  2. Compare its value with the permitted entries in the applicable code list.
  3. Recreate the invoice and validate it again.
Technical details

The test accepts an empty code value or a value found in code list ID 12 in FACTUR-X_BASIC_codedb.xml.

Where the rule applies

The rule applies to the @schemeID attribute on ram:ID in the buyer’s ram:SpecifiedLegalOrganization.

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