Use an allowed legal-organisation identifier scheme

Error FX-SCH-A-001165 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 schemeID attribute of ram:ID is not empty, and its value is not allowed by the code list used by this rule.

What the rule means

schemeID identifies the scheme used for the legal organisation. A disallowed scheme value does not conform to the intended code set.

Please use an allowed identifier scheme for the manufacturer's legal organisation

The identifier scheme for the product manufacturer's legal organisation is not included in the allowed code list. Check the value of schemeID.

What to do
  1. Locate ram:ID under the manufacturer's ram:SpecifiedLegalOrganization.
  2. Check the schemeID attribute against the allowed values.
  3. Generate the invoice again and validate it once more.
Technical details

An empty schemeID satisfies this test. A non-empty value must occur in the enumeration cl with ID 12 in FACTUR-X_EXTENDED_codedb.xml.

Where the rule applies

The rule applies to the schemeID attribute of ram:ID under the product manufacturer's ram:SpecifiedLegalOrganization.

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