At most one payer role code

Error FX-SCH-A-000929 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

ram:RoleCode occurs more than once in ram:PayerTradeParty. The element may occur at most once.

What the rule means

The rule limits the payer's role code to at most one element.

Please use at most one role code for the payer

More than one ram:RoleCode is present for the payer. You can resolve this by including only one such element.

What to do
  1. Locate the ram:RoleCode elements in ram:PayerTradeParty.
  2. Remove the extra elements so that no more than one remains.
  3. Generate the invoice again and validate it.
What it looks like
✗ Triggers the message
<ram:PayerTradeParty>
  <ram:RoleCode>1</ram:RoleCode>
  <ram:RoleCode>2</ram:RoleCode>
</ram:PayerTradeParty>
✓ Correct
<ram:PayerTradeParty>
  <ram:RoleCode>1</ram:RoleCode>
</ram:PayerTradeParty>
Technical details

The rule counts the direct ram:RoleCode elements within ram:PayerTradeParty and requires no more than one.

Where the rule applies

The number of ram:RoleCode elements is checked in ram:PayerTradeParty within the settlement information.

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