At most one subdivision in the address

Error FX-SCH-A-000999 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 the ram:PostalTradeAddress of the payee’s legal organization. The element may occur at most once.

What the rule means

ram:CountrySubDivisionName contains the name of a subdivision within a country. The rule limits the number of these entries in the address to one.

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

The address of the payee’s legal organization contains more than one subdivision entry. You can remove the repeated entry there.

What to do
  1. Find the ram:PostalTradeAddress of the payee’s legal organization.
  2. Check its ram:CountrySubDivisionName elements and leave no more than one.
  3. Generate the invoice again and validate it once more.
What it looks like
✗ Triggers the message
<ram:PostalTradeAddress>
  <ram:CountrySubDivisionName/>
  <ram:CountrySubDivisionName/>
</ram:PostalTradeAddress>
✓ Correct
<ram:PostalTradeAddress>
  <ram:CountrySubDivisionName/>
</ram:PostalTradeAddress>
Technical details

The rule checks that ram:CountrySubDivisionName occurs no more than once within ram:PostalTradeAddress; zero occurrences are allowed.

Where the rule applies

The rule applies to the postal address of the payee’s legal organization in the payment terms.

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