Use an allowed scheme for the sales agent’s legal organization ID

Error FX-SCH-A-000746 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:SpecifiedLegalOrganization/ram:ID is not included in the value list used by this rule. The test also accepts an empty value.

What the rule means

The scheme identifier classifies the legal organization identifier. A non-empty value must be one of the values allowed for this field.

Please use an allowed scheme for the sales agent’s legal organization ID

The non-empty value of @schemeID on the identifier in ram:SpecifiedLegalOrganization is not allowed in the associated value list. Use a value included in that list for this attribute.

What to do
  1. Locate ram:ID in the sales agent’s ram:SpecifiedLegalOrganization.
  2. Check the non-empty value of @schemeID against the value list for this field.
  3. Replace it with a value included in that list.
  4. Generate the invoice again and validate it once more.
Technical details

The check accepts an empty string or a value found in code list 12.

Where the rule applies

On the @schemeID attribute of ram:ID in the sales agent’s ram:SpecifiedLegalOrganization.

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