Payee’s country

Error FX-SCH-A-000994 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 missing or appears more than once.

What the rule means

ram:CountryID specifies the country of the payee’s postal address. Exactly one such element is required for the address.

Please provide the country in the payee’s postal address

ram:CountryID is missing or appears more than once in the payee’s postal address. The address requires exactly one country entry.

What to do
  1. Locate the payee’s ram:PostalTradeAddress.
  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>DE</ram:CountryID>
</ram:PostalTradeAddress>
Technical details

The XPath test checks whether ram:PostalTradeAddress has exactly one direct ram:CountryID child element.

Where the rule applies

The rule applies to the payee’s postal address within the payment terms.

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