Allowed payment type code

Error FX-SCH-A-001008 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 does not match an allowed entry in the code list used for this element.

What the rule means

ram:TypeCode identifies the payment type. An allowed code maps the payment information to a value in the designated code list.

Please use an allowed code for the payment type

The value of ram:TypeCode is not recognized by the rule as an allowed code. You can adjust it using the code list applied to this element.

What to do
  1. Find ram:TypeCode inside ram:SpecifiedTradeSettlementPaymentMeans.
  2. Compare its value with the allowed entries in the code list used by the rule.
  3. Regenerate the invoice and validate it again.
What it looks like
✗ Triggers the message
<ram:SpecifiedTradeSettlementPaymentMeans>
  <ram:TypeCode>NOT-A-CODE</ram:TypeCode>
</ram:SpecifiedTradeSettlementPaymentMeans>
✓ Correct
<ram:SpecifiedTradeSettlementPaymentMeans>
  <ram:TypeCode>58</ram:TypeCode>
</ram:SpecifiedTradeSettlementPaymentMeans>
Technical details

The rule checks the value of ram:TypeCode against entries in the code list identified by 43. An empty value also satisfies this test.

Where the rule applies

The rule applies to the value of ram:TypeCode inside ram:SpecifiedTradeSettlementPaymentMeans.

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