Invalid due date type code

Error FX-SCH-A-000509 Factur-X

Value of 'ram:DueDateTypeCode' 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 ram:DueDateTypeCode is neither empty nor included in the code list allowed for this element.

What the rule means

ram:DueDateTypeCode identifies the type of date relevant to the due date. An allowed value ensures that this date type is stated in a standardized way.

Please use an allowed due date type code

The document-level VAT breakdown contains a value in ram:DueDateTypeCode that is not allowed. An entry from the designated code list resolves the discrepancy.

What to do
  1. Locate ram:DueDateTypeCode in the VAT breakdown.
  2. Check the value against the designated code list.
  3. Use a value listed there or leave ram:DueDateTypeCode empty.
  4. Generate the invoice again and validate it.
Technical details

The test accepts an empty code value or a value listed in FACTUR-X_BASIC_codedb.xml under code list ID 20.

Where the rule applies

The rule applies to ram:DueDateTypeCode in the document-level VAT breakdown.

Context (rule/@context)
/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ ram:ApplicableTradeTax/ram:DueDateTypeCode
Test expression (assert/@test)
string-length($codeValue20)=0 or document('FACTUR-X_BASIC_codedb.xml')/codedb/cl[@id=20]/enumeration[@value=$codeValue20]