Specify 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

Within ram:SpecifiedTradeSettlementPaymentMeans, ram:TypeCode does not occur exactly once. The element is either missing or occurs more than once.

What the rule means

ram:TypeCode specifies the payment type. Exactly one element ensures that the payment type is provided once in this payment information section.

Please specify the payment type exactly once

ram:TypeCode is missing from the payment information or appears more than once. You can correct this by including it once.

What to do
  1. Open ram:SpecifiedTradeSettlementPaymentMeans.
  2. Make sure it contains exactly one ram:TypeCode.
  3. Regenerate the invoice 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 a count of 1.

Where the rule applies

The rule applies to the ram:TypeCode element inside ram:SpecifiedTradeSettlementPaymentMeans.

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