Country in the payee address

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

ram:CountryID does not occur exactly once in the payee’s ram:PostalTradeAddress. The element is either missing or occurs more than once.

What the rule means

ram:CountryID identifies the country of the postal address. A single country value makes the address unambiguous.

Please provide the payee’s address country exactly once

The payee’s address is missing its country, or the country is included more than once. You can correct this in ram:PostalTradeAddress.

What to do
  1. Add or keep exactly one ram:CountryID element in ram:PostalTradeAddress.
  2. Remove any additional ram:CountryID elements.
  3. Generate the invoice again and validate it again.
What it looks like
✗ Triggers the message
<ram:PostalTradeAddress/>
✓ Correct
<ram:PostalTradeAddress>
  <ram:CountryID/>
</ram:PostalTradeAddress>
Technical details

The test requires exactly one direct ram:CountryID child in the ram:PostalTradeAddress context.

Where the rule applies

Applies to the postal address of the payee’s legal organization in the settlement section.

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