Allowed value for the date format

Error FX-SCH-A-000951 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 supplied for @format is not included in the value list used by this rule. An empty value is also accepted by the test condition.

What the rule means

The format indicator must either be empty or match a code allowed by the value list. This restricts the value to those provided for this context.

Please use an allowed format for the advance payment date

The value of @format on qdt:DateTimeString does not match the value list provided for this field. You can change the value or leave it empty.

What to do
  1. Find qdt:DateTimeString under ram:FormattedReceivedDateTime for the advance payment.
  2. Check the value of @format against the code list provided for it.
  3. Regenerate the invoice and check it again.
What it looks like
✗ Triggers the message
<ram:FormattedReceivedDateTime>
  <qdt:DateTimeString format="INVALID">20240131</qdt:DateTimeString>
</ram:FormattedReceivedDateTime>
✓ Correct
<ram:FormattedReceivedDateTime>
  <qdt:DateTimeString format="">20240131</qdt:DateTimeString>
</ram:FormattedReceivedDateTime>
Good to know

The test accepts either an empty value or a value included in the code list with identifier 17.

Technical details

The test accepts an empty $codeValue17 value or a value present in the code list with identifier 17.

Where the rule applies

The rule checks the @format attribute of qdt:DateTimeString under ram:FormattedReceivedDateTime of an advance payment.

Context (rule/@context)
/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ ram:SpecifiedAdvancePayment/ram:FormattedReceivedDateTime/qdt:DateTimeString
Test expression (assert/@test)
string-length($codeValue17)=0 or document('FACTUR-X_EXTENDED_codedb.xml')/codedb/cl[@id=17]/enumeration[@value=$codeValue17]