At most one country subdivision

Error FX-SCH-A-000659 Factur-X

Element 'ram:CountrySubDivisionName' may occur at maximum 1 times.

Mandatory rule: As long as it is violated, the invoice is invalid and will be rejected by validators.
What is wrong

The postal address contains more than one ram:CountrySubDivisionName element. In this context, this element may occur at most once.

What the rule means

The rule limits the country subdivision in the buyer agent’s postal address to a single entry.

Please use no more than one country subdivision in the buyer agent’s address

The buyer agent’s postal address contains ram:CountrySubDivisionName more than once. You can adjust the address so that this element occurs no more than once.

What to do
  1. Find ram:PostalTradeAddress under ram:BuyerAgentTradeParty.
  2. Remove any extra ram:CountrySubDivisionName elements.
  3. Generate the invoice again and validate it.
What it looks like
✗ Triggers the message
<ram:PostalTradeAddress>
  <ram:CountrySubDivisionName>North</ram:CountrySubDivisionName>
  <ram:CountrySubDivisionName>Central</ram:CountrySubDivisionName>
</ram:PostalTradeAddress>
✓ Correct
<ram:PostalTradeAddress>
  <ram:CountrySubDivisionName>North</ram:CountrySubDivisionName>
</ram:PostalTradeAddress>
Technical details

The number of direct ram:CountrySubDivisionName elements in ram:PostalTradeAddress is checked; zero or one element is allowed.

Where the rule applies

Applies to the buyer agent’s postal address in BuyerAgentTradeParty/PostalTradeAddress.

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