Exactly one ram:CompleteNumber for telephone communication

Error FX-SCH-A-001095 Factur-X

Element 'ram:CompleteNumber' must occur exactly 1 times.

Mandatory rule: As long as it is violated, the invoice is invalid and will be rejected by validators.
What is wrong

ram:CompleteNumber does not occur exactly once in ram:TelephoneUniversalCommunication: it is either missing or occurs more than once.

What the rule means

ram:CompleteNumber contains the complete telephone number. Exactly one such element is required for the telephone reference to have an unambiguous structure.

Please provide exactly one complete telephone number

ram:CompleteNumber is missing from the telephone communication reference or occurs more than once. You can adjust the reference so that it contains exactly one such element.

What to do
  1. Find ram:TelephoneUniversalCommunication in the ship-to party contact.
  2. Add exactly one ram:CompleteNumber element inside it, or remove any extra occurrences.
  3. Regenerate the invoice and validate it again.
What it looks like
✗ Triggers the message
<ram:TelephoneUniversalCommunication/>
✓ Correct
<ram:TelephoneUniversalCommunication>
  <ram:CompleteNumber>+33123456789</ram:CompleteNumber>
</ram:TelephoneUniversalCommunication>
Technical details

The test counts the direct ram:CompleteNumber elements under ram:TelephoneUniversalCommunication and requires exactly one occurrence.

Where the rule applies

The rule applies to ram:TelephoneUniversalCommunication within the ship-to party contact for the delivery address of an invoice line.

Context (rule/@context)
/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ ram:SpecifiedLineTradeDelivery/ram:ShipToTradeParty/ram:DefinedTradeContact/ ram:TelephoneUniversalCommunication
Test expression (assert/@test)
count(ram:CompleteNumber)=1