Use an allowed date format

Error FX-SCH-A-000646 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 code list allowed for this attribute. An empty value is not rejected by this check.

What the rule means

A non-empty value of @format must match an entry in the code list defined for this attribute, so that the date or time format follows a defined designation.

Please use an allowed format for the referenced document's date

The value entered for @format on the qdt:DateTimeString of the referenced document with the value 916 is not allowed. Use a value from the designated code list or leave the value empty.

What to do
  1. Find the qdt:DateTimeString under ram:FormattedIssueDateTime in the referenced document with the ram:TypeCode value 916.
  2. Check the @format value against the code list designated for this attribute; an empty value is also allowed.
  3. Generate the invoice again and validate it again.
Good to know

An empty value is also allowed.

Technical details

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

Where the rule applies

On the qdt:DateTimeString under ram:FormattedIssueDateTime of the ram:AdditionalReferencedDocument whose ram:TypeCode has the value 916.

Context (rule/@context)
/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ ram:AdditionalReferencedDocument[ram:TypeCode="916"]/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]