At most one subdivision in the address

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

ram:CountrySubDivisionName occurs more than once in ram:PostalTradeAddress. The rule allows this element to occur at most once.

What the rule means

ram:CountrySubDivisionName contains a subdivision of the country, such as a region or state. This rule does not allow multiple values for this address field.

Please include no more than one subdivision in the payee’s address

The payee’s address contains ram:CountrySubDivisionName more than once. You can reduce it to a single element.

What to do
  1. Open the payee’s ram:PostalTradeAddress.
  2. Keep no more than one ram:CountrySubDivisionName element.
  3. Generate the invoice again and validate it again.
What it looks like
✗ Triggers the message
<ram:PostalTradeAddress>
  <ram:CountrySubDivisionName>A</ram:CountrySubDivisionName>
  <ram:CountrySubDivisionName>B</ram:CountrySubDivisionName>
</ram:PostalTradeAddress>
✓ Correct
<ram:PostalTradeAddress>
  <ram:CountrySubDivisionName>A</ram:CountrySubDivisionName>
</ram:PostalTradeAddress>
Technical details

The test limits the number of direct ram:CountrySubDivisionName children in ram:PostalTradeAddress to one or fewer.

Where the rule applies

Applies to the postal address of the payee’s legal organization in the settlement section.

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