Provide the seller exactly once

Error FX-SCH-A-000027 Factur-X

Element 'ram:SellerTradeParty' must occur exactly 1 times.

Mandatory rule: As long as it is violated, the invoice is invalid and will be rejected by validators.
What is wrong

SellerTradeParty is missing from ApplicableHeaderTradeAgreement or occurs there more than once. The element must occur exactly once.

What the rule means

The invoice must contain exactly one seller so that the party issuing it is clearly identified.

Please include the seller exactly once in the invoice

The seller information is missing or appears more than once. You can adjust the invoice so that SellerTradeParty occurs exactly once.

What to do
  1. Check ApplicableHeaderTradeAgreement for SellerTradeParty.
  2. Make sure the element is present exactly once.
  3. Generate the invoice again and validate it.
What it looks like
✗ Triggers the message
<ram:ApplicableHeaderTradeAgreement>
  <ram:SellerTradeParty/>
  <ram:SellerTradeParty/>
</ram:ApplicableHeaderTradeAgreement>
✓ Correct
<ram:ApplicableHeaderTradeAgreement>
  <ram:SellerTradeParty/>
</ram:ApplicableHeaderTradeAgreement>
Technical details

The test counts SellerTradeParty elements in the context and requires the count to equal 1.

Where the rule applies

The rule applies to the seller information in ApplicableHeaderTradeAgreement.

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