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

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 value of schemeID on ram:ID is not included in the code list used by this rule. The test explicitly allows an empty value.

What the rule means

The scheme identifier for the legal organization identifier must be allowed so that the value can be interpreted using a defined scheme.

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

The scheme identifier on ram:ID for the legal organization does not match a value allowed by this rule. Use a value from the code list provided for it.

What to do
  1. Locate ram:ID under ram:SpecifiedLegalOrganization for the sales agent and check the value of schemeID.
  2. Replace a disallowed value with one from the code list provided for it.
  3. Generate the invoice again and validate it once more.
Technical details

The rule checks schemeID on ram:ID in the ram:SpecifiedLegalOrganization context against the enumeration of code list 12; an empty value also passes this check.

Where the rule applies

The rule applies to the schemeID attribute of ram:ID under ram:SpecifiedLegalOrganization for the sales agent.

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]