Buyer VAT identifier scheme code not allowed

Error FX-SCH-A-000497 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 on ram:ID is not included in the applicable code list. An empty code value is also permitted by the test.

What the rule means

ram:ID in ram:SpecifiedTaxRegistration contains the buyer’s tax identifier; @schemeID indicates its scheme. An allowed scheme is needed to classify the identifier correctly.

Please use an allowed scheme for the buyer’s VAT identifier

The scheme for the buyer’s VAT identifier was not recognized as an allowed value. An appropriate scheme classifies the identifier correctly.

What to do
  1. Check @schemeID on ram:ID in the buyer’s ram:SpecifiedTaxRegistration.
  2. Compare its value with the permitted entries in the applicable code list.
  3. Recreate the invoice and validate it again.
Technical details

The test accepts an empty code value or a value found in code list ID 15 in FACTUR-X_BASIC_codedb.xml.

Where the rule applies

The rule applies to the @schemeID attribute on ram:ID in the buyer’s ram:SpecifiedTaxRegistration.

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