Use an allowed country code for the sales agent’s address

Error FX-SCH-A-000745 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 non-empty value of ram:CountryID is not included in the country code list used by this rule. The test also accepts an empty value.

What the rule means

The country code assigns the postal address to a country. A non-empty value must be one of the country codes allowed for this field.

Please use an allowed country code for the sales agent’s address

The non-empty value of ram:CountryID is not allowed in the associated country code list. Use a country code included in that list for the address.

What to do
  1. Locate ram:CountryID in the sales agent’s postal address.
  2. Check the non-empty value against the country code list for this field.
  3. Replace it with a country code included in that list.
  4. Generate the invoice again and validate it once more.
Technical details

The check accepts an empty string or a value found in code list 10.

Where the rule applies

In ram:CountryID in the sales agent’s postal address.

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