At most one role code for the invoice issuer

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

In InvoicerTradeParty, ram:RoleCode occurs more than once. The rule does not allow a second occurrence.

What the rule means

The role code describes the role of the invoice issuer. Multiple occurrences would provide more than one role value in this section.

Please use at most one role code for the invoice issuer

ram:RoleCode occurs more than once in InvoicerTradeParty. You can adjust the XML so that it contains no more than one such element.

What to do
  1. Locate InvoicerTradeParty in the settlement.
  2. Check whether ram:RoleCode occurs more than once and remove any extra occurrences.
  3. Generate the invoice again and validate it once more.
What it looks like
✗ Triggers the message
<ram:InvoicerTradeParty>
  <ram:RoleCode>A</ram:RoleCode>
  <ram:RoleCode>B</ram:RoleCode>
</ram:InvoicerTradeParty>
✓ Correct
<ram:InvoicerTradeParty>
  <ram:RoleCode>A</ram:RoleCode>
</ram:InvoicerTradeParty>
Technical details

The check counts the direct ram:RoleCode elements in InvoicerTradeParty and requires a count of at most 1.

Where the rule applies

Within InvoicerTradeParty in the settlement, ram:RoleCode may occur at most once.

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