Allowed format code for the despatch advice date

Error FX-SCH-A-000791 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 17. An empty value is excluded from this check.

What the rule means

An allowed format code is required so that the issue date of the referenced despatch advice can be interpreted according to the indicated format.

Please use an allowed format code for the despatch advice date

The format code for the despatch advice’s issue date was not found in the relevant code list. Use a value listed there.

What to do
  1. Find the format attribute on qdt:DateTimeString in the despatch advice’s issue date.
  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 17 in FACTUR-X_EXTENDED_codedb.xml.

Where the rule applies

The rule applies to the format attribute of qdt:DateTimeString in the issue date of the referenced despatch advice.

Context (rule/@context)
/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeDelivery/ ram:DespatchAdviceReferencedDocument/ram:FormattedIssueDateTime/qdt:DateTimeString
Test expression (assert/@test)
string-length($codeValue17)=0 or document('FACTUR-X_EXTENDED_codedb.xml')/codedb/cl[@id=17]/enumeration[@value=$codeValue17]