Invalid country identifier in the address

Error FX-SCH-A-000769 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 not included in the applicable code list.

What the rule means

ram:CountryID identifies the country of the address. A value that is not allowed cannot be classified as a valid country identifier according to the code list.

Please use an allowed country identifier for the address

The value of ram:CountryID in the seller tax representative’s address is not allowed. Use a value from the corresponding code list for this element.

What to do
  1. Find ram:CountryID in the seller tax representative’s ram:PostalTradeAddress.
  2. Compare the element value with the allowed values in the corresponding code list.
  3. Generate the invoice again and validate it again.
Technical details

The test allows an empty extracted code value or checks whether it is present in the code list with identifier 10.

Where the rule applies

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

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