Allowed value for ram:CountryID

Error FX-SCH-A-000921 Factur-X

Value of 'ram:CountryID' 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 in ram:CountryID is not included in the country code list used by this rule. The test also permits an empty value.

What the rule means

An allowed country value enables the country specified in the address to be identified unambiguously by a system.

Please use an allowed value for `ram:CountryID`

The country value provided is not recognized as allowed by this check. You can correct it using the applicable code list.

What to do
  1. Check the value in ram:CountryID in the payee's address.
  2. Compare it with the country values allowed by this rule and correct it if needed.
  3. Generate the invoice again and validate it again.
Technical details

The test permits an empty value; otherwise, the value must occur in the enumeration of code list 10 in FACTUR-X_EXTENDED_codedb.xml.

Where the rule applies

The ram:CountryID in the payee's ram:PostalTradeAddress.

Context (rule/@context)
/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ ram:PayeeTradeParty/ram:SpecifiedLegalOrganization/ram:PostalTradeAddress/ ram:CountryID
Test expression (assert/@test)
string-length($codeValue10)=0 or document('FACTUR-X_EXTENDED_codedb.xml')/codedb/cl[@id=10]/enumeration[@value=$codeValue10]