Allowed format code for the delivery date and time

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 the format attribute does not match a value listed in the code list identified by 3. An empty value is excluded from this check.

What the rule means

An allowed format code is required so that the date and time value of the actual delivery event can be interpreted according to the indicated format.

Please use an allowed format code for the delivery date and time

The format code for the actual delivery date and time was not found in the relevant code list. Use a value listed there.

What to do
  1. Find the format attribute on udt:DateTimeString in the actual delivery event.
  2. Compare its value with the allowed entries in the code list for this format code.
  3. Replace any unlisted value with an allowed value.
  4. Generate the invoice again and validate it.
Technical details

The test accepts an empty value or a value present as enumeration/@value under cl with id equal to 3 in FACTUR-X_EXTENDED_codedb.xml.

Where the rule applies

The rule applies to the format attribute of udt:DateTimeString in the invoice’s 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]