Invalid date format

Error FX-SCH-A-000524 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 udt:DateTimeString is not included in the code list specified for it. An empty value does not trigger this error according to the test condition.

What the rule means

The format indicates how the date value in udt:DateTimeString is to be interpreted. A disallowed format code can prevent the due date from being interpreted correctly.

Please use an allowed format for the due date

The format on the due date’s udt:DateTimeString is not included in the specified code list. You can correct the entry by using a format allowed in that list.

What to do
  1. Locate the due date in the payment terms.
  2. Check the format attribute of udt:DateTimeString and, if it is supplied, use a value from the specified code list.
  3. Regenerate the invoice and validate it again.
Technical details

The test accepts an empty format or a value from code list 3 of the Factur-X code database.

Where the rule applies

The rule applies to the format attribute of udt:DateTimeString for the due date in the payment terms.

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