The legal organisation’s address requires a country

Error FX-SCH-A-000919 Factur-X

Element 'ram:CountryID' must occur exactly 1 times.

Mandatory rule: As long as it is violated, the invoice is invalid and will be rejected by validators.
What is wrong

The legal organisation’s ram:PostalTradeAddress element does not contain exactly one ram:CountryID element. The country identifier is missing or occurs more than once.

What the rule means

The postal address of the payee party’s legal organisation must contain exactly one country identifier.

Please include exactly one country identifier in the legal organisation’s address

The postal address of the payee party’s legal organisation is missing its country identifier, or it is entered more than once. The address must contain exactly one ram:CountryID.

What to do
  1. Find ram:PostalTradeAddress within the payee party’s ram:SpecifiedLegalOrganization.
  2. Make sure it contains exactly one ram:CountryID.
  3. Generate the invoice again and validate it.
What it looks like
✗ Triggers the message
<ram:PostalTradeAddress/>
✓ Correct
<ram:PostalTradeAddress>
  <ram:CountryID>FR</ram:CountryID>
</ram:PostalTradeAddress>
Technical details

The XPath test requires exactly one direct ram:CountryID child within the ram:PostalTradeAddress of ram:SpecifiedLegalOrganization.

Where the rule applies

The rule applies to the postal address of the payee party’s legal organisation.

Context (rule/@context)
/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ ram:PayeeTradeParty/ram:SpecifiedLegalOrganization/ram:PostalTradeAddress
Test expression (assert/@test)
count(ram:CountryID)=1