At most one role code for the buyer’s tax representative

Error FX-SCH-A-000674 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:BuyerTaxRepresentativeTradeParty.

What the rule means

At most one role code is allowed for the buyer’s tax representative; the element may also be absent.

Please use no more than one role code for the buyer’s tax representative

Several ram:RoleCode elements are present for the buyer’s tax representative. This section allows no more than one role code.

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

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

Where the rule applies

In the ram:BuyerTaxRepresentativeTradeParty element for the buyer’s tax representative.

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