At most one seller contact

Error FX-SCH-A-000576 Factur-X

Element 'ram:DefinedTradeContact' 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 element ram:DefinedTradeContact occurs more than once within ram:SellerTradeParty.

What the rule means

At most one defined contact element is allowed for the seller. Multiple contact elements can make the association of contact details ambiguous.

Please provide no more than one seller contact

The seller section contains multiple ram:DefinedTradeContact elements. You can correct the details by using no more than one contact element there.

What to do
  1. Find the repeated ram:DefinedTradeContact elements in ram:SellerTradeParty.
  2. Keep no more than one ram:DefinedTradeContact element there.
  3. Generate the invoice again and validate it.
What it looks like
✗ Triggers the message
<ram:SellerTradeParty>
  <ram:DefinedTradeContact/>
  <ram:DefinedTradeContact/>
</ram:SellerTradeParty>
✓ Correct
<ram:SellerTradeParty>
  <ram:DefinedTradeContact/>
</ram:SellerTradeParty>
Technical details

The test counts the direct ram:DefinedTradeContact elements in the relevant ram:SellerTradeParty and allows no more than one.

Where the rule applies

The rule applies to ram:DefinedTradeContact within the seller details in ram:SellerTradeParty.

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