Invalid delivery location country code

Error FX-SCH-A-000648 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 of ram:CountryID is neither empty nor present in the designated code list.

What the rule means

The country code identifies the country of the relevant delivery location. A value that is not permitted cannot identify a country according to the rule.

Please use an allowed country code for the delivery location

The country code for the relevant delivery location is not accepted. You can change the value or leave it empty.

What to do
  1. Find ram:RelevantTradeLocation in the delivery terms.
  2. Check the value of ram:CountryID.
  3. Use a value permitted by the code list or leave the element empty.
  4. Generate the invoice again and validate it again.
Technical details

The XPath test passes when the checked value is empty or is found in code list 10.

Where the rule applies

The rule applies to ram:CountryID of ram:RelevantTradeLocation in the delivery terms of the seller-buyer agreement.

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