Permitted tax representative country code

Error FX-SCH-A-000573 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 the designated country code list. The check permits an empty value or a value listed there.

What the rule means

ram:CountryID identifies the country of the tax representative’s postal address. A permitted country code allows the country to be identified unambiguously.

Please provide a permitted country code for the tax representative’s address

The value of ram:CountryID in the tax representative’s address is not included in the designated code list. You can leave the field empty or use a value permitted in that list.

What to do
  1. Check ram:CountryID in the postal address of the seller’s tax representative.
  2. Check the value against the designated country code list; the value may also be empty.
  3. Generate the invoice again and validate it once more.
Technical details

The test passes if the checked value is empty or appears as an @value in the enumeration of code list ID 7.

Where the rule applies

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

Context (rule/@context)
/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ ram:SellerTaxRepresentativeTradeParty/ram:PostalTradeAddress/ram:CountryID
Test expression (assert/@test)
string-length($codeValue7)=0 or document('FACTUR-X_EN16931_codedb.xml')/codedb/cl[@id=7]/enumeration[@value=$codeValue7]