The payee’s address requires a country

Error FX-SCH-A-000915 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 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 payee party’s postal address must contain exactly one country identifier.

Please include exactly one country identifier in the payee’s address

The payee party’s postal address 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 the payee party’s ram:PostalTradeAddress.
  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 ram:PostalTradeAddress.

Where the rule applies

The rule applies to the payee party’s postal address in the invoice settlement.

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