Disallowed value in @format

Error FX-SCH-A-000622 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 non-empty value of the @format attribute is not included in the code list defined for it. An empty value also passes this specific check.

What the rule means

@format specifies the format of the date value. A non-empty value must match the code list defined for this attribute so that the date can be interpreted according to the stated format.

Please use an allowed date format for the start of the billing period

The @format attribute on the date value for the start of the billing period contains a disallowed value. Using a value from the defined code list resolves the issue.

What to do
  1. Check @format on the udt:DateTimeString for the start of the billing period.
  2. Compare the non-empty attribute value with the codes allowed for the date format.
  3. Generate the invoice again and validate it again.
Technical details

The check accepts an empty value or a value found in codedb/cl[@id=3]/enumeration.

Where the rule applies

The rule applies to the @format attribute of udt:DateTimeString at the start of an invoice line’s billing period.

Context (rule/@context)
/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ ram:SpecifiedLineTradeSettlement/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]