Payment type code is not allowed

Error FX-SCH-A-000489 Factur-X

Value of 'ram:TypeCode' 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:TypeCode is not included in the code list referenced by this rule. This check does not reject an empty value.

What the rule means

The code identifies the payment type. A code that is not allowed cannot classify the payment details as intended.

Please use an allowed code for the payment type

The value entered in ram:TypeCode is not included in the code list referenced for this invoice. You can adjust the code in this field.

What to do
  1. Find ram:TypeCode in ram:SpecifiedTradeSettlementPaymentMeans.
  2. Compare its value with the codes allowed for ram:TypeCode.
  3. Replace any disallowed value with an allowed code.
  4. Generate the invoice again and validate it once more.
Technical details

The check accepts an empty string value or a value present in code list 12 in FACTUR-X_BASIC-WL_codedb.xml.

Where the rule applies

The rule applies to ram:TypeCode within ram:SpecifiedTradeSettlementPaymentMeans in the payment details.

Context (rule/@context)
/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ ram:SpecifiedTradeSettlementPaymentMeans/ram:TypeCode
Test expression (assert/@test)
string-length($codeValue12)=0 or document('FACTUR-X_BASIC-WL_codedb.xml')/codedb/cl[@id=12]/enumeration[@value=$codeValue12]