Use an allowed format code for the period start

Error FX-SCH-A-000594 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 assigned to this date field. This test also accepts an empty value.

What the rule means

The format code specifies how to interpret the billing period start date. A code that is not listed cannot be interpreted according to the intended designation.

Please use a valid format code for the period start

The format code for the billing period start date is not recognized as an allowed value. You can correct it using the code list that applies to this field.

What to do
  1. Find ram:BillingSpecifiedPeriod and its ram:StartDateTime containing udt:DateTimeString.
  2. Compare the format attribute value with the code list that applies to this field.
  3. Replace any unlisted value with an allowed value.
  4. Generate the invoice again and validate it.
Technical details

The test accepts an empty value or a value listed in code list 3; a non-empty value that is not listed fails.

Where the rule applies

This rule applies to the format attribute of the date in udt:DateTimeString under ram:StartDateTime within ram:BillingSpecifiedPeriod.

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