Country in payer address

Error FX-SCH-A-000937 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 ram:PostalTradeAddress. The element is either missing or occurs more than once.

What the rule means

The rule requires exactly one country entry in the postal address, ensuring that the country component is present unambiguously.

Please include exactly one country in the payer's postal address

The payer's postal address is missing ram:CountryID, or the element occurs more than once. You can correct the address by having exactly one such element.

What to do
  1. Open the payer's ram:PostalTradeAddress.
  2. Make sure that it contains ram:CountryID exactly once.
  3. Generate the invoice again and validate it once more.
What it looks like
✗ Triggers the message
<ram:PostalTradeAddress/>
✓ Correct
<ram:PostalTradeAddress>
  <ram:CountryID/>
</ram:PostalTradeAddress>
Technical details

The test counts child elements named ram:CountryID in ram:PostalTradeAddress and requires the count to be 1.

Where the rule applies

The rule applies to the payer's postal address in ram:PostalTradeAddress.

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