Allowed seller country code

Error FX-SCH-A-000777 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 in ram:CountryID is neither empty nor included in the code list used by this rule.

What the rule means

If the seller's country is provided, it must match an allowed value from the code list.

Please check the country code in the seller's address

The value in ram:CountryID in the seller's address was not recognized as an allowed country code. You can correct it using an allowed value or leave it empty.

What to do
  1. Find ram:CountryID in the seller's postal address.
  2. Enter a value allowed by the code list or leave the element empty.
  3. Generate the invoice again and validate it.
Technical details

The test allows an empty value or checks the value against the enumeration in code list ID 10.

Where the rule applies

The rule applies to ram:CountryID in the seller's postal address.

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