Provide no more than one subdivision in the delivery organization’s address

Error FX-SCH-A-000846 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 postal address of ram:SpecifiedLegalOrganization. The element may occur there no more than once.

What the rule means

ram:CountrySubDivisionName identifies a subdivision within the country specified for the legal delivery organization’s address. Multiple values for this element are not permitted here.

Please enter no more than one subdivision in the delivery organization’s address

ram:CountrySubDivisionName has been entered more than once in the legal delivery organization’s postal address. You can limit the entry there to no more than one.

What to do
  1. Open the postal address within ram:SpecifiedLegalOrganization of the final delivery party.
  2. Limit ram:CountrySubDivisionName there to no more than one entry.
  3. Generate the invoice again and validate it again.
What it looks like
✗ Triggers the message
<ram:PostalTradeAddress>
  <ram:CountrySubDivisionName>Region A</ram:CountrySubDivisionName>
  <ram:CountrySubDivisionName>Region B</ram:CountrySubDivisionName>
</ram:PostalTradeAddress>
✓ Correct
<ram:PostalTradeAddress>
  <ram:CountrySubDivisionName>Region A</ram:CountrySubDivisionName>
</ram:PostalTradeAddress>
Technical details

The test counts direct ram:CountrySubDivisionName elements within the relevant ram:PostalTradeAddress and permits no more than one.

Where the rule applies

The rule applies to the postal address within ram:SpecifiedLegalOrganization of the final delivery party.

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