Use an allowed country value for the sales agent

Error FX-SCH-A-000749 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 CountryID is not included in the value list applicable to this element. The test permits an empty value or a value listed there.

What the rule means

The value list restricts the country entry to defined values so it can be processed consistently. Under the test condition, an empty value is also permitted.

Please use an allowed country value for the sales agent

The value of CountryID in the sales agent’s postal address is not recognized as an allowed value. The rule also permits an empty value.

What to do
  1. Check the value in CountryID in the postal address.
  2. Use a value from the list applicable to CountryID, or leave the value empty.
  3. Regenerate the invoice and validate it again.
Technical details

The rule accepts an empty value or a value present in the code list identified by 10.

Where the rule applies

The rule applies to CountryID in the sales agent’s postal address under SalesAgentTradeParty.

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