Use an allowed country code for the manufacturer

Error FX-SCH-A-001164 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 empty and does not match an entry in the code list used by this rule.

What the rule means

The country code assigns the postal address to a country. A disallowed value cannot provide that assignment in accordance with the rule.

Please use an allowed country code for the manufacturer

The country code in the product manufacturer's postal address is not included in the allowed code list. Check the entered value so that the address uses an allowed country code.

What to do
  1. Locate ram:CountryID in the postal address under ram:ManufacturerTradeParty.
  2. Check whether the non-empty value is an allowed country code.
  3. Generate the invoice again and validate it once more.
Technical details

An empty ram:CountryID value satisfies this test. A non-empty value must occur in the enumeration cl with ID 10 in FACTUR-X_EXTENDED_codedb.xml.

Where the rule applies

The rule applies to ram:CountryID in the product manufacturer's postal address within an invoice line.

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