The country code must be allowed

Error FX-SCH-A-001119 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

A non-empty CountryID value is not included in the country code list used by this rule. This test does not reject an empty value.

What the rule means

An allowed country code associates the address with a country listed in the code list. Values not listed cannot be recognized as country codes by this rule.

Please use an allowed country code for the ultimate delivery address

The country code in the ultimate ship-to party’s postal address is not in the specified code list. This rule does not reject an empty value.

What to do
  1. Check the value of CountryID in the ultimate ship-to party’s postal address.
  2. Compare the non-empty value with the code list specified for CountryID.
  3. Generate the invoice again and validate it once more.
Technical details

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

Where the rule applies

The rule applies to the value of CountryID in the ultimate ship-to party’s postal address for an invoice line.

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