The tax representative’s country identifier must be allowed

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

A non-empty value of ram:CountryID is not included in the country identifier code list. An empty value satisfies this test.

What the rule means

ram:CountryID identifies the country of the postal address. Any value provided must belong to the country identifiers allowed by the code list.

Please use an allowed country identifier for the tax representative’s postal address

The value provided for ram:CountryID in the tax representative’s postal address is not listed as an allowed country identifier. Use a value included in the code list or leave the value empty.

What to do
  1. Locate ram:CountryID in the tax representative’s postal address and check its value.
  2. Use a country identifier code from the code list or clear the value.
  3. Regenerate the invoice and validate it again.
Technical details

The test accepts an empty ram:CountryID value or a value listed in code list ID 10.

Where the rule applies

The value of ram:CountryID in the seller tax representative’s postal address.

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