Use an allowed country identifier

Error FX-SCH-A-000898 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 ram:CountryID has a non-empty value, that value must appear in the enumeration with code-list ID 10 in FACTUR-X_EXTENDED_codedb.xml. A value not listed there is not allowed.

What the rule means

This check restricts non-empty ram:CountryID values to those listed in the country code list. An empty value passes this specific value check.

Please use an allowed country identifier for the postal address

The non-empty value of ram:CountryID is not in the allowed country code list. Use a value listed there or leave the element empty.

What to do
  1. Locate ram:CountryID in ram:PostalTradeAddress under InvoicerTradeParty.
  2. Compare the value with the enumeration for code-list ID 10 in FACTUR-X_EXTENDED_codedb.xml.
  3. Use a value listed there or leave ram:CountryID empty.
  4. Generate the invoice again and validate it.
Technical details

The test accepts an empty string or a value present in codedb/cl[@id=10]/enumeration.

Where the rule applies

The rule checks the value of ram:CountryID in the invoicer’s postal address.

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