Invalid country value in ram:CountryID

Error FX-SCH-A-000765 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 in the tax representative’s postal address is not in the designated country code list. This check also accepts an empty code value.

What the rule means

The code list defines which country values are permitted for the country field in the postal address.

Please use an allowed country value in `ram:CountryID`

The country value in the tax representative’s postal address is not in the designated code list. Using a value allowed by that list resolves the error.

What to do
  1. Locate ram:CountryID in the tax representative’s postal address.
  2. Check its value against the designated country code list.
  3. Generate the invoice again and validate it.
Technical details

The test accepts an empty code value or a value present in the code list identified by 10.

Where the rule applies

The rule applies to ram:CountryID in the seller tax representative’s postal address.

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