Use an allowed due date type code

Error FX-SCH-A-000854 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

If ram:DueDateTypeCode has a value, that value must occur in the code list allowed for it. A value not in the list is not allowed; this test accepts an empty value.

What the rule means

ram:DueDateTypeCode identifies the type of due date. Its value must belong to the code list specified for it.

Please use an allowed code for the due date type

The value entered in ram:DueDateTypeCode is not included in the code list allowed for it. Replace it with a code from that list.

What to do
  1. Locate ram:DueDateTypeCode in the relevant ram:ApplicableTradeTax.
  2. Compare its value with the codes allowed for it.
  3. Replace any value not in the list with an allowed code.
  4. Generate the invoice again and validate it once more.
Technical details

The test accepts an empty string value or a value listed as an enumeration under cl[@id=27] in FACTUR-X_EXTENDED_codedb.xml.

Where the rule applies

The rule checks the value of ram:DueDateTypeCode within the document-level VAT breakdown.

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