Delivery event requires exactly one occurrence date

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 occurs more than once.

What the rule means

The occurrence date states when the actual delivery took place. Exactly one date is required to identify the delivery time unambiguously.

Please provide exactly one occurrence date for the delivery event

The actual delivery event is missing its occurrence date, or the date is provided more than once. You can adjust the information so that exactly one date is present.

What to do
  1. Locate ram:ActualDeliverySupplyChainEvent in the invoice line.
  2. Make sure that it contains ram:OccurrenceDateTime exactly once.
  3. Generate the invoice again and validate it again.
What it looks like
✗ Triggers the message
<ram:ActualDeliverySupplyChainEvent/>
✓ Correct
<ram:ActualDeliverySupplyChainEvent>
  <ram:OccurrenceDateTime/>
</ram:ActualDeliverySupplyChainEvent>
Technical details

The check counts the direct ram:OccurrenceDateTime elements within ram:ActualDeliverySupplyChainEvent and requires the count to be 1.

Where the rule applies

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

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