Disallowed date format code

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 @format in qdt:DateTimeString is not included in the code list used by this check. The test explicitly accepts an empty value.

What the rule means

The code identifies the format used for the date of the referenced order document. A value not in the code list can prevent the date from being interpreted unambiguously.

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

The date-format code on the ultimate customer’s referenced order document is not in the allowed code list. You can correct it using the code list; this check accepts an empty value.

What to do
  1. Locate the qdt:DateTimeString of the ultimate customer’s referenced order document.
  2. Check the value of @format against the allowed code list.
  3. Generate the invoice again and validate it again.
Technical details

The check accepts the value if it is empty or appears in enumeration id=17 in FACTUR-X_EXTENDED_codedb.xml.

Where the rule applies

The rule applies to the @format date-format code of qdt:DateTimeString on the ultimate customer order reference document in 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]