Allowed country code in the organization address

Error FX-SCH-A-000781 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 country of the seller's legal organization is provided, it must match an allowed value from the code list.

Please check the country code in the organization address

The value in ram:CountryID in the postal address of the seller's legal organization 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 postal address within ram:SpecifiedLegalOrganization.
  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 postal address within the seller's ram:SpecifiedLegalOrganization.

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