Provide one ram:CompleteDateTime element

Error FX-SCH-A-000316 Factur-X

Element 'ram:CompleteDateTime' 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

The ram:EffectiveSpecifiedPeriod element does not contain exactly one ram:CompleteDateTime element. The element is either missing or repeated.

What the rule means

The complete date or time value is part of the specified period and must be present there exactly once.

Please provide `ram:CompleteDateTime` in the period

ram:CompleteDateTime is missing or repeated in ram:EffectiveSpecifiedPeriod. Include it there exactly once.

What to do
  1. Find ram:EffectiveSpecifiedPeriod in the invoice document data.
  2. Add exactly one ram:CompleteDateTime element or remove any duplicates.
  3. Generate the invoice again and validate it.
What it looks like
✗ Triggers the message
<ram:EffectiveSpecifiedPeriod/>
✓ Correct
<ram:EffectiveSpecifiedPeriod>
  <ram:CompleteDateTime/>
</ram:EffectiveSpecifiedPeriod>
Technical details

The test counts the direct child elements ram:CompleteDateTime of ram:EffectiveSpecifiedPeriod and requires exactly one.

Where the rule applies

The rule applies within the ram:EffectiveSpecifiedPeriod period in the invoice document data.

Context (rule/@context)
/rsm:CrossIndustryInvoice/rsm:ExchangedDocument/ram:EffectiveSpecifiedPeriod
Test expression (assert/@test)
count(ram:CompleteDateTime)=1