Allowed format for the order date

Error FX-SCH-A-000785 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 DateTimeString is not included in the code list referenced by this rule. This test explicitly allows an empty value.

What the rule means

format identifies the date format of the end customer order document. The test accepts only a value from the referenced code list or an empty value.

Please use an allowed format for the order date

The value of format on DateTimeString is not recognized by the code list used for this rule. Use a value included in that list or leave the value empty.

What to do
  1. Locate DateTimeString under FormattedIssueDateTime in UltimateCustomerOrderReferencedDocument.
  2. Compare the value of format with the code list used by the rule, or leave it empty.
  3. Generate the invoice again and validate it.
Technical details

The test passes if $codeValue17 is empty or appears as an enumeration in the code list with ID 17.

Where the rule applies

The rule checks the value of format on DateTimeString in the formatted issue date of the end customer order document.

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