Allowed code for the date format

Error FX-SCH-A-001010 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 @format on udt:DateTimeString is neither empty nor included in the code list defined for the date format. The rule explicitly allows an empty value.

What the rule means

The format code indicates how to interpret the value in udt:DateTimeString. A value that is not allowed can make the exchange-rate date ambiguous.

Please use an allowed format code for the exchange-rate date

The format code on the exchange-rate date is not recognized as an allowed value. Leave it empty or use an allowed code.

What to do
  1. Find udt:DateTimeString for the exchange-rate date.
  2. Check the value of @format and leave it empty or use an allowed code.
  3. Generate the invoice again and validate it.
Technical details

The test accepts @format when its value is empty or appears in the enumeration of code list ID 3 in FACTUR-X_EXTENDED_codedb.xml.

Where the rule applies

The rule applies to @format on udt:DateTimeString for the exchange-rate date in the currency exchange details for tax amounts.

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