Provide no more than one payment reference

Error FX-SCH-A-000172 Factur-X

Element 'ram:PaymentReference' 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:PaymentReference occurs more than once in ram:ApplicableHeaderTradeSettlement. No more than one such element may occur.

What the rule means

The document-level settlement information can contain at most one payment reference. Multiple elements would violate this requirement.

Please provide no more than one payment reference

The settlement information contains multiple ram:PaymentReference elements. No more than one is allowed in this section.

What to do
  1. Find ram:PaymentReference within ram:ApplicableHeaderTradeSettlement.
  2. Make sure no more than one ram:PaymentReference element is present there.
  3. Recreate the invoice and validate it again.
What it looks like
✗ Triggers the message
<ram:ApplicableHeaderTradeSettlement>
  <ram:PaymentReference/>
  <ram:PaymentReference/>
</ram:ApplicableHeaderTradeSettlement>
✓ Correct
<ram:ApplicableHeaderTradeSettlement>
  <ram:PaymentReference/>
</ram:ApplicableHeaderTradeSettlement>
Technical details

The rule counts the direct ram:PaymentReference elements within ram:ApplicableHeaderTradeSettlement and limits the count to one.

Where the rule applies

The rule applies to ram:PaymentReference within the document-level settlement information (ram:ApplicableHeaderTradeSettlement).

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