Country identifier of the address

Error FX-SCH-A-000682 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 is missing from ram:PostalTradeAddress or occurs more than once. The element must be present exactly once.

What the rule means

The postal address of the tax representative must contain exactly one country identifier.

Please provide exactly one country identifier in the tax representative’s address

The postal address of the buyer’s tax representative is missing its country identifier or contains it more than once. ram:CountryID must occur exactly once.

What to do
  1. Find ram:PostalTradeAddress for the buyer’s tax representative.
  2. Check how many times ram:CountryID occurs there.
  3. Add or remove entries so that ram:CountryID is present exactly once.
  4. 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 the direct ram:CountryID elements in ram:PostalTradeAddress and requires exactly one.

Where the rule applies

The rule applies to the postal address ram:PostalTradeAddress of the buyer’s tax representative.

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