Exactly one event date for each actual delivery event

Error FX-SCH-A-001073 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 does not occur exactly once in ram:ActualDeliverySupplyChainEvent. The element is either missing or appears more than once.

What the rule means

The actual delivery event must be described by exactly one occurrence of its event date and time. If it is missing or repeated, the event date is not represented as a single, unambiguous entry.

Please provide the actual delivery date exactly once

The event date for the actual delivery is missing or entered more than once. This section requires exactly one entry.

What to do
  1. Locate the invoice line’s ram:ActualDeliverySupplyChainEvent.
  2. Ensure it contains exactly one ram:OccurrenceDateTime.
  3. Generate the invoice again and validate it again.
Technical details

The test counts the direct ram:OccurrenceDateTime elements in the current ram:ActualDeliverySupplyChainEvent and requires the count to be 1.

Where the rule applies

The rule applies to ram:ActualDeliverySupplyChainEvent of an invoice line.

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