Provide no more than one seller role code

Error FX-SCH-A-000774 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:SellerTradeParty contains more than one ram:RoleCode.

What the rule means

The seller details can contain at most one role code.

Please provide no more than one role code for the seller

More than one role code is entered in the seller details. You can resolve this by limiting the number of ram:RoleCode elements to one at most.

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

The rule counts the direct ram:RoleCode elements under ram:SellerTradeParty and allows zero or one.

Where the rule applies

Within ram:SellerTradeParty, which contains the seller’s details.

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