The organization identifier scheme must be allowed

Error FX-SCH-A-001120 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 schemeID value is not included in the code list used for this attribute. This test does not reject an empty value.

What the rule means

schemeID identifies the scheme of the organization identifier. The code list defines which scheme values are allowed for this identifier.

Please use an allowed identifier scheme for the ultimate ship-to party’s organization

The schemeID attribute of the organization identifier is not in the specified code list. This rule does not reject an empty value.

What to do
  1. Open the ultimate ship-to party’s SpecifiedLegalOrganization.
  2. Check the non-empty schemeID attribute value of ID against the code list specified for it.
  3. Generate the invoice again and validate it once more.
Technical details

The test permits an empty value; otherwise, the value of @schemeID must occur in enumeration 12 in FACTUR-X_EXTENDED_codedb.xml.

Where the rule applies

The rule applies to the schemeID attribute of ID under SpecifiedLegalOrganization for an invoice line’s ultimate ship-to party.

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