Provide at most one country subdivision

Error FX-SCH-A-001163 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 manufacturer's ram:PostalTradeAddress.

What the rule means

A country subdivision, such as a region or state, is provided no more than once in this address.

Please provide at most one country subdivision for the manufacturer

The product manufacturer's postal address contains the country subdivision more than once. You can resolve this by limiting the information to no more than one element.

What to do
  1. Locate the postal address under ram:ManufacturerTradeParty.
  2. Check the number of ram:CountrySubDivisionName elements.
  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 check verifies that there is no more than one direct ram:CountrySubDivisionName element in ram:PostalTradeAddress. The element may also be absent.

Where the rule applies

The rule applies to the manufacturer's postal address for a product within an invoice line.

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