At most one state or province

Error FX-SCH-A-000825 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:PostalTradeAddress contains ram:CountrySubDivisionName more than once. This element may occur at most once in the address.

What the rule means

The element identifies a subdivision of the country, such as a state or province. Multiple values would make this address detail ambiguous.

Please include the state or province only once

The goods recipient’s address contains the state or province more than once. You can resolve this by including this detail only once in the address.

What to do
  1. Find ram:CountrySubDivisionName in the address under ram:PostalTradeAddress.
  2. Remove any extra occurrences so that the element appears no more than once.
  3. Generate the invoice again and check 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 check counts the direct ram:CountrySubDivisionName elements in the ram:PostalTradeAddress context and allows at most one.

Where the rule applies

The rule applies to the address of the legal organization under the goods recipient ram:ShipToTradeParty.

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