At most one role code for the payee

Error FX-SCH-A-000908 Factur-X

Element 'ram:RoleCode' may occur at maximum 1 times.

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

PayeeTradeParty contains more than one ram:RoleCode element.

What the rule means

The payee’s role designation may occur at most once in this element.

Please include no more than one role code for the payee

The payee has more than one ram:RoleCode element. You can resolve this by keeping no more than one such element.

What to do
  1. Open PayeeTradeParty.
  2. Make sure it contains no more than one ram:RoleCode element.
  3. Generate the invoice again and validate it.
What it looks like
✗ Triggers the message
<ram:PayeeTradeParty>
  <ram:RoleCode>A</ram:RoleCode>
  <ram:RoleCode>B</ram:RoleCode>
</ram:PayeeTradeParty>
✓ Correct
<ram:PayeeTradeParty>
  <ram:RoleCode>A</ram:RoleCode>
</ram:PayeeTradeParty>
Technical details

The rule limits the number of ram:RoleCode elements in PayeeTradeParty to one at most.

Where the rule applies

This rule applies to PayeeTradeParty, the payee, and its ram:RoleCode element.

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