Allowed legal-organization scheme identifier

Error FX-SCH-A-000661 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 is not in code list 12 used by this check. An empty value passes this specific check; a non-empty value must be in the code list.

What the rule means

The rule ensures that a stated identifier for the identification scheme conforms to the designated code list.

Please use an allowed scheme identifier for the buyer agent’s legal organization

The identifier in the schemeID attribute of ram:ID is not allowed by this check. You can correct the value using the designated code list.

What to do
  1. Find ram:ID in ram:SpecifiedLegalOrganization under ram:BuyerAgentTradeParty.
  2. Compare the value of schemeID with the designated code list.
  3. Generate the invoice again and validate it.
Technical details

The test accepts an empty @schemeID value or a value present as an enumeration in code list 12 of the referenced code database.

Where the rule applies

Applies to the schemeID attribute of ram:ID in the buyer agent’s ram:SpecifiedLegalOrganization.

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