Use an allowed format code for the tax date

Error FX-SCH-A-000591 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:DateString is not included in the code list assigned to this attribute. This test also accepts an empty value.

What the rule means

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

Please use a valid format code for the tax date

The tax date’s format code 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 the format attribute of udt:DateString under ram:TaxPointDate.
  2. Compare the 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 27; 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:DateString under ram:TaxPointDate in the document-level tax details.

Context (rule/@context)
/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ ram:ApplicableTradeTax/ram:TaxPointDate/udt:DateString
Test expression (assert/@test)
string-length($codeValue27)=0 or document('FACTUR-X_EN16931_codedb.xml')/codedb/cl[@id=27]/enumeration[@value=$codeValue27]