Use an allowed scheme value for the legal organisation identifier

Error FX-SCH-A-000424 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 ID does not match any of the allowed values defined for this field. An empty value is allowed by the test condition.

What the rule means

The schemeID attribute identifies the scheme of the buyer’s legal organisation identifier; its value must match the specified code list or be empty.

Please use an allowed scheme value for the buyer organisation identifier

The value of schemeID on ID in SpecifiedLegalOrganization is not accepted for this field. Use a value from the designated code list or leave the attribute empty.

What to do
  1. Locate ID in SpecifiedLegalOrganization within BuyerTradeParty.
  2. Check the schemeID value against the designated code list.
  3. Replace it with an allowed value or clear it.
  4. Generate the invoice again and validate it.
Technical details

The test allows schemeID to be empty or requires its value to be present in code list 6.

Where the rule applies

The rule applies to the schemeID attribute of ID within the buyer’s SpecifiedLegalOrganization.

Context (rule/@context)
/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ ram:BuyerTradeParty/ram:SpecifiedLegalOrganization/ram:ID
Test expression (assert/@test)
string-length($codeValue6)=0 or document('FACTUR-X_BASIC-WL_codedb.xml')/codedb/cl[@id=6]/enumeration[@value=$codeValue6]