Invalid country identifier for the buyer organization

Error FX-SCH-A-000702 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 postal address. A value outside the code list cannot be classified as an allowed country identifier.

Please use an allowed country identifier for the buyer organization

The postal address of the buyer’s legal organization contains a country identifier that is not in the permitted code list. You can resolve the issue by using a value included in that list.

What to do
  1. Locate ram:CountryID in the postal address of the buyer’s legal organization.
  2. Check the value against the code list applicable to this element.
  3. Replace any value not listed with an allowed country identifier.
  4. Generate the invoice again and validate it again.
Technical details

The test permits an empty checked value; otherwise, the value must be present in code list ID 10.

Where the rule applies

The rule applies to ram:CountryID in the postal address of the legal organization within the buyer party.

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