At most one buyer ram:ID

Error FX-SCH-A-000163 Factur-X

Element 'ram:ID' 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:ID occurs more than once in ram:BuyerTradeParty. At most one such element is allowed; it may also be absent.

What the rule means

In this rule context, the buyer identifier is represented as a single optional element and must not be supplied more than once.

Please provide the buyer identifier no more than once

The buyer information contains ram:ID more than once. This element may appear there at most once, but it may also be omitted.

What to do
  1. Check ram:BuyerTradeParty for repeated ram:ID elements.
  2. Remove any additional ram:ID elements or omit the element.
  3. Generate the invoice again and validate it again.
What it looks like
✗ Triggers the message
<ram:BuyerTradeParty>
  <ram:ID>BUYER-1</ram:ID>
  <ram:ID>BUYER-2</ram:ID>
</ram:BuyerTradeParty>
✓ Correct
<ram:BuyerTradeParty>
  <ram:ID>BUYER-1</ram:ID>
</ram:BuyerTradeParty>
Technical details

The XPath test count(ram:ID)<=1 limits the number of direct ram:ID child elements to at most one.

Where the rule applies

The rule applies to the ram:ID elements in ram:BuyerTradeParty of the agreement between seller and buyer.

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