Exactly one country identifier for the InvoicerTradeParty

Error FX-SCH-A-000900 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

ram:CountryID identifies the country of the postal address. Exactly one country must be associated with the address.

Please provide exactly one country identifier for the postal address

ram:CountryID is missing from the postal address of ram:InvoicerTradeParty or occurs more than once. You can correct the number of country identifiers in the address.

What to do
  1. Locate ram:PostalTradeAddress within ram:InvoicerTradeParty.
  2. Make sure it contains exactly one ram:CountryID.
  3. Generate the invoice again and validate it once more.
What it looks like
✗ Triggers the message
<ram:PostalTradeAddress/>
✓ Correct
<ram:PostalTradeAddress>
  <ram:CountryID>DE</ram:CountryID>
</ram:PostalTradeAddress>
Technical details

The rule counts the direct ram:CountryID elements in ram:PostalTradeAddress and requires the count to be exactly one.

Where the rule applies

The rule applies to the postal address ram:PostalTradeAddress of ram:InvoicerTradeParty.

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