Exactly one delivery occurrence date and time required

Error FX-SCH-A-000171 Factur-X

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

Within ram:ActualDeliverySupplyChainEvent, ram:OccurrenceDateTime does not occur exactly once. The element is missing or occurs more than once.

What the rule means

The delivery occurrence date and time indicate when the actual delivery event took place.

Please provide exactly one actual delivery date and time

The actual delivery event is missing ram:OccurrenceDateTime or contains it more than once. You can correct the number of these entries.

What to do
  1. Check ram:ActualDeliverySupplyChainEvent and make sure it contains exactly one ram:OccurrenceDateTime.
  2. Regenerate the invoice and validate it again.
What it looks like
✗ Triggers the message
<ram:ActualDeliverySupplyChainEvent/>
✓ Correct
<ram:ActualDeliverySupplyChainEvent>
  <ram:OccurrenceDateTime/>
</ram:ActualDeliverySupplyChainEvent>
Technical details

The test counts the direct ram:OccurrenceDateTime elements in ram:ActualDeliverySupplyChainEvent and requires exactly one occurrence.

Where the rule applies

The rule applies to ram:ActualDeliverySupplyChainEvent in the invoice delivery section.

Context (rule/@context)
/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeDelivery/ ram:ActualDeliverySupplyChainEvent
Test expression (assert/@test)
count(ram:OccurrenceDateTime)=1