Invalid date format

Error FX-SCH-A-000512 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 the end date’s udt:DateTimeString is neither empty nor included in the allowed code list for date formats.

What the rule means

@format indicates the format used for the value of udt:DateTimeString. An allowed format enables correct interpretation of the billing period’s end date.

Please use an allowed format for the billing period end date

For the billing period end date, @format contains a value that is not allowed. Use a format code from the designated code list or leave the attribute empty.

What to do
  1. Locate udt:DateTimeString under ram:EndDateTime for the billing period.
  2. Check the value of @format against the designated code list.
  3. Use a value listed there or leave @format empty.
  4. Generate the invoice again and validate it.
Technical details

The test accepts an empty format code or a value listed in FACTUR-X_BASIC_codedb.xml under code list ID 3.

Where the rule applies

The rule applies to the @format attribute of udt:DateTimeString for the billing period’s end date at document level.

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_BASIC_codedb.xml')/codedb/cl[@id=3]/enumeration[@value=$codeValue3]