Allowed format value

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

If format has a value, it must be listed in the value list used by this rule. A value not listed there is not allowed; an empty value also satisfies this check.

What the rule means

The value list ensures that date and time formats are expressed using defined values in the XML.

Please use an allowed value for format

The specified date and time format is not included in the value list used by this rule. Use a value listed there or leave the value empty.

What to do
  1. Check the format value on the affected qdt:DateTimeString.
  2. Replace a value not listed in the value list used by this rule with a listed value, or leave the value empty.
  3. Generate the invoice again and validate it.
Technical details

The test accepts an empty format value or a value present in enumeration 17 of the referenced code list.

Where the rule applies

The rule checks the format value on qdt:DateTimeString within ram:FormattedIssueDateTime of a referenced document on the agreement level of 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]