Allowed country code for the address

Error FX-SCH-A-001000 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 in the code list permitted for country identifiers. This rule also accepts an empty code value.

What the rule means

The country identifier assigns the postal address to a country. An unpermitted code can prevent the country from being interpreted unambiguously according to the intended code scheme.

Please use an allowed country code for the payee’s address

The value in ram:CountryID in the payee’s address is not listed as an allowed country code. You can adjust the value in this element.

What to do
  1. Find ram:CountryID in the postal address of the payee’s legal organization.
  2. Compare its value with the codes permitted for country identifiers.
  3. Generate the invoice again and validate it once more.
Technical details

The value of ram:CountryID is checked against the enumeration with identifier 10 in the code list. An empty value also satisfies the condition.

Where the rule applies

The rule applies to ram:CountryID in the postal address of the payee’s legal organization.

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