Allowed format for the delivery date

Error FX-SCH-A-000786 Factur-X

Value of '@format' is not allowed.

Mandatory rule: As long as it is violated, the invoice is invalid and will be rejected by validators.
What is wrong

The value of format on DateTimeString is not included in the code list referenced by this rule. This test explicitly allows an empty value.

What the rule means

format identifies the date format of the actual delivery event. The test accepts only a value from the referenced code list or an empty value.

Please use an allowed format for the delivery date

The value of format on DateTimeString for the actual delivery is not recognized by the code list used for this rule. Use a value included in that list or leave the value empty.

What to do
  1. Locate DateTimeString under OccurrenceDateTime in ActualDeliverySupplyChainEvent.
  2. Compare the value of format with the code list used by the rule, or leave it empty.
  3. Generate the invoice again and validate it.
Technical details

The test passes if $codeValue3 is empty or appears as an enumeration in the code list with ID 3.

Where the rule applies

The rule checks the value of format on DateTimeString in the actual delivery event.

Context (rule/@context)
/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeDelivery/ ram:ActualDeliverySupplyChainEvent/ram:OccurrenceDateTime/udt:DateTimeString
Test expression (assert/@test)
string-length($codeValue3)=0 or document('FACTUR-X_EXTENDED_codedb.xml')/codedb/cl[@id=3]/enumeration[@value=$codeValue3]