Use an allowed country code for the buyer’s tax representative

Error FX-SCH-A-000684 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 of ram:CountryID is not included in code list 10 used for this check. An empty value also passes this specific check.

What the rule means

ram:CountryID identifies the country of the postal address. A code that is not allowed does not identify the country here according to the code list used.

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

The value of ram:CountryID in the buyer’s tax representative’s address is not recognized as an allowed country code. You can correct it using the code list applicable to this rule.

What to do
  1. Locate ram:CountryID in the buyer’s tax representative’s postal address.
  2. Check whether its value is included in the country code list used for this rule.
  3. Generate the invoice again and validate it.
Technical details

The check passes if the resolved code value is empty or appears as enumeration/@value in codedb/cl[@id=10].

Where the rule applies

The rule applies to ram:CountryID in the postal address of the buyer’s tax representative.

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