Specify exactly one seller

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

Within ram:ApplicableHeaderTradeAgreement, ram:SellerTradeParty does not occur exactly once. The seller element is missing or appears more than once.

What the rule means

The trade agreement must identify exactly one seller so that the seller party is unambiguous.

Please include exactly one seller

The seller is missing from the trade agreement, or ram:SellerTradeParty appears more than once. You can make the information unambiguous by having the element occur there exactly once.

What to do
  1. Find ram:SellerTradeParty in ram:ApplicableHeaderTradeAgreement.
  2. Add the element if it is missing, or remove duplicates so that it occurs exactly once.
  3. Generate the invoice again and validate it once more.
What it looks like
✗ Triggers the message
<ram:ApplicableHeaderTradeAgreement/>
✓ Correct
<ram:ApplicableHeaderTradeAgreement>
  <ram:SellerTradeParty/>
</ram:ApplicableHeaderTradeAgreement>
Technical details

The XPath test counts the direct child elements ram:SellerTradeParty and requires the count to be 1.

Where the rule applies

The rule applies within ram:ApplicableHeaderTradeAgreement of the header trade agreement.

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