Invalid format code for the ultimate customer order date

Error FX-SCH-A-001072 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 list of values allowed in this context. The test also allows an empty value.

What the rule means

The format code identifies how the date is represented. A code that is not allowed may prevent the date from being interpreted according to the intended coding.

Please use an allowed format code for the ultimate customer order date

The format value on the ultimate customer order date is not accepted in this context. Use a value allowed by the related code list, or leave the value empty.

What to do
  1. Locate the qdt:DateTimeString in the invoice line’s ram:UltimateCustomerOrderReferencedDocument.
  2. Check the format attribute value against the code list for this context.
  3. Replace it with an allowed code from that list or leave it empty.
  4. Generate the invoice again and validate it again.
Technical details

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

Where the rule applies

The rule applies to the format of the date in FormattedIssueDateTime within UltimateCustomerOrderReferencedDocument of an invoice line.

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