Use an allowed value for the due date type code

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

A non-empty value in ram:DueDateTypeCode is not included in the code list used by this rule. This test allows an empty value.

What the rule means

ram:DueDateTypeCode identifies the type of due date in the tax context being checked. A non-empty value must come from the code list specified for this element.

Please use an allowed value for `ram:DueDateTypeCode`

The value entered in ram:DueDateTypeCode is not included in the code list used for this element. You can correct it using an allowed entry from that code list.

What to do
  1. Find ram:DueDateTypeCode in the relevant ram:ApplicableTradeTax.
  2. Compare its value with the allowed entries in the corresponding code list.
  3. Regenerate the invoice and check it again.
Technical details

The test allows an empty value; otherwise, the value must occur as an enumeration in the code list with ID 16.

Where the rule applies

The rule checks the value of ram:DueDateTypeCode within ram:ApplicableTradeTax 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($codeValue16)=0 or document('FACTUR-X_BASIC-WL_codedb.xml')/codedb/cl[@id=16]/enumeration[@value=$codeValue16]