Invalid date format

Error FX-SCH-A-000642 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 @format attribute in qdt:DateTimeString contains a value that is not permitted in the date-format code list. This check does not reject an empty format value.

What the rule means

The date format indicates how to read the date value in the referenced document. A code that is not permitted may prevent the date from being interpreted according to the stated format.

Please use an allowed date format for the referenced document

The additional referenced document with ram:TypeCode 50 has a value for @format that is not permitted. You can compare the format value with the allowed values.

What to do
  1. Find the affected ram:AdditionalReferencedDocument with ram:TypeCode 50.
  2. Check the value of @format in qdt:DateTimeString against the allowed values in the code list.
  3. Generate the invoice again and validate it once more.
Technical details

The rule checks the value of @format against the entries in code list ID 17 in FACTUR-X_EXTENDED_codedb.xml; an empty value is accepted by this test.

Where the rule applies

Applies to the date format in qdt:DateTimeString of an additional referenced document with ram:TypeCode 50 at document level.

Context (rule/@context)
/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ ram:AdditionalReferencedDocument[ram:TypeCode="50"]/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]