Country in the payer’s 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

In ram:PostalTradeAddress, ram:CountryID does not occur exactly once. The element is either missing or repeated.

What the rule means

The payer’s address must contain exactly one country identifier so that its country is stated unambiguously.

Please provide exactly one country in the payer’s address

The country identifier is missing from the payer’s address or is entered more than once. You can correct the address by providing exactly one ram:CountryID.

What to do
  1. Find ram:PostalTradeAddress in the payer details for payment.
  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>XX</ram:CountryID>
</ram:PostalTradeAddress>
Technical details

The Schematron condition counts the child elements ram:CountryID and requires the count to be 1.

Where the rule applies

The rule applies to ram:PostalTradeAddress in the payer details for payment.

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