Invoicee country required

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

CountryID is missing from the invoicee’s PostalTradeAddress or does not occur exactly once. CountryID must be present exactly once.

What the rule means

CountryID identifies the country of the postal address. The rule requires exactly one country entry in PostalTradeAddress.

Please add the country to the invoicee’s postal address

CountryID is missing or appears more than once in the invoicee’s postal address. You can correct this by including exactly one CountryID.

What to do
  1. Find the invoicee’s PostalTradeAddress.
  2. Include exactly one CountryID element inside it.
  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

Within PostalTradeAddress, the number of direct CountryID elements must be exactly one.

Where the rule applies

The rule applies to the invoicee’s postal address in PostalTradeAddress.

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