Exactly one ram:CompleteNumber in ram:FaxUniversalCommunication

Error FX-SCH-A-000933 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 is missing from ram:FaxUniversalCommunication or occurs more than once. It must occur exactly once.

What the rule means

The contact’s fax communication contains exactly one complete number element in this XML context.

Please include the contact’s fax number exactly once

ram:CompleteNumber is missing from the contact’s fax communication or appears more than once. Make sure the element is present exactly once.

What to do
  1. Find the contact in ram:DefinedTradeContact under ram:PayerTradeParty.
  2. Check that ram:FaxUniversalCommunication contains exactly one ram:CompleteNumber.
  3. Generate the invoice again and validate it.
What it looks like
✗ Triggers the message
<ram:PayerTradeParty>
  <ram:DefinedTradeContact>
    <ram:FaxUniversalCommunication/>
  </ram:DefinedTradeContact>
</ram:PayerTradeParty>
✓ Correct
<ram:PayerTradeParty>
  <ram:DefinedTradeContact>
    <ram:FaxUniversalCommunication>
      <ram:CompleteNumber/>
    </ram:FaxUniversalCommunication>
  </ram:DefinedTradeContact>
</ram:PayerTradeParty>
Technical details

The rule counts direct ram:CompleteNumber elements under ram:FaxUniversalCommunication and requires exactly one occurrence.

Where the rule applies

The rule applies to ram:CompleteNumber within the contact’s fax communication under ram:PayerTradeParty/ram:DefinedTradeContact.

Context (rule/@context)
/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ ram:PayerTradeParty/ram:DefinedTradeContact/ram:FaxUniversalCommunication
Test expression (assert/@test)
count(ram:CompleteNumber)=1