Payee at most once

Error FX-SCH-A-000331 Factur-X

Element 'ram:PayeeTradeParty' 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

Within ram:SpecifiedTradePaymentTerms, ram:PayeeTradeParty occurs more than once. This element may occur at most once in this context.

What the rule means

ram:PayeeTradeParty identifies the payee in the payment terms. The limit ensures that no more than one payee is specified there.

Please include the payee no more than once

The invoice contains multiple ram:PayeeTradeParty elements in the payment terms. At most one payee is allowed in this context.

What to do
  1. Locate ram:SpecifiedTradePaymentTerms in the invoice.
  2. Check its ram:PayeeTradeParty elements and remove the extra occurrences.
  3. Generate the invoice again and validate it once more.
What it looks like
✗ Triggers the message
<ram:SpecifiedTradePaymentTerms>
  <ram:PayeeTradeParty/>
  <ram:PayeeTradeParty/>
</ram:SpecifiedTradePaymentTerms>
✓ Correct
<ram:SpecifiedTradePaymentTerms>
  <ram:PayeeTradeParty/>
</ram:SpecifiedTradePaymentTerms>
Technical details

The test counts the direct ram:PayeeTradeParty elements in ram:SpecifiedTradePaymentTerms and permits no more than one.

Where the rule applies

The rule applies within ram:SpecifiedTradePaymentTerms at document level.

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