Invalid date format for the due date

Error FX-SCH-A-000605 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 udt:DateTimeString is not in the designated code list. The test accepts a missing or empty value.

What the rule means

@format indicates how the content of udt:DateTimeString is to be interpreted. A format code that is not permitted cannot be classified using the designated code list.

Please use an allowed date format for the due date

The format on the due date does not match the designated code list. You can change or omit the attribute.

What to do
  1. Find udt:DateTimeString under ram:DueDateDateTime in the payment terms.
  2. Check the value of the @format attribute.
  3. Use a value from the designated code list, or omit the @format attribute or leave it empty.
  4. Generate the invoice again and validate it again.
What it looks like
✗ Triggers the message
<ram:DueDateDateTime>
  <udt:DateTimeString format="INVALID-CODE">20261115</udt:DateTimeString>
</ram:DueDateDateTime>
✓ Correct
<ram:DueDateDateTime>
  <udt:DateTimeString>20261115</udt:DateTimeString>
</ram:DueDateDateTime>
Technical details

The test accepts an empty value or a value from code list cl with ID 3.

Where the rule applies

The rule applies to udt:DateTimeString under ram:DueDateDateTime in the payment terms.

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