Allowed CountryID value

Error FX-SCH-A-001050 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 neither empty nor included in the code list used for this check.

What the rule means

ram:CountryID identifies the country of the postal address. A non-empty value must match an entry in the associated code list.

Please check `ram:CountryID` in the item seller’s postal address

The value of ram:CountryID in the item seller’s postal address is not recognized as an allowed country value. You can check it against the applicable code list.

What to do
  1. Find ram:CountryID in the ram:PostalTradeAddress of the ram:ItemSellerTradeParty.
  2. Check whether the value is empty or included in code list ID 10.
  3. Generate the invoice again and validate it once more.
Technical details

The XPath test accepts an empty value or a value present in code list ID 10 in FACTUR-X_EXTENDED_codedb.xml.

Where the rule applies

The rule applies to ram:CountryID in the item seller’s postal address on an invoice line.

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