Allowed value for CountryID

Error FX-SCH-A-000880 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

If CountryID contains a value that is not in the country code list, the test fails. An empty value also passes this test.

What the rule means

The rule restricts a non-empty country value to entries in the country code list used by this check.

Please use an allowed country value in the legal organization’s address

The value in CountryID is not in the country code list used by this check. You can leave the field empty or use a value listed there.

What to do
  1. Find CountryID in the postal address of the invoicee’s legal organization.
  2. Compare its value with the entries in the country code list used by this check.
  3. Leave CountryID empty or enter a value included in that list.
  4. Generate the invoice again and validate it again.
Technical details

The test passes if the checked value is empty or appears as an enumeration in the code list with id=10.

Where the rule applies

The rule applies to CountryID in the postal address of the invoicee’s legal organization.

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