Provide the delivery time exactly once

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

ram:OccurrenceDateTime is missing from ram:ActualDeliverySupplyChainEvent or occurs more than once.

What the rule means

The actual delivery date and time places the delivery in time. Requiring exactly one occurrence ensures it is neither missing nor duplicated.

Please provide the delivery time exactly once

The delivery time is missing from the delivery event or appears more than once. You can adjust the XML so that exactly one ram:OccurrenceDateTime is present.

What to do
  1. Find ram:ActualDeliverySupplyChainEvent in the XML.
  2. Make sure it contains exactly one ram:OccurrenceDateTime.
  3. 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 checks whether the number of direct ram:OccurrenceDateTime elements in ram:ActualDeliverySupplyChainEvent is one.

Where the rule applies

The rule applies within the delivery event ram:ActualDeliverySupplyChainEvent.

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