Invalid country code for the seller’s address

Error FX-SCH-A-000580 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 included in the designated country code list.

What the rule means

ram:CountryID identifies the country of the seller’s address. An allowed country code ensures that the country is specified unambiguously and consistently.

Please check the country code for the seller’s address

In the seller’s postal address, ram:CountryID contains a value that does not match the designated country code list. You can adjust the value or leave it empty.

What to do
  1. Check ram:CountryID in the seller’s ram:PostalTradeAddress.
  2. Use a value included in the designated country code list or leave the value empty.
  3. Generate the invoice again and validate it.
What it looks like
✗ Triggers the message
<ram:PostalTradeAddress>
  <ram:CountryID>ZZZ</ram:CountryID>
</ram:PostalTradeAddress>
✓ Correct
<ram:PostalTradeAddress>
  <ram:CountryID/>
</ram:PostalTradeAddress>
Technical details

The test accepts an empty value or a value present in the code list identified as 7.

Where the rule applies

The rule applies to ram:CountryID in the seller’s postal address, ram:PostalTradeAddress.

Context (rule/@context)
/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ ram:SellerTradeParty/ram:PostalTradeAddress/ram:CountryID
Test expression (assert/@test)
string-length($codeValue7)=0 or document('FACTUR-X_EN16931_codedb.xml')/codedb/cl[@id=7]/enumeration[@value=$codeValue7]