Use an allowed value for the date format

Error FX-SCH-A-000671 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 on qdt:DateTimeString is neither empty nor included in the code list allowed by this rule.

What the rule means

The rule restricts the date format to values listed in code list 17; an empty value is also permitted by the test condition.

Please use an allowed format for the order date

The value of format on qdt:DateTimeString is not accepted by this rule. Use a value from the associated code list or leave the value empty.

What to do
  1. Locate qdt:DateTimeString in ram:BuyerOrderReferencedDocument.
  2. Check the value of format against code list 17, or leave it empty.
  3. Generate the invoice again and validate it once more.
Technical details

The check tests whether the value is empty or appears as an enumeration in codedb/cl[@id=17].

Where the rule applies

The rule applies to the format attribute of qdt:DateTimeString for the issue date of the buyer order reference ram:BuyerOrderReferencedDocument.

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