Use an allowed date format code

Error FX-SCH-A-001023 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 is not included in the value list used by this rule. An empty value is also accepted by this check.

What the rule means

The format code identifies the representation of the date or time value. This rule cannot confirm an unlisted value as an allowed format code.

Please use an allowed format code for the reference date

The value of @format on qdt:DateTimeString is not included in the value list used for it. Compare the entered value with that list.

What to do
  1. Find qdt:DateTimeString for the affected reference date and read the value of @format.
  2. Compare the value with the date and time format value list.
  3. Generate the invoice again and validate it.
Technical details

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

Where the rule applies

The rule applies to the value of @format on qdt:DateTimeString within ram:FormattedIssueDateTime of an additional referenced document on an invoice line.

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