Provide the end user’s address subdivision no more than once

Error FX-SCH-A-000719 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

ram:CountrySubDivisionName contains the subdivision within the postal address. The rule limits this element to at most one occurrence.

Please provide the subdivision of the end user’s address no more than once

The end user’s postal address contains the subdivision more than once. This element may occur at most once.

What to do
  1. Locate ram:PostalTradeAddress under ProductEndUserTradeParty.
  2. Check that ram:CountrySubDivisionName occurs no more than once.
  3. Regenerate the invoice 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 check counts ram:CountrySubDivisionName in ram:PostalTradeAddress and accepts at most one element.

Where the rule applies

The rule applies to the end user’s postal address in ProductEndUserTradeParty.

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