Permitted date format for the referenced document

Error FX-SCH-A-000862 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 on qdt:DateTimeString is not included in the code list defined for it. The test permits a missing or empty format value.

What the rule means

The format indicates how the issue date of the referenced document is to be interpreted. A permitted format code supports unambiguous processing of the date.

Please use a permitted date format for the referenced document

The format attribute of qdt:DateTimeString under ram:FormattedIssueDateTime contains a value that is not permitted. You can update or omit the format value.

What to do
  1. Check the format attribute on qdt:DateTimeString under ram:FormattedIssueDateTime.
  2. Use only a format value permitted by the code list, or omit the attribute.
  3. Generate the invoice again and validate it.
Technical details

The test accepts an empty code value or a value from code list ID 17 in FACTUR-X_EXTENDED_codedb.xml.

Where the rule applies

The rule applies to the format attribute of qdt:DateTimeString under ram:FormattedIssueDateTime in ram:InvoiceReferencedDocument.

Context (rule/@context)
/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ ram:InvoiceReferencedDocument/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]