Provide no more than one RoleCode for the seller

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

The SellerTradeParty contains multiple RoleCode elements. No more than one may occur.

What the rule means

The XML structure allows at most one RoleCode for the seller. Multiple such elements would exceed this defined cardinality.

Please provide no more than one RoleCode for the seller

More than one RoleCode element is present for the seller. You can resolve this by ensuring that no more than one is included.

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

The rule counts the RoleCode elements within SellerTradeParty; zero or one is allowed.

Where the rule applies

The rule applies to RoleCode within SellerTradeParty.

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