Telephone number requires a complete number

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

Under ram:TelephoneUniversalCommunication, ram:CompleteNumber does not occur exactly once. The rule requires exactly one such element.

What the rule means

ram:CompleteNumber carries the complete number for the contact’s telephone communication. Exactly one element follows the expected XML structure.

Please include exactly one complete telephone number for the contact

The contact’s telephone communication is missing ram:CompleteNumber, or the element occurs more than once. You can adjust the XML so that it contains exactly one element.

What to do
  1. Find the telephone communication under DefinedTradeContact in ShipToTradeParty.
  2. Make sure ram:TelephoneUniversalCommunication contains exactly one ram:CompleteNumber element.
  3. Regenerate the invoice and check it again.
What it looks like
✗ Triggers the message
<ram:TelephoneUniversalCommunication/>
✓ Correct
<ram:TelephoneUniversalCommunication>
  <ram:CompleteNumber/>
</ram:TelephoneUniversalCommunication>
Technical details

The XPath test counts the direct ram:CompleteNumber elements in ram:TelephoneUniversalCommunication and requires exactly one.

Where the rule applies

Applies to the contact’s telephone communication under DefinedTradeContact in ShipToTradeParty.

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