Allowed invoice date format code

Error FX-SCH-A-000515 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 neither empty nor included in the code list used by this rule.

What the rule means

A provided format must match an allowed date format code. The rule also accepts an empty value.

Please use an allowed format for the referenced document date

This rule does not recognize the value of format on qdt:DateTimeString as allowed. You can use a value from the applicable code list or leave the attribute empty.

What to do
  1. Check the format attribute of qdt:DateTimeString.
  2. Use an entry from the applicable code list or leave the attribute empty.
  3. Regenerate the invoice and check it again.
Technical details

The test accepts an empty attribute value or an entry from FACTUR-X_BASIC_codedb.xml, code list 25.

Where the rule applies

The rule applies to the format attribute of qdt:DateTimeString for the referenced document date in the settlement information.

Context (rule/@context)
/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ ram:InvoiceReferencedDocument/ram:FormattedIssueDateTime/qdt:DateTimeString
Test expression (assert/@test)
string-length($codeValue25)=0 or document('FACTUR-X_BASIC_codedb.xml')/codedb/cl[@id=25]/enumeration[@value=$codeValue25]