Invalid end date format

Error FX-SCH-A-000859 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 the format attribute is not empty, its value must be present in the applicable code list. The supplied format value is not allowed there.

What the rule means

An allowed format declaration defines how to interpret the end date value. A value that is not allowed can result in inconsistent date interpretation.

Please use an allowed format for the end date

The format attribute on the end date contains a value that is not allowed. Use a value from the applicable code list or leave the attribute empty.

What to do
  1. Check the value of the format attribute on udt:DateTimeString within ram:EndDateTime.
  2. Use a value allowed by the code list or leave the attribute empty.
  3. Generate the invoice again and validate it once more.
Technical details

The test accepts an empty format attribute or a value from the code list identified by 3.

Where the rule applies

The rule applies to the format attribute of udt:DateTimeString within ram:EndDateTime of the ram:BillingSpecifiedPeriod billing period.

Context (rule/@context)
/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ ram:BillingSpecifiedPeriod/ram:EndDateTime/udt:DateTimeString
Test expression (assert/@test)
string-length($codeValue3)=0 or document('FACTUR-X_EXTENDED_codedb.xml')/codedb/cl[@id=3]/enumeration[@value=$codeValue3]