Include the address subdivision no more than once

Error FX-SCH-A-000744 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 PostalTradeAddress. The element may appear there no more than once.

What the rule means

The address subdivision may be stated only once so that this part of the address is not duplicated.

Please include the address subdivision no more than once

The subdivision is entered more than once in the sales agent’s postal address. Keep ram:CountrySubDivisionName there no more than once.

What to do
  1. Locate ram:CountrySubDivisionName in the sales agent’s postal address.
  2. Remove duplicates so that the element occurs no more than once.
  3. Generate the invoice again and validate it once more.
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 rule limits the number of direct ram:CountrySubDivisionName elements in ram:PostalTradeAddress to at most one.

Where the rule applies

The rule applies to ram:CountrySubDivisionName in the sales agent’s postal address under ram:PostalTradeAddress.

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