Provide the payment type exactly once

Error FX-SCH-A-000488 Factur-X

Element 'ram:TypeCode' must occur exactly 1 times.

Mandatory rule: As long as it is violated, the invoice is invalid and will be rejected by validators.
What is wrong

ram:TypeCode is missing from ram:SpecifiedTradeSettlementPaymentMeans or occurs more than once. It must occur exactly once.

What the rule means

ram:TypeCode specifies the payment type. A single, unambiguous entry ensures that the payment type is present in the payment information.

Please provide the payment type exactly once

The payment type is missing from the payment information or has been entered more than once. This can be resolved by including ram:TypeCode once.

What to do
  1. Find ram:SpecifiedTradeSettlementPaymentMeans.
  2. Include exactly one ram:TypeCode in it and remove any additional occurrences.
  3. Generate the invoice again and validate it again.
What it looks like
✗ Triggers the message
<ram:SpecifiedTradeSettlementPaymentMeans/>
✓ Correct
<ram:SpecifiedTradeSettlementPaymentMeans>
  <ram:TypeCode/>
</ram:SpecifiedTradeSettlementPaymentMeans>
Technical details

The rule counts the direct ram:TypeCode child elements of ram:SpecifiedTradeSettlementPaymentMeans and requires the value 1.

Where the rule applies

The rule applies to the payment type in ram:SpecifiedTradeSettlementPaymentMeans within the settlement information at document level.

Context (rule/@context)
/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ ram:SpecifiedTradeSettlementPaymentMeans
Test expression (assert/@test)
count(ram:TypeCode)=1